Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot build plyvel(ld: library not found for -lleveldb) #159

Open
superbag2010 opened this issue Feb 12, 2024 · 0 comments
Open

cannot build plyvel(ld: library not found for -lleveldb) #159

superbag2010 opened this issue Feb 12, 2024 · 0 comments

Comments

@superbag2010
Copy link

When I did "pip install plyvel", linker couldn't find lleveldb and failed to build leveldb. I checked/tried 1)/2)/3), but didn't work. could you give me any idea?(I worked on MAC 12.5 with M1 chip.)

  1. checking leveldb installed : following is brew install leveldb result.
    ==> Downloading https://formulae.brew.sh/api/formula.jws.json
    ##################################################################################################################################################################################################### 100.0%
    ==> Downloading https://formulae.brew.sh/api/cask.jws.json
    ##################################################################################################################################################################################################### 100.0%
    Warning: leveldb 1.23 is already installed and up-to-date.
    To reinstall 1.23, run:
    brew reinstall leveldb
  2. adding leveldb path to LD_LIBRARY_PATH : following is "echo $LD_LIBRARY_PATH" result.
    /usr/local/include/leveldb
  3. track lleveldb, but can't find anything : "sudo find / -name "lleveldb" 2>/dev/null" returned nothing.

Please note "pip install plyvel" result.
-------------------- "pip install plyvel" result ---------------------
Defaulting to user installation because normal site-packages is not writeable
Collecting plyvel
Using cached plyvel-1.5.1.tar.gz (200 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: plyvel
Building wheel for plyvel (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [38 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-3.9
creating build/lib.macosx-10.9-universal2-3.9/plyvel
copying plyvel/_version.py -> build/lib.macosx-10.9-universal2-3.9/plyvel
copying plyvel/init.py -> build/lib.macosx-10.9-universal2-3.9/plyvel
running build_ext
building 'plyvel._plyvel' extension
creating build/temp.macosx-10.9-universal2-3.9
creating build/temp.macosx-10.9-universal2-3.9/plyvel
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c plyvel/_plyvel.cpp -o build/temp.macosx-10.9-universal2-3.9/plyvel/_plyvel.o -Wall -g -x c++ -std=c++11 -stdlib=libc++
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c plyvel/comparator.cpp -o build/temp.macosx-10.9-universal2-3.9/plyvel/comparator.o -Wall -g -x c++ -std=c++11 -stdlib=libc++
plyvel/comparator.cpp:29:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
PyEval_InitThreads();
^
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
1 warning generated.
plyvel/comparator.cpp:29:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
PyEval_InitThreads();
^
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) attribute((deprecated))
^
1 warning generated.
clang++ -bundle -undefined dynamic_lookup -arch arm64 -arch x86_64 -Wl,-headerpad,0x1000 build/temp.macosx-10.9-universal2-3.9/plyvel/_plyvel.o build/temp.macosx-10.9-universal2-3.9/plyvel/comparator.o -lleveldb -o build/lib.macosx-10.9-universal2-3.9/plyvel/_plyvel.cpython-39-darwin.so
ld: library not found for -lleveldb
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang++' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for plyvel
Running setup.py clean for plyvel
Failed to build plyvel
ERROR: Could not build wheels for plyvel, which is required to install pyproject.toml-based projects
-------------------- "pip install plyvel" result ---------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant