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-3852] Swift stdlib build failure on Linux. Incorrect call for gold linker #46437

Closed
swift-ci opened this issue Feb 3, 2017 · 1 comment
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. build-script Area → utils: The build script Linux Platform: Linux standard library Area: Standard library umbrella utils Area: the build system and other accessory scripts under the "utils" directory

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Feb 3, 2017

Previous ID SR-3852
Radar None
Original Reporter Vladislav (JIRA User)
Type Bug
Status Closed
Resolution Done
Environment

Linux ved-hp-gentoo 4.4.39-gentoo #1 SMP Mon Dec 26 21:22:33 MSK 2016 x86_64 Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz GenuineIntel GNU/Linux

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

md5: 22f6fbf3d5fbb657d3336d19bf8056b2

Issue Description:

I have fresh clone of swift sources using standard commands:

git clone https://github.com/apple/swift.git
./swift/utils/update-checkout --clone

Then I have enter standard build script:

cd swift
utils/build-script --preset=buildbot_linux install_destdir=/mnt/swift/gentoo installable_package=/mnt/swift/gentoo/swift.tar.gz

Build process has been aborted during stdlib bild phase:

-- Build files have been written to: /mnt/swift/swift-source/build/buildbot_linux/swift-linux-x86_64
+ popd
/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
[156/711] Building CXX object lib/IRGen/CMakeFiles/swiftIRGen.dir/IRGen.cpp.o
/mnt/swift/swift-source/swift/lib/IRGen/IRGen.cpp:1059:11: warning: enumeration value 'Wasm' not handled in switch [-Wswitch]
  switch (IGM.TargetInfo.OutputObjectFormat) {
          ^
1 warning generated.
[177/711] Building CXX object lib/IRGen/CMakeFiles/swiftIRGen.dir/GenMeta.cpp.o
/mnt/swift/swift-source/swift/lib/IRGen/GenMeta.cpp:2023:11: warning: enumeration value 'Wasm' not handled in switch [-Wswitch]
  switch (TargetInfo.OutputObjectFormat) {
          ^
1 warning generated.
[178/711] Building CXX object lib/IRGen/CMakeFiles/swiftIRGen.dir/GenReflection.cpp.o
/mnt/swift/swift-source/swift/lib/IRGen/GenReflection.cpp:789:11: warning: enumeration value 'Wasm' not handled in switch [-Wswitch]
  switch (IGM.TargetInfo.OutputObjectFormat) {
          ^
1 warning generated.
[527/711] Building CXX object stdlib/public/runtime/CMakeFiles/swiftRuntime-linux-x86_64.dir/MetadataLookup.cpp.o
/mnt/swift/swift-source/swift/stdlib/public/runtime/MetadataLookup.cpp:89:32: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<TypeMetadataState> TypeMetadataRecords;
                               ^~~~~~~~~~~~~~~~~~~
1 warning generated.
[532/711] Building CXX object stdlib/public/runtime/CMakeFiles/swiftRuntime-linux-x86_64.dir/Metadata.cpp.o
/mnt/swift/swift-source/swift/stdlib/public/runtime/Metadata.cpp:2481:31: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<ForeignTypeState> ForeignTypes;
                              ^~~~~~~~~~~~
1 warning generated.
[535/711] Building CXX object stdlib/public/runtime/CMakeFiles/swiftRuntime-linux-x86_64.dir/ProtocolConformance.cpp.o
/mnt/swift/swift-source/swift/stdlib/public/runtime/ProtocolConformance.cpp:257:31: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<ConformanceState> Conformances;
                              ^~~~~~~~~~~~
1 warning generated.
[544/711] Generating ../../../lib/swift/linux/x86_64/swift_begin.o
FAILED: lib/swift/linux/x86_64/swift_begin.o 
cd /mnt/swift/swift-source/build/buildbot_linux/swift-linux-x86_64/stdlib/public/runtime && gold -r -o /mnt/swift/swift-source/build/buildbot_linux/swift-linux-x86_64/./lib/swift/linux/x86_64/swift_begin.o /mnt/swift/swift-source/build/buildbot_linux/swift-linux-x86_64/stdlib/public/runtime/CMakeFiles/section_magic_begin-linux-x86_64.dir/swift_sections.S.o /mnt/swift/swift-source/build/buildbot_linux/swift-linux-x86_64/stdlib/public/runtime/CMakeFiles/section_magic_loader-linux-x86_64.dir/ImageInspectionInit.cpp.o
/bin/sh: gold: command not found
[547/711] Building CXX object tools/swift-api-digester/CMakeFiles/swift-api-digester.dir/swift-api-digester.cpp.o
ninja: build stopped: subcommand failed.
utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

Please, look at the message: "/bin/sh: gold: command not found". It looks like that somewhere build script calls gold instead of ld.gold

@swift-ci
Copy link
Contributor Author

swift-ci commented Feb 9, 2017

Comment by Vladislav Dembskiy (JIRA)

I am not able to reproduce with latest checkout

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the utils Area: the build system and other accessory scripts under the "utils" directory label Jul 13, 2024
This issue was closed.
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. build-script Area → utils: The build script Linux Platform: Linux standard library Area: Standard library umbrella utils Area: the build system and other accessory scripts under the "utils" directory
Projects
None yet
Development

No branches or pull requests

2 participants