clang linking error : unable to find library -lclang_rt.builtins-arm.a - clang

I am trying to build ChibiOS using clang , but currently i am stuck at below linking error.
Linking build/ch.elf
clang-7: warning: argument unused during compilation: '-nostartfiles' [-Wunused-command-line-argument]
/home/quest/clang_build/clang_all/build/bin/ld.lld: error: unable to find library -lclang_rt.builtins-arm.a
clang-7: error: ld.lld command failed with exit code 1 (use -v to see invocation)
../../../os/common/startup/ARMCMx/compilers/LLVM/mk/rules.mk:208: recipe for target 'build/ch.elf' failed
make: *** [build/ch.elf] Error 1
I did downloaded the lib and provided the path in makefile but still its not picked up (ldd might be looking at a specific path for this).
Any help on this ?

Related

ld: library not found for -ltcl8.6 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am trying to use the make command to build yosys, but at 89% complete I get the following error:
ld: library not found for -ltcl8.6
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [yosys] Error 1
.I have seen similar posts and the answers often talk about linking libraries with binaries or something of that sort but don't provide a process to fix it.
I am relatively new to computers and so I am not sure what it means to link libraries and binaries. Does anyone know exactly how to go about troubleshooting and fixing this issue?

ld: archive has no table of contents file error with homebrew

I'm trying to compile weechat,
%> brew upgrade weechat --debug
...
[ 86%] Built target weechat_gui_curses_normal
[ 87%] Building C object src/gui/curses/normal/CMakeFiles/weechat.dir/main.o
[ 87%] Linking C executable weechat
ld: archive has no table of contents file '../../../plugins/libweechat_plugins.a' for architecture x86_64
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
make[2]: *** [src/gui/curses/normal/weechat] Error 254
make[1]: *** [src/gui/curses/normal/CMakeFiles/weechat.dir/all] Error 2
make: *** [all] Error 2
bash-3.2$ exit
It fails with archive has no table of contents file for architecture x86_64, it seem to be a generic error, as it happens with mysql#5.5 and many other packages.
I also see ranlib errors
/usr/local/homebrew/bin/ranlib: libweechat_gui_curses_normal.a(gui-curses-term.o): unknown load command 0x32
Any ideas?
Resolved.
Simple do brew unlink binutils or specify RANLIB=/usr/bin/ranlib.

make linking static libc not dynamic

I am trying to build an open source library (openCV in this case) from source using cmake and make. However, I run into a linking error
Linking CXX shared library ../../lib/libopencv_videoio.so
/usr/bin/ld: /usr/local/lib/libc.a(lib_a-mallocr.o): relocation R_X86_64_32S against `__malloc_av_' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libc.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libopencv_videoio.so.3.0.0] Error 1
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make: *** [all] Error 2
From what I gather, this means make is using the static version of glibc libc.a instead of the dynamic lib.so.6. I'm assuming I need to change a path somewhere in cmake but I'm unsure of where to look. Any help is appreciated.
edit: I'm doing this on a 64 bit linux mint machine

caffe installation error linker error lib/libcaffe.dylib Error and src/caffe/CMakeFiles/caffe.dir/all Error

I have been trying to install caffe on my mac OSX 10.9.5.
I have been following the official caffe installation from http://caffe.berkeleyvision.org/installation.html#compilation.
When I am following the cmake installation's "make all" in build folder, I keep on getting the following linking error. I have been trying many possible suggestions that I have found on the web but to no avail.
Any suggestion is appreciated. Thank you in advance.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libcaffe.dylib] Error 1
make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
make: *** [all] Error 2
The full error log is at https://github.com/jackywang529/myOpenCV/blob/master/OpenCV/OpenCVTutorial2/errorLog
Thank you
After upgrading from CUDA6.5 to CUDA7.0, the "make all" step completed successfully. I also made sure that I removed the edits that I had made to the formulas, which were necessary when I was using CUDA6.5. Such edits is described in (http://caffe.berkeleyvision.org/install_osx.html under section libstdc++ installation).
Good luck with all caffe users!

Flipswitch packaging error... Theos

I'm trying to make a Flipswitch package for my Cydia tweak. I have all headers in their appropriate directories, as well as, the Makefile edited.
My problem is that I keep getting a:
ld: library not found for -lflipswitch
clang: error: linker command failed with exit code 1
error!?!?
I have researched the devwiki, Ryan Petrich examples and a3tweaks examples. Regardless of what example (even the basic template), I keep getting the error. Any ideas?
TIA
Here's the full process during 'make package.' My test Flipswitch is called 'stop test.'
/Users/appleimac/Documents/stoptest/theos/makefiles/targets/Darwin/iphone.mk:49: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Making all for bundle stoptest...
Copying resource directories into the bundle wrapper...
Linking bundle stoptest (armv7)...
ld: library not found for -lflipswitch
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [.theos/obj/armv7/stoptest.bundle/stoptest] Error 1
make[2]: *** [.theos/obj/armv7/stoptest.bundle/stoptest] Error 2
make[1]: *** [internal-bundle-all_] Error 2
make: *** [stoptest.all.bundle.variables] Error 2
You are missing the library. See this section of the devwiki to fix this.

Resources