Skip to content

Instantly share code, notes, and snippets.

@eyeplum
Last active January 8, 2018 20:34
Show Gist options
  • Select an option

  • Save eyeplum/b12a95c394c4aa48f11c829b44b54268 to your computer and use it in GitHub Desktop.

Select an option

Save eyeplum/b12a95c394c4aa48f11c829b44b54268 to your computer and use it in GitHub Desktop.

Revisions

  1. eyeplum revised this gist Jan 8, 2018. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions swift.out
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    #####
    # on a machine with Swift 4.1-dev installed
    #####

    $ swift build
    Compile Swift Module 'hello' (1 sources)
  2. eyeplum revised this gist Jan 8, 2018. 2 changed files with 6 additions and 14 deletions.
    2 changes: 1 addition & 1 deletion rust.out
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    # on a machine with Rust installed
    #####

    root@c625120bc6e2:/hello# ldd ./target/debug/hello
    $ ldd ./target/debug/hello
    linux-vdso.so.1 (0x00007ffefb7f4000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9e6e25b000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9e6e053000)
    18 changes: 5 additions & 13 deletions swift.out
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,10 @@
    #####
    # on a machine with Swift 4.1-dev installed

    root@c8ab5e2384c9:/hello# swift package init --type executable
    Creating executable package: hello
    Creating Package.swift
    Creating README.md
    Creating .gitignore
    Creating Sources/
    Creating Sources/hello/main.swift
    Creating Tests/
    root@c8ab5e2384c9:/hello# swift build
    $ swift build
    Compile Swift Module 'hello' (1 sources)
    Linking ./.build/x86_64-unknown-linux/debug/hello
    root@c8ab5e2384c9:/hello# ldd .build/x86_64-unknown-linux/debug/hello
    $ ldd .build/x86_64-unknown-linux/debug/hello
    linux-vdso.so.1 => (0x00007ffe3036b000)
    libswiftCore.so => /usr/lib/swift/linux/libswiftCore.so (0x00007f0b077b5000)
    libswiftSwiftOnoneSupport.so => /usr/lib/swift/linux/libswiftSwiftOnoneSupport.so (0x00007f0b07764000)
    @@ -27,8 +19,8 @@ root@c8ab5e2384c9:/hello# ldd .build/x86_64-unknown-linux/debug/hello
    libicui18n.so.55 => /usr/lib/x86_64-linux-gnu/libicui18n.so.55 (0x00007f0b05cd3000)
    /lib64/ld-linux-x86-64.so.2 (0x00005557ec1c8000)
    libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007f0b0421b000)
    root@c8ab5e2384c9:/hello# swift build --static-swift-stdlib
    root@c8ab5e2384c9:/hello# ldd .build/x86_64-unknown-linux/debug/hello
    $ swift build --static-swift-stdlib
    $ ldd .build/x86_64-unknown-linux/debug/hello
    linux-vdso.so.1 => (0x00007fffe8fbf000)
    libswiftCore.so => /usr/lib/swift/linux/libswiftCore.so (0x00007f8dd8133000)
    libswiftSwiftOnoneSupport.so => /usr/lib/swift/linux/libswiftSwiftOnoneSupport.so (0x00007f8dd80e2000)
    @@ -55,5 +47,5 @@ $ ./hello
    # on a machine with Swift 4.0.3 release installed
    #####

    root@c25bf908a2a1:/tmp# ./hello_swift_static
    $ ./hello_swift_static
    ./hello_swift_static: symbol lookup error: ./hello_swift_static: undefined symbol: _T0s27_allocateUninitializedArrayySayxG_BptBwlFyp_Tg5
  3. eyeplum revised this gist Jan 8, 2018. 2 changed files with 21 additions and 2 deletions.
    7 changes: 7 additions & 0 deletions rust.out
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    #####
    # on a machine with Rust installed
    #####

    root@c625120bc6e2:/hello# ldd ./target/debug/hello
    linux-vdso.so.1 (0x00007ffefb7f4000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9e6e25b000)
    @@ -7,6 +11,9 @@ root@c625120bc6e2:/hello# ldd ./target/debug/hello
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9e6d880000)
    /lib64/ld-linux-x86-64.so.2 (0x000055749a57a000)

    #####
    # on a machine that does not have rust installed
    #####

    $ ./hello_rs
    Hello, world!
    16 changes: 14 additions & 2 deletions swift.out
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    #####
    # on a machine with Swift 4.1-dev installed

    root@c8ab5e2384c9:/hello# swift package init --type executable
    Creating executable package: hello
    Creating Package.swift
    @@ -40,8 +43,17 @@ root@c8ab5e2384c9:/hello# ldd .build/x86_64-unknown-linux/debug/hello
    libicui18n.so.55 => /usr/lib/x86_64-linux-gnu/libicui18n.so.55 (0x00007f8dd6651000)
    /lib64/ld-linux-x86-64.so.2 (0x000055f98eadd000)
    libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007f8dd4b99000)
    root@c8ab5e2384c9:/hello#

    #####
    # on a machine that does not have swift toolchain installed
    #####

    $ ./hello
    ./hello: error while loading shared libraries: libswiftCore.so: cannot open shared object file: No such file or directory
    ./hello: error while loading shared libraries: libswiftCore.so: cannot open shared object file: No such file or directory

    #####
    # on a machine with Swift 4.0.3 release installed
    #####

    root@c25bf908a2a1:/tmp# ./hello_swift_static
    ./hello_swift_static: symbol lookup error: ./hello_swift_static: undefined symbol: _T0s27_allocateUninitializedArrayySayxG_BptBwlFyp_Tg5
  4. eyeplum revised this gist Jan 8, 2018. No changes.
  5. eyeplum revised this gist Jan 8, 2018. 2 changed files with 6 additions and 2 deletions.
    6 changes: 5 additions & 1 deletion rust.out
    Original file line number Diff line number Diff line change
    @@ -5,4 +5,8 @@ root@c625120bc6e2:/hello# ldd ./target/debug/hello
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9e6de36000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9e6dc1f000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9e6d880000)
    /lib64/ld-linux-x86-64.so.2 (0x000055749a57a000)
    /lib64/ld-linux-x86-64.so.2 (0x000055749a57a000)

    # on a machine that does not have rust installed
    $ ./hello_rs
    Hello, world!
    2 changes: 1 addition & 1 deletion swift.out
    Original file line number Diff line number Diff line change
    @@ -42,6 +42,6 @@ root@c8ab5e2384c9:/hello# ldd .build/x86_64-unknown-linux/debug/hello
    libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007f8dd4b99000)
    root@c8ab5e2384c9:/hello#

    # on a machine that does have swift toolchain installed
    # on a machine that does not have swift toolchain installed
    $ ./hello
    ./hello: error while loading shared libraries: libswiftCore.so: cannot open shared object file: No such file or directory
  6. eyeplum revised this gist Jan 8, 2018. 2 changed files with 5 additions and 1 deletion.
    File renamed without changes.
    6 changes: 5 additions & 1 deletion spm.out → swift.out
    Original file line number Diff line number Diff line change
    @@ -40,4 +40,8 @@ root@c8ab5e2384c9:/hello# ldd .build/x86_64-unknown-linux/debug/hello
    libicui18n.so.55 => /usr/lib/x86_64-linux-gnu/libicui18n.so.55 (0x00007f8dd6651000)
    /lib64/ld-linux-x86-64.so.2 (0x000055f98eadd000)
    libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007f8dd4b99000)
    root@c8ab5e2384c9:/hello#
    root@c8ab5e2384c9:/hello#

    # on a machine that does have swift toolchain installed
    $ ./hello
    ./hello: error while loading shared libraries: libswiftCore.so: cannot open shared object file: No such file or directory
  7. eyeplum revised this gist Jan 8, 2018. No changes.
  8. eyeplum revised this gist Jan 8, 2018. 2 changed files with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions cargo.out
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    root@c625120bc6e2:/hello# ldd ./target/debug/hello
    linux-vdso.so.1 (0x00007ffefb7f4000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9e6e25b000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9e6e053000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9e6de36000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9e6dc1f000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9e6d880000)
    /lib64/ld-linux-x86-64.so.2 (0x000055749a57a000)
    File renamed without changes.
  9. eyeplum renamed this gist Jan 8, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  10. eyeplum created this gist Jan 8, 2018.
    43 changes: 43 additions & 0 deletions spm.out
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,43 @@
    root@c8ab5e2384c9:/hello# swift package init --type executable
    Creating executable package: hello
    Creating Package.swift
    Creating README.md
    Creating .gitignore
    Creating Sources/
    Creating Sources/hello/main.swift
    Creating Tests/
    root@c8ab5e2384c9:/hello# swift build
    Compile Swift Module 'hello' (1 sources)
    Linking ./.build/x86_64-unknown-linux/debug/hello
    root@c8ab5e2384c9:/hello# ldd .build/x86_64-unknown-linux/debug/hello
    linux-vdso.so.1 => (0x00007ffe3036b000)
    libswiftCore.so => /usr/lib/swift/linux/libswiftCore.so (0x00007f0b077b5000)
    libswiftSwiftOnoneSupport.so => /usr/lib/swift/linux/libswiftSwiftOnoneSupport.so (0x00007f0b07764000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0b073dd000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0b070d4000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0b06ebe000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0b06af3000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0b068d6000)
    libatomic.so.1 => /usr/lib/x86_64-linux-gnu/libatomic.so.1 (0x00007f0b066ce000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f0b064c9000)
    libicuuc.so.55 => /usr/lib/x86_64-linux-gnu/libicuuc.so.55 (0x00007f0b06135000)
    libicui18n.so.55 => /usr/lib/x86_64-linux-gnu/libicui18n.so.55 (0x00007f0b05cd3000)
    /lib64/ld-linux-x86-64.so.2 (0x00005557ec1c8000)
    libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007f0b0421b000)
    root@c8ab5e2384c9:/hello# swift build --static-swift-stdlib
    root@c8ab5e2384c9:/hello# ldd .build/x86_64-unknown-linux/debug/hello
    linux-vdso.so.1 => (0x00007fffe8fbf000)
    libswiftCore.so => /usr/lib/swift/linux/libswiftCore.so (0x00007f8dd8133000)
    libswiftSwiftOnoneSupport.so => /usr/lib/swift/linux/libswiftSwiftOnoneSupport.so (0x00007f8dd80e2000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8dd7d5b000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8dd7a52000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8dd783c000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8dd7471000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8dd7254000)
    libatomic.so.1 => /usr/lib/x86_64-linux-gnu/libatomic.so.1 (0x00007f8dd704c000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f8dd6e47000)
    libicuuc.so.55 => /usr/lib/x86_64-linux-gnu/libicuuc.so.55 (0x00007f8dd6ab3000)
    libicui18n.so.55 => /usr/lib/x86_64-linux-gnu/libicui18n.so.55 (0x00007f8dd6651000)
    /lib64/ld-linux-x86-64.so.2 (0x000055f98eadd000)
    libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007f8dd4b99000)
    root@c8ab5e2384c9:/hello#