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

[SR-5951] Swift stdlib does not build from source on Linux with glibc 2.26 #48510

Open
swift-ci opened this issue Sep 21, 2017 · 4 comments
Open
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. Linux Platform: Linux runtime The Swift Runtime standard library Area: Standard library umbrella

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-5951
Radar rdar://problem/35199898
Original Reporter Vladislav (JIRA User)
Type Bug
Environment

Linux from scratch:
Linux lfs-sdb6 4.9.50 #1 SMP Fri Sep 15 22:52:51 MSK 2017 x86_64 GNU/Linux

Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug, Linux, Runtime
Assignee None
Priority Medium

md5: 0d7711196f292553b504ad50861909c4

Issue Description:

The error is:

/mnt/swift/swift-source/swift

  • /usr/bin/cmake --build /mnt/swift/swift-source/build/buildbot_linux/swift-linux-x86_64 – -j4 all swift-stdlib-linux-x86_64
    [33/148] Building CXX object stdlib/public/stubs/CMakeFiles/swiftStdlibStubs-linux-x86_64.dir/Stubs.cpp.o
    FAILED: stdlib/public/stubs/CMakeFiles/swiftStdlibStubs-linux-x86_64.dir/Stubs.cpp.o
    /mnt/swift/swift-source/build/buildbot_linux/llvm-linux-x86_64/./bin/clang+ -DCMARK_STATIC_DEFINE -DGTEST_HAS_RTTI=0 -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Istdlib/public/stubs -I/mnt/swift/swift-source/swift/stdlib/public/stubs -Iinclude -I/mnt/swift/swift-source/swift/include -I/mnt/swift/swift-source/llvm/include -I/mnt/swift/swift-source/build/buildbot_linux/llvm-linux-x86_64/include -I/mnt/swift/swift-source/build/buildbot_linux/llvm-linux-x86_64/tools/clang/include -I/mnt/swift/swift-source/llvm/tools/clang/include -I/mnt/swift/swift-source/cmark/src -I/mnt/swift/swift-source/build/buildbot_linux/cmark-linux-x86_64/src -Wno-unknown-warning-option -Werror=unguarded-availability-new -fno-stack-protector -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c+11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics -ffunction-sections -fdata-sections -Werror=switch -Wdocumentation -Wimplicit-fallthrough -Wunreachable-code -Woverloaded-virtual -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -fno-sanitize=all -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1 -O3 -UNDEBUG -fno-exceptions -fno-rtti -Wglobal-constructors -Wexit-time-destructors -fvisibility=hidden -DswiftCore_EXPORTS -target x86_64-unknown-linux-gnu -O2 -g0 -DNDEBUG -MD -MT stdlib/public/stubs/CMakeFiles/swiftStdlibStubs-linux-x86_64.dir/Stubs.cpp.o -MF stdlib/public/stubs/CMakeFiles/swiftStdlibStubs-linux-x86_64.dir/Stubs.cpp.o.d -o stdlib/public/stubs/CMakeFiles/swiftStdlibStubs-linux-x86_64.dir/Stubs.cpp.o -c /mnt/swift/swift-source/swift/stdlib/public/stubs/Stubs.cpp
    /mnt/swift/swift-source/swift/stdlib/public/stubs/Stubs.cpp:64:10: fatal error: 'xlocale.h' file not found
    #include <xlocale.h>
    ^~~~~~~~~~~
    1 error generated.

xlocale.h is has been removed according to the glibc News file:

The nonstandard header <xlocale.h> has been removed. Most programs should use <locale.h> instead. If you have a specific need for the definition of locale_t with no other declarations, please contact libc-alpha@sourceware.org and explain.

@belkadan
Copy link
Contributor

@swift-ci create

@belkadan
Copy link
Contributor

Linux From Scratch isn't a supported platform at this time, so fixing this isn't a high priority.

@swift-ci
Copy link
Collaborator Author

Comment by Greg Morenz (JIRA)

Same error on arch linux.

@ahti
Copy link
Contributor

ahti commented Oct 26, 2017

Ubuntu 17.10 also ships with glibc 2.26 and does not include xlocale.h. While Ubuntu 17.10 also isn't supported (yet?), I suspect more people will start to run into this.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. Linux Platform: Linux runtime The Swift Runtime standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

3 participants