krzyzanowskim / OnlineSwiftPlayground

Online Swift Playground

Home Page:http://online.SwiftPlayground.run

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compiler error when not importing anything

ahti opened this issue · comments

commented

Trying a code snippet that doesn't import anything doesn't work for me on http://online.swiftplayground.run/. When trying just print("lol"), the output is the following:

Swift version 4.0.3 (swift-4.0.3-RELEASE)
Target: x86_64-unknown-linux-gnu
/usr/bin/swift -frontend -c -primary-file /tmp/C32686A8-2BA6-4678-B992-3301A819626C.XrYPNz/main.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -I /swiftplayground/.build/release -gnone -suppress-warnings -swift-version 4 -enforce-exclusivity=checked -module-name SwiftPlayground -o /tmp/main-e86eb6.o
/usr/bin/swift-autolink-extract /tmp/main-e86eb6.o -o /tmp/main-a37d34.autolink
/usr/bin/clang++ -fuse-ld=gold -target x86_64-unknown-linux-gnu -Xlinker -rpath -Xlinker /usr/lib/swift/linux /usr/lib/swift/linux/x86_64/swift_begin.o /tmp/main-e86eb6.o -L /swiftplayground/.build/release -lOnlinePlayground -L /usr/lib/swift/linux -lswiftCore --target=x86_64-unknown-linux-gnu @/tmp/main-a37d34.autolink /usr/lib/swift/linux/x86_64/swift_end.o -o /tmp/C32686A8-2BA6-4678-B992-3301A819626C.XrYPNz/main
/swiftplayground/.build/release/libOnlinePlayground.a(OnlinePlayground.swift.o):/swiftplayground/.build/x86_64-unknown-linux/release/OnlinePlayground.build/OnlinePlayground.swift.o:_swift_FORCE_LOAD_$_swiftGlibc_$_OnlinePlayground: error: undefined reference to '_swift_FORCE_LOAD_$_swiftGlibc'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
commented

Using the 4.2 snapshot available now, this doesn't occur anymore. It still does for the release versions 🤔