ld: library not found for -lclangRewrite - c++

The following error occurs when I am building eos using cmake on macOS.
ld: library not found for -lclangRewrite
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [programs/abi_gen/abi_gen] Error 1
make[1]: *** [programs/abi_gen/CMakeFiles/abi_gen.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 74%] Built target eos_chain
make: *** [all] Error 2
I find some related issues, but they are seemingly all about ios and xcode and I don't know what I should do in a project like eos. How can I fix it?

I meet the same 2 errors when building from source code of EOS step by step.
Alternatively You can use another method by running the script(https://github.com/EOSIO/eos#automac):
./build.sh darwin

Related

cross compiling protocol buffers for arm

I am new to Google's protocol buffers and I am having trouble with cross-compiling it for arm. I am not able to find any concrete solutions to my problem using google.
The steps I am following:
./autogen.sh
./configure
make -s && make install
./configure --host=arm-linux-gnueabi CC=arm-linux-gnueabi-gcc --prefix=/opt/poky/1.7/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/ --with-protoc=/usr/local/bin/protoc
make
I get an error when I run make.
google/protobuf/stubs/common.cc:55:2: error: #error "No suitable threading library available."
#error "No suitable threading library available."
^
Makefile:3956: recipe for target 'google/protobuf/stubs/common.lo' failed
make[2]: *** [google/protobuf/stubs/common.lo] Error 1
make[2]: Leaving directory '/home/protobuf/protobuf/src'
Makefile:1544: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/protobuf/protobuf'
Makefile:1451: recipe for target 'all' failed
make: *** [all] Error 2
Any help would be much appreciated.

Cross compilation with clang

I am attempting to cross compile a program from an x86_64 linux machine to arm 64-bit (aarch64) format. The file that I am attempting to cross-compile uses OpenCV. I am able to successfully cross-compile programs that don't include external libraries, but when I include OpenCV I get the following error:
/usr/local/lib/libopencv_shape.so.3.2.0: error adding symbols: File in wrong format
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [helloworld] Error 1
make[1]: *** [CMakeFiles/helloworld.dir/all] Error 2
make: *** [all] Error 2
Any help would be much appreciated!

Undefined reference when compiling library with clang

I'm trying to build the libdepixelize library , but I'm getting the following error:
[100%] Linking CXX executable depixelize-kopf2011
/usr/bin/ld: /usr/local/lib/lib2geom.a(nearest-point.o): undefined reference to symbol '_ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv##GLIBCXX_3.4.21'
//usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/depixelize-kopf2011/CMakeFiles/depixelize-kopf2011.dir/build.make:95: recipe for target 'src/depixelize-kopf2011/depixelize-kopf2011' failed
make[2]: *** [src/depixelize-kopf2011/depixelize-kopf2011] Error 1
CMakeFiles/Makefile2:142: recipe for target 'src/depixelize-kopf2011/CMakeFiles/depixelize-kopf2011.dir/all' failed
make[1]: *** [src/depixelize-kopf2011/CMakeFiles/depixelize-kopf2011.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
I'm using clang with libstdc++ as compiler. GCC didn't work either.
EDIT: I used this in the CMakeLists file: set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++") and then did cmake -DCMAKE_CXX_COMPILER="clang++" .. and make to compile it. The full log is here: https://hastebin.com/axasololuc.js
I have no idea what exactly it means, or even how to fix it.

Build of Julia fails on OS X with llvm-config error

I have been trying to build Julia the whole day in MacOS Sierra. Finally after sorting out a lot of problems I'm stuck at this.
/bin/sh: llvm-config: command not found
make[1]: llvm-config: Command not found
make[1]: llvm-config: Command not found
make[1]: llvm-config: Command not found
make[1]: llvm-config: Command not found
make[1]: llvm-config: Command not found
make[1]: llvm-config: Command not found
make[1]: llvm-config: Command not found
CC src/APInt-C.o
In file included from /Users/sudoankit/github/julia/src/APInt-C.cpp:3:
./llvm-version.h:3:10: fatal error: 'llvm/Config/llvm-config.h' file not found
#include <llvm/Config/llvm-config.h>
^
1 error generated.
make[1]: *** [APInt-C.o] Error 1
make: *** [julia-src-release] Error 2
I have updated everything and also installed llvm using brew.
Please tell me how to fix it.

make "sumo 0.17.1" on ubuntu 13.10

I installed and tested v0.19.1 successfully before, however, I needed to downgrade to 0.17.1 in order to run some example in omnetpp's veins simulator.
Whenever I run the "make" command, I get the following error:
/usr/bin/ld: ./utils/foxtools/libfoxtools.a(MFXMutex.o): undefined reference to symbol 'pthread_mutexattr_settype##GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [sumo-gui] Error 1
make[3]: Leaving directory `/home/maamoun/pkgs/sumo-0.17.1/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/maamoun/pkgs/sumo-0.17.1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/maamoun/pkgs/sumo-0.17.1/src'
make: *** [all-recursive] Error 1
What am I missing?!
Problem solved, had to install libproj-dev and include proj in the ./configure using the --with-proj-includes=DIR
[EDIT] after 15 minutes of making, same error raised again!!!