I download the source code of asterisk on my macbook pro, which the OS X version is 10.9 ,then following the README.txt to compile it, but it failed ,and then I tried almost all the release version, but all the compiled results are the same, the compile error is as following,please help me to check it ,and how can I compile it on Mavericks; Appreciate!
ranlib libmxml.a gcc -o menuselect menuselect.o strcompat.o
menuselect_stub.o mxml/libmxml.a Generating input for menuselect
... menuselect/menuselect --check-deps menuselect.makeopts
menuselect/menuselect --check-deps menuselect.makeopts
Generating embedded module rules ...
[CC] stereorize.c ->
stereorize.o error: invalid value '6' in '-O6' make[1]: *
[stereorize.o] Error 1 make: [utils] Error 2
"-O4" nor "-O3" work...
sh-3.2# make ASTCFLAGS="-O4" [LD] chan_iax2.o iax2-parser.o iax2-provision.o -> chan_iax2.so
ld: lto: could not merge in
iax2-parser.o because 'Linking globals named 'ast_tvdiff_sec': symbol
multiply defined!', using libLTO version 'LLVM version 3.3svn, from
Apple Clang 5.0 (build 500.2.79)' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: * [chan_iax2.so] Error 1
make: * [channels] Error 2
Related
I am a level -1 C++ programmer and this is my first program running c++ and I'm trying to run hello world in C++ but when I run ''myfirstprogram.cpp'' after compiling it.
CLion gives error
it can't run the .cpp file because it can't build it for some reason can someone help me?
I already have Xcode installed and command line tools.
in preferences CLion detected Xcode automatically.
gcc, cc and c++ is already correctly installed.
mehmetalibayram#MacBook-Pro-van-Mehmet ~> whereis gcc
/usr/bin/gcc
mehmetalibayram#MacBook-Pro-van-Mehmet ~> whereis cc
/usr/bin/cc
mehmetalibayram#MacBook-Pro-van-Mehmet ~> whereis g++
/usr/bin/g++
mehmetalibayram#MacBook-Pro-van-Mehmet ~>
/Applications/Jetbrains/CLion.app/Contents/bin/cmake/mac/bin/cmake --build "/Users/mehmetalibayram/OneDrive/CLion/cpp/cmake-build-debug" --target cpp -- -j 12
[ 33%] Linking CXX executable cpp
duplicate symbol '_main' in:
CMakeFiles/cpp.dir/main.cpp.o
CMakeFiles/cpp.dir/myfirstprogram/myfirstprogram.cpp.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [CMakeFiles/cpp.dir/build.make:119: cpp] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:96: CMakeFiles/cpp.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:103: CMakeFiles/cpp.dir/rule] Error 2
gmake: *** [Makefile:138: cpp] Error 2
what did I do wrong, can someone help me please?
A function needs to be uniquely identifiable. In our case you have two functions with the same name, main, to be specific. Make sure that you have a single main function (which will be the entry point, by the way), so rename the other function to something else and call it from your main.
I tried to install the Ipopt package on my Mac (macOS Catalina, 10.15.0) following this installation guide:
https://coin-or.github.io/Ipopt/INSTALL.html
I installed ASL as the linear solver and made it to the point 3. makewithout any further issues. However, when I run make test, I receive the following error message:
cd test; /Applications/Xcode.app/Contents/Developer/usr/bin/make test
CXX hs071_main.o
CXX hs071_nlp.o
CXXLD hs071_cpp
CC hs071_c.o
CCLD hs071_c
ln -s ../examples/hs071_f/hs071_f.f hs071_f.f
F77 hs071_f.o
F77LD hs071_f
ld: library not found for -lmkl_core
collect2: error: ld returned 1 exit status
make[1]: *** [hs071_f] Error 1
make: *** [unitTest] Error 2
Does anyone know how to fix this issue? It seems like it can't find the mkl library...
Yes, you have to install the Intel MKL library https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl.html since it is not part of Mac OS.
I'm currently learning cpp and have installed the Eclipse IDE on Mac OSX. When I renamed the file HelloWorld.cpp into Chapter01.cpp, the compiler is showing me this error:
Building target: Hello World
Invoking: MacOS X C++ Linker
g++ -o "Hello World" ./src/Chapter01.o
ld: can't link with a main executable file './src/Chapter01.o' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Hello World] Error 1
"make all" terminated with exit code 2. Build might be incomplete.
please let me know how I can fix it, thanks!
I am trying to run a project that was made and works for Ubuntu but on Mac OS. And when I am doing the make I got the following error:
ld: library not found for -lrt
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [consumer] Error 1
make[1]: *** [CMakeFiles/consumer.dir/all] Error 2
make: *** [all] Error 2
I can't see any library with that name at thole project.
Can anyone explain what it is and how to solve it?
On old Linux systems, several functions, such as clock_gettime, are documented to need -lrt for old versions of GNU libc. This is no more the case on recent glibc (after 2.17 from 2013).
So you can remove -lrt from your Makefile (and remove the thing from your cmake configuration thing generating it).
BTW, removing -lrt should also fit for recent Linux distributions.
PS. If you are paying support for your Linux system, you should ask your support for advice.
I was trying to compile libQGLViewer in OS X Yosemite but after executing make the following error appears
ld: library not found for -lGLU
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [/Users/MyUser/Library/Frameworks/QGLViewer.framework/QGLViewer] Error 1
make: *** [sub-QGLViewer-make_first-ordered] Error 2
I found that there is a library called libGLU.1.dylib under /usr/X11/lib but I have no idea on where to add that line in order to compile correctly the library. Moreover, I don't know if it is the right library that the compilation is asking for.
Any thoughts?
It was easy to solve the problem by simply removing the following line
QMAKE_LIBS_OPENGL *= -lGLU
from all the .pro files in libQGLViewer