Build failed because of locale en_US.UTF8 not being able to be set

Asked by EoflaOE on 2020-05-27

I have now made the package, which I was trying to build on Launchpad, build offline, because the original repository required the network connection. I have put all the required files downloaded from the Internet to source and made scripts use such files.

I have uploaded the package to Launchpad using SFTP, because my upload speed is 1/4 of my download speed and the normal FTP way will be stuck once the .orig.tar.xz upload finishes because it's big. It has uploaded successfully, and the build system failed to build the package because the locale system can't be set to en_US.UTF8 as seen in this line:

setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash : error : setlocale: LC_ALL: cannot change locale (en_US.UTF-8) [/<<BUILDDIR>>/msbuild-16.5+xamarinxplat.2020.]

It again built successfully in my local development machine. What dependencies am I missing? Am I missing "locales" and "locales-all"?

Question information

English Edit question
Launchpad itself Edit question
No assignee Edit question
Solved by:
Thiago F. Pappacena
Last query:
Last reply:
EoflaOE (eofla) said : #1

Hi, eofla.

Yes. `locales` package should give you some locales tools (such as update-locale and locale-gen), and `locales-all` package should give you a pretty comprehensive sets of generated locales already.

EoflaOE (eofla) said : #3

Thanks! I did not know that locales and locales-all are not installed by default on Launchpad building system. I will include them as build dependency and normal dependency, reupload them with the new version, and report back.

Colin Watson (cjwatson) said : #4

It's somewhat more usual to use C.UTF-8 if you can, since that's available by default. But maybe this is a particular case where you don't have an alternative.

By the way, in general Launchpad staff can't necessarily help you debug your package builds in all cases. We recommend setting up sbuild (e.g. to have a more accurate build environment locally.

EoflaOE (eofla) said : #5

Thanks Thiago F. Pappacena, that solved my question.

EoflaOE (eofla) said : #6

Thanks! I have added the necessary dependencies, and it appears that it has built successfully.