cannot find -lstdc++
See original GitHub issueHi,
I’m on a system without root rights, so I’m tring to setup my local environment. It is a centos 7 linux, I built julia from src which installed llvm as dependency
the llvm files are installed in /home/epifanio/dev/julia/usr/lib/
llvm-config is:
which llvm-config
~/dev/julia/usr/bin/llvm-config
llvm-config --cxxflags
-I/home/epifanio/dev/julia/usr/include -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3 -fomit-frame-pointer -std=c++11 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fPIC -ffunction-sections -fdata-sections -Wcast-qual
llvm-config --ldflags
-L/home/epifanio/dev/julia/usr/lib
llvm-config --version
3.7.1
I’m tring to build llvmlite but it fails with this error log:
python setup.py build
running build
got version from VCS {'version': '0.11.0.dev+6.gc329287', 'full': 'c3292876a5fb404205afee3febec3f3999417339'}
running build_ext
/usr/bin/python /home/epifanio/dev/llvmlite/ffi/build.py
LLVM version... 3.7.1
# static-libstdc++ avoids runtime dependencies on a
# particular libstdc++ version.
g++ -static-libstdc++ -shared -I/home/epifanio/dev/julia/usr/include -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3 -fomit-frame-pointer -std=c++11 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fPIC -ffunction-sections -fdata-sections -Wcast-qual -fno-rtti -g -flto assembly.cpp bitcode.cpp core.cpp initfini.cpp module.cpp value.cpp executionengine.cpp transforms.cpp passmanagers.cpp targets.cpp dylib.cpp linker.cpp -o libllvmlite.so -L/home/epifanio/dev/julia/usr/lib -flto -Wl,--exclude-libs=ALL -lLLVMLTO -lLLVMObjCARCOpts -lLLVMLinker -lLLVMBitWriter -lLLVMIRReader -lLLVMMIRParser -lLLVMAsmParser -lLLVMLibDriver -lLLVMOption -lLLVMDebugInfoPDB -lLLVMTableGen -lLLVMOrcJIT -lLLVMPasses -lLLVMipo -lLLVMVectorize -lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86Desc -lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMMCJIT -lLLVMDebugInfoDWARF -lLLVMLineEditor -lLLVMInterpreter -lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMInstCombine -lLLVMInstrumentation -lLLVMTransformUtils -lLLVMipa -lLLVMMC -lLLVMAnalysis -lLLVMCore -lLLVMSupport -lz -ldl -lm
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
make: *** [libllvmlite.so] Error 1
Traceback (most recent call last):
File "/home/epifanio/dev/llvmlite/ffi/build.py", line 141, in <module>
main()
File "/home/epifanio/dev/llvmlite/ffi/build.py", line 131, in main
main_posix('linux', '.so')
File "/home/epifanio/dev/llvmlite/ffi/build.py", line 123, in main_posix
subprocess.check_call(['make', '-f', makefile])
File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-f', 'Makefile.linux']' returned non-zero exit status 2
error: command '/usr/bin/python' failed with exit status 1
Have you any clue on what I’m missing?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Matlab Kalman /usr/bin/ld: cannot find -lstdc++ - Stack Overflow
Matlab Kalman /usr/bin/ld: cannot find -lstdc++ ... I found that the command: sudo yum install libstdc++-static libstdc++-static.i686 is ...
Read more >make - cannot find -lstdc++ - Ask Ubuntu
I'm trying to use make but I keep getting this error. Tried make clean, updating cpp and some other stuff. cc1plus: warning: command...
Read more >cannot find -lstdc++ when building examples #17 - GitHub
when building examples with the script below BAZEL_LINKOPTS=-static-libstdc++ CC=mpicxx bazel build example/... an error is raised Use ...
Read more >[SOLVED] /bin/ld: cannot find -lstdc++ CHECKMK - Linux Forum
Solution: First thought is have you run "yum install g++"?Right after you have unpacked/unziped/exploded tar ball that you downloaded....1.
Read more >usr/bin/ld: cannot find -lstdc++ - Unix Stack Exchange
I've listed two work arounds (use a supported OS, or use a container) already, and hinted at a third (basically, recompile the libraries ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

If I recall correctly, I had to install libstdc+±static on fedora to get it to work.
@pitrou thanks for the suggestion. I will try to use same gcc, on a debian machine i had no problems in having numba llvmlite and datashader working properly. I’ll tray that way first.