Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depends: set LANG=C in Makefile #13514

Closed
wants to merge 2 commits into from

Conversation

fanquake
Copy link
Member

@fanquake fanquake commented Jun 21, 2018

While testing some of @theuni's work for iOS cross builds in depends, I found a locale related issue that appears when preprocessing OpenSSL's Configure. This is on macOS 10.13.5.

7ac0c67 (a subset of the iOS related build changes) is included to show the issue.
When doing a depends build with master (6579d80) + that commit I see:

cd depends
make -j5
<snip>
Extracting openssl...
bitcoin/depends/sources/openssl-1.0.1k.tar.gz: OK
Preprocessing openssl...
sed: RE error: illegal byte sequence
make: *** [bitcoin/depends/work/build/x86_64-apple-darwin17.6.0/openssl/1.0.1k-b6eae8817ad/.stamp_preprocessed] Error 1

It seems like the issue could be related to embedded double quotes.

I did try setting other locale related variables:
LANGUAGE=C
LC_ALL=C
LC_CTYPE=C
etc, however LANG=C was the only one that actually seemed to work.

This is the output of locale on my machine:

$ locale
LANG="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_CTYPE="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_ALL=

Todo:

  • Confirm this isn't a local issue.
  • Should we also set other locale related vars?
  • Followup other uses of sed in /depends/packages.

@practicalswift
Copy link
Contributor

Weird! Shouldn't LANG be used only in the absence of other locale related environment variables?

locale(1) from OS X:

     LANG         Used as a substitute for any unset LC_* variable.  If LANG is unset, 
                  it will act as if set to "C".  If any of LANG or LC_* are set to invalid
                  values, locale acts as if they are all unset.

     LC_ALL       Will override the setting of all other LC_* variables.

locale(7) from Linux:

       If the second argument to setlocale(3) is an empty string, "", for the default
       locale, it is determined using the following steps:

       1. If there is a non-null environment variable LC_ALL, the value of LC_ALL is used.

       2. If an environment variable with the same name as one of the categories
          above exists and is non-null, its value is used for that category.

       3. If there is a non-null environment variable LANG, the value of LANG is used.

@DrahtBot
Copy link
Contributor

The last travis run for this pull request was 50 days ago and is thus outdated. To trigger a fresh travis build, this pull request should be closed and re-opened.

@DrahtBot DrahtBot reopened this Aug 10, 2018
@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 28, 2018

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@fanquake
Copy link
Member Author

fanquake commented Oct 9, 2018

Going to close this for now. It can be worked around in other ways.

@fanquake fanquake closed this Oct 9, 2018
@fanquake fanquake deleted the depends-ios-support branch October 9, 2018 05:21
@fanquake fanquake removed the request for review from theuni October 9, 2018 05:21
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants