Skip to content

libicudataswift.so.65 missing using --configuration debug #4

Open

Description

@alfavata

I'm trying to adopt swift-lambda to replace Fabian's process, but my lambda gets a runtime error:

START RequestId: b4ca0e88-b5f5-44c3-99ed-7ab83cf010b3 Version: $LATEST
/var/task/bootstrap: error while loading shared libraries: libicudataswift.so.65: cannot open shared object file: No such file or directory
END RequestId: b4ca0e88-b5f5-44c3-99ed-7ab83cf010b3
REPORT RequestId: b4ca0e88-b5f5-44c3-99ed-7ab83cf010b3	Duration: 80.48 ms	Billed Duration: 100 ms	Memory Size: 128 MB	Max Memory Used: 6 MB	
RequestId: b4ca0e88-b5f5-44c3-99ed-7ab83cf010b3 Error: Runtime exited with error: exit status 127
Runtime.ExitError

I'm afraid I won't have the opportunity to look more into this now, although I hope to be able to do so next week. But I'd appreciate any suggestions in the meantime... perhaps I'm missing something really obvious?

Activity

  1. changed the title [-]Runtime error[/-] [+]libicudataswift.so.65 missing[/+] on Oct 16, 2020
  2. helje5 commented on Oct 16, 2020

    @helje5
    Member

    Building the Macro example:

    Zini18:Examples helge$ swift lambda build --verbose -p express-simple-lambda
    Build setup:
      Checkout dir: /Users/helge/dev/Swift/Macro/Examples/.build/checkouts
    Build status:
      Package resolved: no
        resolved:       
        package:        /Users/helge/dev/Swift/Macro/Examples/Package.swift
    SDK: /usr/local/lib/swift/dst/x86_64-unknown-linux/swift-5.3-amazonlinux2.xtoolchain/x86_64-amazonlinux2.sdk
    SPM: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift build --configuration release --destination /usr/local/lib/swift/dst/x86_64-unknown-linux/swift-5.3-amazonlinux2.xtoolchain/destination.json -Xswiftc -target -Xswiftc x86_64-unknown-linux -Xcc -target -Xcc x86_64-unknown-linux -Xcc -Wno-unused-command-line-argument --product express-simple-lambda
    Preparing build directory: /Users/helge/dev/Swift/Macro/Examples/.build/lambda
      Embedding: libswiftCore.so
        Not embedding: libpthread.so.0
        Not embedding: libdl.so.2
        Embedding: libicui18nswift.so.65
        Embedding: libicuucswift.so.65
        Embedding: libicudataswift.so.65 // <=======
        Not embedding: libstdc++.so.6
    ...
      Not embedding: libgcc_s.so.1
      Not embedding: libc.so.6
      Embedding Sources resource dir: 'views'
      Embedding Sources resource dir: 'public'
    Zipping .... done, size: 23M (unpacked 90M)
    

    It looks OK, it seems packaged properly:

    Zini18:Examples helge$ file .build/lambda/libicudataswift.so.65
    .build/lambda/libicudataswift.so.65: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=6a0ce1be26c56d3bdfe1950f3f00fa1ab3c80d65, not stripped
    

    Could you run swift lambda --verbose and post the output?

  3. alfavata commented on Oct 19, 2020

    @alfavata
    Author

    Thanks for looking into this! I still haven't had time to retry, but here's the output you asked for:

    $ swift lambda build --verbose -p hiya-apps-call-log-endpoint
    
    Build setup:
      Checkout dir: /Users/alfavata/Code/ios-hiya/CallLogLambda/.build/checkouts
    Build status:
      Package resolved: no
        resolved:       
        package:        /Users/alfavata/Code/ios-hiya/CallLogLambda/Package.swift
    SDK: /usr/local/lib/swift/dst/x86_64-unknown-linux/swift-5.3-amazonlinux2.xtoolchain/x86_64-amazonlinux2.sdk
    SPM: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift build --configuration release --destination /usr/local/lib/swift/dst/x86_64-unknown-linux/swift-5.3-amazonlinux2.xtoolchain/destination.json -Xswiftc -target -Xswiftc x86_64-unknown-linux -Xcc -target -Xcc x86_64-unknown-linux -Xcc -Wno-unused-command-line-argument --product hiya-apps-call-log-endpoint
    [814/814] Linking hiya-apps-call-log-endpoint
    Preparing build directory: /Users/alfavata/Code/ios-hiya/CallLogLambda/.build/lambda
      Embedding: libswiftCore.so
        Not embedding: libpthread.so.0
        Not embedding: libdl.so.2
        Embedding: libicui18nswift.so.65
        Embedding: libicuucswift.so.65
        Embedding: libicudataswift.so.65
        Not embedding: libstdc++.so.6
        Not embedding: libm.so.6
        Not embedding: libgcc_s.so.1
        Not embedding: libc.so.6
        Not embedding: ld-linux-x86-64.so.2
      Embedding: libFoundation.so
        Embedding: libswiftDispatch.so
        Already embedded: libicuucswift.so.65
        Already embedded: libicui18nswift.so.65
        Embedding: libdispatch.so
        Embedding: libBlocksRuntime.so
        Not embedding: libpthread.so.0
        Not embedding: libutil.so.1
        Not embedding: libdl.so.2
        Already embedded: libswiftCore.so
        Not embedding: libm.so.6
        Embedding: libswiftGlibc.so
        Not embedding: libgcc_s.so.1
        Not embedding: libc.so.6
      Already embedded: libswiftGlibc.so
      Not embedding: libpthread.so.0
      Not embedding: libutil.so.1
      Not embedding: libdl.so.2
      Not embedding: libm.so.6
      Already embedded: libswiftDispatch.so
      Already embedded: libdispatch.so
      Already embedded: libBlocksRuntime.so
      Embedding: libFoundationNetworking.so
        Already embedded: libFoundation.so
        Not embedding: libcurl.so.4
        Already embedded: libswiftDispatch.so
        Already embedded: libdispatch.so
        Already embedded: libBlocksRuntime.so
        Not embedding: libpthread.so.0
        Not embedding: libutil.so.1
        Not embedding: libdl.so.2
        Already embedded: libswiftCore.so
        Not embedding: libm.so.6
        Already embedded: libswiftGlibc.so
        Not embedding: libgcc_s.so.1
        Not embedding: libc.so.6
      Not embedding: libgcc_s.so.1
      Not embedding: libc.so.6
    Zipping .... done, size: 28M (unpacked 111M)
    
  4. alfavata commented on Oct 21, 2020

    @alfavata
    Author

    Just realised that I never tried deploying a lambda built with --configuration release - and the output of swift lambda build seems to be quite different with --configuration debug:

    $ swift lambda build \
    		--verbose \
    		--configuration debug \
    		--product hiya-apps-call-log-endpoint
    Build setup:
      Checkout dir: /Users/alfavata/Code/ios-hiya/CallLogLambda/.build/checkouts
    Build status:
      Package resolved: no
        resolved:       
        package:        /Users/alfavata/Code/ios-hiya/CallLogLambda/Package.swift
    SDK: /usr/local/lib/swift/dst/x86_64-unknown-linux/swift-5.3-amazonlinux2.xtoolchain/x86_64-amazonlinux2.sdk
    SPM: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift build --configuration debug --destination /usr/local/lib/swift/dst/x86_64-unknown-linux/swift-5.3-amazonlinux2.xtoolchain/destination.json -Xswiftc -target -Xswiftc x86_64-unknown-linux -Xcc -target -Xcc x86_64-unknown-linux -Xcc -Wno-unused-command-line-argument --product hiya-apps-call-log-endpoint
    [14/14] Linking hiya-apps-call-log-endpoint
    Preparing build directory: /Users/alfavata/Code/ios-hiya/CallLogLambda/.build/lambda
      Embedding: libswiftSwiftOnoneSupport.so
        Not embedding: libpthread.so.0
        Not embedding: libdl.so.2
        Embedding: libswiftCore.so
        Not embedding: libstdc++.so.6
        Not embedding: libm.so.6
        Not embedding: libgcc_s.so.1
        Not embedding: libc.so.6
      Already embedded: libswiftCore.so
      Embedding: libFoundation.so
        Embedding: libswiftDispatch.so
        Embedding: libicuucswift.so.65
        Embedding: libicui18nswift.so.65
        Embedding: libdispatch.so
        Embedding: libBlocksRuntime.so
        Not embedding: libpthread.so.0
        Not embedding: libutil.so.1
        Not embedding: libdl.so.2
        Already embedded: libswiftCore.so
        Not embedding: libm.so.6
        Embedding: libswiftGlibc.so
        Not embedding: libgcc_s.so.1
        Not embedding: libc.so.6
      Already embedded: libswiftGlibc.so
      Not embedding: libpthread.so.0
      Not embedding: libutil.so.1
      Not embedding: libdl.so.2
      Not embedding: libm.so.6
      Already embedded: libswiftDispatch.so
      Already embedded: libdispatch.so
      Already embedded: libBlocksRuntime.so
      Embedding: libFoundationNetworking.so
        Already embedded: libFoundation.so
        Not embedding: libcurl.so.4
        Already embedded: libswiftDispatch.so
        Already embedded: libdispatch.so
        Already embedded: libBlocksRuntime.so
        Not embedding: libpthread.so.0
        Not embedding: libutil.so.1
        Not embedding: libdl.so.2
        Already embedded: libswiftCore.so
        Not embedding: libm.so.6
        Already embedded: libswiftGlibc.so
        Not embedding: libgcc_s.so.1
        Not embedding: libc.so.6
      Not embedding: libgcc_s.so.1
      Not embedding: libc.so.6
    Zipping .... done, size: 17M (unpacked 72M)
    
  5. changed the title [-]libicudataswift.so.65 missing[/-] [+]libicudataswift.so.65 missing using `--configuration debug`[/+] on Oct 22, 2020
  6. alfavata commented on Oct 22, 2020

    @alfavata
    Author

    I finally managed to deploy a build made using swift lambda build --configuration release and it's working properly, so the problem only seems to happen with --configuration debug.

  7. removed
    questionFurther information is requested
    on Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions