After upgrading my machine to Mojave because the master
started to require Xcode 10.2-beta and after overcoming the initial troubles, I have managed to successfully complete the local swift build. But now I am unable to use the resulting binaries in the usual way from /Users/mondo/Developer/swift-source/build/Ninja-Release/swift-macosx-x86_64/bin
:
$ ./Benchmark_O 1
dyld: lazy symbol binding failed: Symbol not found: _objc_setHook_getClass
Referenced from: /Users/mondo/Developer/swift-source/build/Ninja-Release/swift-macosx-x86_64/bin/../lib/swift/macosx/libswiftCore.dylib
Expected in: /usr/lib/libobjc.A.dylib
dyld: Symbol not found: _objc_setHook_getClass
Referenced from: /Users/mondo/Developer/swift-source/build/Ninja-Release/swift-macosx-x86_64/bin/../lib/swift/macosx/libswiftCore.dylib
Expected in: /usr/lib/libobjc.A.dylib
Abort trap: 6
and
$ ./swift
dyld: lazy symbol binding failed: Symbol not found: _objc_setHook_getClass
Referenced from: /Users/mondo/Developer/swift-source/build/Ninja-Release/swift-macosx-x86_64/lib/swift/macosx/libswiftCore.dylib
Expected in: /usr/lib/libobjc.A.dylib
dyld: Symbol not found: _objc_setHook_getClass
Referenced from: /Users/mondo/Developer/swift-source/build/Ninja-Release/swift-macosx-x86_64/lib/swift/macosx/libswiftCore.dylib
Expected in: /usr/lib/libobjc.A.dylib
Stack dump:
0. Program arguments: /Users/mondo/Developer/swift-source/build/Ninja-Release/swift-macosx-x86_64/bin/swift -frontend -repl -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -color-diagnostics -module-name REPL
1. while processing REPL source:
0 swift 0x0000000112d000f5 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1 swift 0x0000000112cff298 llvm::sys::RunSignalHandlers() + 248
2 swift 0x0000000112d00702 SignalHandler(int) + 258
3 libsystem_platform.dylib 0x00007fff61d1cb3d _sigtramp + 29
4 libsystem_platform.dylib 0x00007ffee05b3690 _sigtramp + 2122935152
5 libsystem_platform.dylib 0x0000000117839c7f _sigtramp + 3048329567
6 libsystem_platform.dylib 0x00000001177f7aea _sigtramp + 3048058826
7 libsystem_platform.dylib 0x00000001177f7c17 _sigtramp + 3048059127
8 libdyld.dylib 0x00007fff61b1dc1a dyld_stub_binder + 282
9 libswiftCore.dylib 0x0000000116761008 GCC_except_table1 + 43300
10 libswiftCore.dylib 0x000000011780bec6 GCC_except_table1 + 17520610
11 libswiftCore.dylib 0x00000001178070da GCC_except_table1 + 17500662
12 libswiftCore.dylib 0x0000000117806254 GCC_except_table1 + 17496944
13 libswiftCore.dylib 0x00000001178062e8 GCC_except_table1 + 17497092
14 libswiftCore.dylib 0x00000001177f8d20 GCC_except_table1 + 17442364
15 libswiftCore.dylib 0x000000011780275f GCC_except_table1 + 17481851
16 libdyld.dylib 0x00007fff61b1d62f dlopen + 200
17 swift 0x000000010f6bb9be loadRuntimeLib(llvm::StringRef) + 158
18 swift 0x000000010f6ba133 loadRuntimeLib(llvm::StringRef, llvm::StringRef) + 227
19 swift 0x000000010f6bdb2d REPLEnvironment::REPLEnvironment(swift::CompilerInstance&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, llvm::LLVMContext&, bool) + 1453
20 swift 0x000000010f6bbdca swift::runREPL(swift::CompilerInstance&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, bool) + 58
21 swift 0x000000010f696096 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 2902
22 swift 0x000000010f69494e swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2990
23 swift 0x000000010f643636 main + 662
24 libdyld.dylib 0x00007fff61b31ed9 start + 1
25 libdyld.dylib 0x0000000000000009 start + 2655838513
Killed: 9
Can somebody please help me get back to a working locally built swift and benchmarks in this brave new ABI-stable world? I must have missed the memo…