You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.
Yeah...I was having some issue with the libleveldb dependency back when I created this.
The solution for the package manager was to add a specific linker flag like this.
The root cause of this was that the package manager used pkgconfig to locate the libraries, but LevelDB didn't seem to have this info configured correctly.
If you can also add this flag in Xcode build settings, it should work.
Not sure if it is possible to fix it at the package level to enable all build systems to simply build it without any specific linker flags.
I will take a look when I have time. Thanks for the feedback.
Well, yeah, it was kinda my bad, I was tuning the root project settings, not package project settings (noob, yep), until then Xcode simply refused to locate lib and header files. Linker flags in Xcode made it work as well as for swift build command. I made a build.sh script with linker flags as a temporary shortcut solution to build project from CLI.
Probably we all (members of Swift community who faced this problem) should push LevelDB team to make proper pkgconfig.
Ld /Users/myuser/Library/Developer/Xcode/DerivedData/LevelDB-awlmerkqkqbiichfdutjwnukdmzg/Build/Products/Debug/LevelDB.framework/Versions/A/LevelDB normal x86_64
cd /Users/myuser/projects/Packages/LevelDB
export MACOSX_DEPLOYMENT_TARGET=10.10
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -dynamiclib -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -L/Users/myuser/Library/Developer/Xcode/DerivedData/LevelDB-awlmerkqkqbiichfdutjwnukdmzg/Build/Products/Debug -F/Users/myuser/Library/Developer/Xcode/DerivedData/LevelDB-awlmerkqkqbiichfdutjwnukdmzg/Build/Products/Debug -F/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -filelist /Users/myuser/Library/Developer/Xcode/DerivedData/LevelDB-awlmerkqkqbiichfdutjwnukdmzg/Build/Intermediates.noindex/LevelDB.build/Debug/LevelDB.build/Objects-normal/x86_64/LevelDB.LinkFileList -install_name @rpath/LevelDB.framework/Versions/A/LevelDB -Xlinker -rpath -Xlinker /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx -mmacosx-version-min=10.10 -Xlinker -object_path_lto -Xlinker /Users/myuser/Library/Developer/Xcode/DerivedData/LevelDB-awlmerkqkqbiichfdutjwnukdmzg/Build/Intermediates.noindex/LevelDB.build/Debug/LevelDB.build/Objects-normal/x86_64/LevelDB_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-link-runtime -L/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx -Xlinker -add_ast_path -Xlinker /Users/myuser/Library/Developer/Xcode/DerivedData/LevelDB-awlmerkqkqbiichfdutjwnukdmzg/Build/Intermediates.noindex/LevelDB.build/Debug/LevelDB.build/Objects-normal/x86_64/LevelDB.swiftmodule -single_module -Xlinker -dependency_info -Xlinker /Users/myuser/Library/Developer/Xcode/DerivedData/LevelDB-awlmerkqkqbiichfdutjwnukdmzg/Build/Intermediates.noindex/LevelDB.build/Debug/LevelDB.build/Objects-normal/x86_64/LevelDB_dependency_info.dat -o /Users/myuser/Library/Developer/Xcode/DerivedData/LevelDB-awlmerkqkqbiichfdutjwnukdmzg/Build/Products/Debug/LevelDB.framework/Versions/A/LevelDB
ld: library not found for -lleveldb for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I DO have LevelDB installed in system (via HomeBrew), macOS Sierra, Xcode 8.3.3 and Xcode 9 Beta.
The text was updated successfully, but these errors were encountered: