depends: set LANG=C in Makefile #13514

pull fanquake wants to merge 2 commits into bitcoin:master from fanquake:depends-ios-support changing 2 files +4 −1
  1. fanquake commented at 3:24 AM on June 21, 2018: member

    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.
  2. [do-not-merge] depends: OpenSSL strip CROSS_SDK from Configure 7ac0c6747d
  3. depends: set LANG=C in Makefile e957001f9c
  4. fanquake added the label Build system on Jun 21, 2018
  5. fanquake requested review from theuni on Jun 21, 2018
  6. practicalswift commented at 1:47 PM on June 21, 2018: 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.
    
  7. DrahtBot closed this on Aug 10, 2018

  8. DrahtBot commented at 12:37 PM on August 10, 2018: member

    <!--5d09a71f8925f3f132321140b44b946d-->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.

  9. DrahtBot reopened this on Aug 10, 2018

  10. DrahtBot commented at 11:01 PM on August 28, 2018: member

    <!--e57a25ab6845829454e8d69fc972939a-->Reviewers, this pull request conflicts with the following ones:

    • #12557 ([WIP] 64 bit iOs device support by Sjors)

    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.

  11. fanquake commented at 5:21 AM on October 9, 2018: member

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

  12. fanquake closed this on Oct 9, 2018

  13. fanquake deleted the branch on Oct 9, 2018
  14. fanquake removed review request from theuni on Oct 9, 2018
  15. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-26 06:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me