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

Asked by Aptivi

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.02.20.11.54.2/src/MSBuild/MSBuild.csproj]

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

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Thiago F. Pappacena
Solved:
Last query:
Last reply:
Revision history for this message
Aptivi (eofla) said :
#1
Revision history for this message
Best Thiago F. Pappacena (pappacena) said :
#2

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.

Revision history for this message
Aptivi (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.

Revision history for this message
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. https://wiki.ubuntu.com/SimpleSbuild) to have a more accurate build environment locally.

Revision history for this message
Aptivi (eofla) said :
#5

Thanks Thiago F. Pappacena, that solved my question.

Revision history for this message
Aptivi (eofla) said :
#6

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