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:

    0cd depends
    1make -j5
    2<snip>
    3Extracting openssl...
    4bitcoin/depends/sources/openssl-1.0.1k.tar.gz: OK
    5Preprocessing openssl...
    6sed: RE error: illegal byte sequence
    7make: *** [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:

    0$ locale
    1LANG="en_AU.UTF-8"
    2LC_COLLATE="en_AU.UTF-8"
    3LC_CTYPE="en_AU.UTF-8"
    4LC_MESSAGES="en_AU.UTF-8"
    5LC_MONETARY="en_AU.UTF-8"
    6LC_NUMERIC="en_AU.UTF-8"
    7LC_TIME="en_AU.UTF-8"
    8LC_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:

    0     LANG         Used as a substitute for any unset LC_* variable.  If LANG is unset, 
    1                  it will act as if set to "C".  If any of LANG or LC_* are set to invalid
    2                  values, locale acts as if they are all unset.
    3
    4     LC_ALL       Will override the setting of all other LC_* variables.
    

    locale(7) from Linux:

    0       If the second argument to setlocale(3) is an empty string, "", for the default
    1       locale, it is determined using the following steps:
    2
    3       1. If there is a non-null environment variable LC_ALL, the value of LC_ALL is used.
    4
    5       2. If an environment variable with the same name as one of the categories
    6          above exists and is non-null, its value is used for that category.
    7
    8       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
  9. DrahtBot reopened this on Aug 10, 2018

  10. DrahtBot commented at 11:01 pm on August 28, 2018: member
    • #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: 2024-11-17 15:12 UTC

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