I compiled my makefile for my C++ program on my Mac and it compiled just fine. I tried doing the same thing on my Linux machine with the exact same files and got:
/usr/bin/ld: cannot find -lc++abi
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [allocate-asan] Error 1
I do not know how I can go about compiling this on my linux machine with this error. Any ideas?
Related
I'm building a project from github (https://github.com/marsicoLab/PROmiRNA) and have the following requirements on my mac (Big Sur 11.4); gcc 9.4, cmake 3.21.1, R 4.1.0.
After using cmake, which runs without error, I use make however this gives me the below errors:
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
clang: note: diagnostic msg: Error generating preprocessed source(s).
make[2]: *** [CMakeFiles/PROmiRNA.dir/PROmiRNA.cpp.o] Error 254
make[1]: *** [CMakeFiles/PROmiRNA.dir/all] Error 2
make: *** [all] Error 2
A lot of other questions online with the same issue refer to XCode but I don't have it installed and am not a developer myself so don't think I need it..?
If anyone has any suggestions I'd really appreciate it, thanks :)
I cloned the latest version of the Poco libraries source code on to my Mac and attempted to build it per the instructions using CMake. Everything proceeded fine until it reached a point where it was trying to link the libPocoCrypt.dylib library. Even though the C++ compilation worked with out error, the link resulted in the following output
ld: cannot link directly with dylib/framework, your binary is not an allowed client of /usr/lib/libcrypto.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libPocoCrypto.80.dylib] Error 1
make[1]: *** [Crypto/CMakeFiles/Crypto.dir/all] Error 2
make: *** [all] Error 2
Doing some research, I discovered that Apple doesn't want applications linking against its libcrypto library and thus, the resulting error messages. The question then is, what do I need to do here to make this work?
I am following the instructions in the most popular answer to the post here and when I attempt to run
make TOOLCHAIN=i386-elf- qemu
it refuses to run giving me the following error...
***
*** Error: Couldn't find an i386-*-elf version of GCC/binutils.
*** Is the directory with i386-jos-elf-gcc in your PATH?
*** If your i386-*-elf toolchain is installed with a command
*** prefix other than 'i386-jos-elf-', set your TOOLPREFIX
*** environment variable to that prefix and run 'make' again.
*** To turn off this error, run 'gmake TOOLPREFIX= ...'.
***
gcc -m32 -gdwarf-2 -Wa,-divide -c -o usys.o usys.S
clang: error: unsupported argument '-divide' to option 'Wa,'
make: *** [usys.o] Error 1
I am unsure how to resolve this and unsure where to find the texinfo that the person was refering to in their answer to the linked post. I am also unsure where i386 installed itself. I am aware that I am omitting the -nox command from the command line instruction, but I tried that as well. We have setup a window manager for xv6 that works properly and I was wanting to be able to run it on my machine but cannot get it to work.
Thanks for any help!
When I try to build Artery on Ubuntu 16.04. the following happens after invoking
$ cmake --build /home/hardt/Veins/artery-master/build
[ 23%] Linking CXX shared library libartery.so
/usr/bin/ld: /usr/local/lib/libvanetza_btp.a(data_request.cpp.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared
object; recompile with -fPIC
/usr/local/lib/libvanetza_btp.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
src/artery/CMakeFiles/artery.dir/build.make:954: recipe for target'src/artery/libartery.so' failed
make[2]: *** [src/artery/libartery.so] Error 1
CMakeFiles/Makefile2:229: recipe for target 'src/artery/CMakeFiles/artery.dir/all' failed
make[1]: *** [src/artery/CMakeFiles/artery.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
As I am not all that familiar with building source on Unix systems I am not quite sure how to deal with this error.
I am using cmake version 3.9.3, boost 1.65.1 and crypto++ 5.6.4 the geographiclib built without error as well.
As one can read in the comments, the problem is solved.
The path to the vanetza directory VANETZA_DIR in the cmake configuration was wrong. Correcting this via ccmake solved the problem.
I've been trying to compile truecrypt 7.1a on Debian Jessie 8.1.0 AMD64 for the past two days now. I have wxGTK2.8.12 source because Debian Jessie only have v3.0 packages. That's a problem because wxwidgets3.0 has protected wxstandardpaths so you have to use wxstandardpaths::get and truecrypt uses wxstandardpaths in application.cpp for example and it would return an error while compiling.
I'm not sure how to fix that so I went to option 2 compile wxgtk2.8.12 source using the truecrypt compile option # make WX_ROOT=/usr/src/truecrypt-7.1a-source/wxGTK-2.8.12 wxbuild. That completes then I do # make WXSTATIC=1 and I run into this error below. Even if I compile and install wxwidgets-2.8.12 myself I get this error. Maybe it's a x11lib issue?
^
Linking truecrypt
/usr/bin/ld:
/usr/src/truecrypt-7.1a-source/wxrelease/lib/libwx_gtk2u_core-2.8.a(corelib_utilsx11.o): undefined reference to symbol 'XGetWindowAttributes'
//usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO
missing from command line collect2: error: ld returned 1 exit status
Main.make:107: recipe for target 'truecrypt' failed make[1]: ***
[truecrypt] Error 1 Makefile:268: recipe for target 'all' failed make:
*** [all] Error 2