Skip to content

Conversation

@spevans
Copy link
Contributor

@spevans spevans commented Oct 5, 2020

  • Remove references to swiftImageInspectionShared on Linux and dont have
    split libraries between static/non-static linked executables.

  • -static-executable now links correctly Linux.

    Note: swift::lookupSymbol() will not work on statically linked
    executables but this can be worked around by using the
    https://github.com/swift-server/swift-backtrace package.

- Remove references to swiftImageInspectionShared on Linux and dont have split libraries between static/non-static linked executables. - -static-executable now links correctly Linux. Note: swift::lookupSymbol() will not work on statically linked executables but this can be worked around by using the https://github.com/swift-server/swift-backtrace package.
@spevans
Copy link
Contributor Author

spevans commented Oct 5, 2020

Please test with following pull request:
swiftlang/swift-integration-tests#69

@swift-ci please test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks largely like my original change with the addition of a test case!

@spevans
Copy link
Contributor Author

spevans commented Oct 6, 2020

Please test with following pull request:
swiftlang/swift-integration-tests#74

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Oct 7, 2020

Build failed
Swift Test OS X Platform
Git Sha - 960d0e3

@swift-ci
Copy link
Contributor

swift-ci commented Oct 7, 2020

Build failed
Swift Test Linux Platform
Git Sha - 960d0e3

@spevans
Copy link
Contributor Author

spevans commented Oct 7, 2020

Please test with following pull request:
swiftlang/swift-integration-tests#74

@swift-ci please test

@spevans
Copy link
Contributor Author

spevans commented Oct 8, 2020

@swift-ci test and merge

1 similar comment
@spevans
Copy link
Contributor Author

spevans commented Oct 8, 2020

@swift-ci test and merge

@swift-ci swift-ci merged commit 8b5a55d into swiftlang:main Oct 8, 2020
@beccadax
Copy link
Contributor

beccadax commented Oct 11, 2020

@spevans @compnerd Hiya. It looks like this change may have broken static linking on at least CentOS 7:

******************** TEST 'Swift(linux-x86_64) :: Driver/static-executable-linux.swift' FAILED ******************** Script: -- : 'RUN: at line 5'; rm -rf "/home/build-user/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Driver/Output/static-executable-linux.swift.tmp" && mkdir -p "/home/build-user/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Driver/Output/static-executable-linux.swift.tmp" : 'RUN: at line 6'; /home/build-user/build/buildbot_linux/swift-linux-x86_64/bin/swiftc -target x86_64-unknown-linux-gnu -toolchain-stdlib-rpath -module-cache-path '/home/build-user/build/buildbot_linux/swift-linux-x86_64/swift-test-results/x86_64-unknown-linux-gnu/clang-module-cache' -static-executable -o /home/build-user/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Driver/Output/static-executable-linux.swift.tmp/static-executable /home/build-user/swift/test/Driver/static-executable-linux.swift : 'RUN: at line 7'; /home/build-user/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Driver/Output/static-executable-linux.swift.tmp/static-executable | /usr/bin/python3.6 '/home/build-user/swift/utils/PathSanitizingFileCheck' --sanitize BUILD_DIR='/home/build-user/build/buildbot_linux/swift-linux-x86_64' --sanitize SOURCE_DIR='/home/build-user/swift' --use-filecheck '/home/build-user/build/buildbot_linux/llvm-linux-x86_64/bin/FileCheck' /home/build-user/swift/test/Driver/static-executable-linux.swift : 'RUN: at line 8'; file /home/build-user/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Driver/Output/static-executable-linux.swift.tmp/static-executable | /usr/bin/python3.6 '/home/build-user/swift/utils/PathSanitizingFileCheck' --sanitize BUILD_DIR='/home/build-user/build/buildbot_linux/swift-linux-x86_64' --sanitize SOURCE_DIR='/home/build-user/swift' --use-filecheck '/home/build-user/build/buildbot_linux/llvm-linux-x86_64/bin/FileCheck' /home/build-user/swift/test/Driver/static-executable-linux.swift --check-prefix=FILE -- Exit Code: 2 Command Output (stderr): -- /home/build-user/build/buildbot_linux/swift-linux-x86_64/test-linux-x86_64/Driver/Output/static-executable-linux.swift.script: line 4: file: command not found FileCheck error: '<stdin>' is empty. FileCheck command line: /home/build-user/build/buildbot_linux/llvm-linux-x86_64/bin/FileCheck /home/build-user/swift/test/Driver/static-executable-linux.swift --check-prefix=FILE -- ******************** 

What should we do here?

kateinoigakukun added a commit to swiftwasm/swift that referenced this pull request Oct 11, 2020
kateinoigakukun added a commit to swiftwasm/swift that referenced this pull request Oct 12, 2020
@spevans
Copy link
Contributor Author

spevans commented Oct 12, 2020

@brentdax Could it simply be the case that the file command is not installed?

The lit script is fairly simple but does include the command check:

// FILE: , statically linked, 

Which is probably breaking it. However it looks like test/Driver/static-executable-linux.swift is actually a duplicate of test/Driver/static-executable.swift with the exception that the latter uses ELF-NOT instead. I will open a PR to remove this broken test.

Btw, is there anyway to CI tests on Centos?

@spevans
Copy link
Contributor Author

spevans commented Oct 12, 2020

I have opened #34275 to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants