I tried to compile a pass source code in my MacOSX 10.8. I first had the problem that
iMac-de-Anne:pass_v1.2 elenacapel$ make
g++ src/pass.cpp -O9 -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DSHRIMP_BUGS=OFF -static -D NOSERVER -lpthread -o bin/pass
ld: library not found for -lcrt0.o
collect2: ld returned 1 exit status
make: *** [all] Error 1
But I could install the libraries missing by installing Xcode.
Now I have a different error while trying to compile the source code:
iMac-de-Anne:pass_v1.2 elenacapel$ make
g++ src/pass.cpp -O9 -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DSHRIMP_BUGS=OFF -static -D NOSERVER -lpthread -o bin/pass
error: invalid value '9' in '-O9'
make: *** [all] Error 1
Any helpful tips?
Related
I want to install LuaHPDF. But it gives an error as follows. The LuaHPDF link is https://github.com/jung-kurt/luahpdf.
When I apply in terminal
$make
The error is
cc -shared -fPIC -o hpdf.so hpdf.o -lhpdf -lz -lpng -lm
/usr/bin/ld: cannot find -lz: No such file or directory
/usr/bin/ld: cannot find -lpng: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [Makefile:45: hpdf.so] Error 1
Can anyone help me?
I install libharu as requested.
https://github.com/libharu/libharu/wiki/Installation#documentation-for-version-v230
Then I tried to install luaHPDF.
I am trying to build an executable file for Ubuntu machine for v8.
The following is the command executed :
g++ -g -ggdb -o Engine -lm *.o -Wl,--start-group /home/atdesk-83/v8/out/native/obj.target/{tools/gyp/libv8_{base,libbase,snapshot,libplatform},third_party/icu/libicu{uc,i18n,data}}.a -Wl,--end-group -lrt -pthread
I am receiving the error :
/home/atdesk-83/v8/out/native/obj.target/tools/gyp/libv8_base.a: error
adding symbols: Malformed archive collect2: error: ld returned 1 exit
status
Can anyone help to solve this?
I am trying to install FFTW on my mac with OpenMP enabled. I initially had trouble configuring, but that issue was solved here.
Now after configuring I type "make" and I get the following error:
libtool: compile: mpicc -DHAVE_CONFIG_H -I. -I.. -I../kernel -I../dft -I../rdft -I../api -I../tests -I../libbench2 -O3 -fomit-frame-pointer -mtune=native -malign-double -fstrict-aliasing -fno-schedule-insns -ffast-math -Wa,-q -Wl,-no_compact_unwind -MT any-true.lo -MD -MP -MF .deps/any-true.Tpo -c any-true.c -o any-true.o
clang: error: unknown argument: '-malign-double'
clang: warning: -Wl,-no_compact_unwind: 'linker' input unused
clang: error: unsupported argument '-q' to option 'Wa,'
clang: warning: optimization flag '-fno-schedule-insns' is not supported
make[3]: *** [any-true.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
What is the issue here and how can I solve it?
You could try passing the location of the gcc compiler its absolute path rather than the binary name, just as
CC=/usr/local/gcc-6.1.0/bin/gcc-6.1.0 ./configure --enable-mpi --enable-threads --enable-openmp
EDIT
After having a brief chat with OP, it looks like he omitted part of the error and the error came from the mpicc compiler used (due to --enable-mpi in the configure stage). According to the user, they were using OpenMPI and according to this FAQ the user can tune the C compiler by using the OMPI_CC environtment variable. So my suggestion was to build the FFTW library as
OMPI_CC=/usr/local/gcc-6.1.0/bin/gcc-6.1.0 make
I'm trying to install libevent-2.0.12-stable on Centos, but when i type sudo make,error happens(I did ./configure before make):
/bin/sh ./libtool --tag=CC --mode=link gcc -g -O2 -Wall -fno-strict-aliasing -pthread -version-info 6:1:1 -release 2.0 -o libevent.la -rpath /usr/local/libevent-2.0.12-stable/lib event.lo evthread.lo buffer.lo bufferevent.lo bufferevent_sock.lo bufferevent_filter.lo bufferevent_pair.lo listener.lo bufferevent_ratelim.lo evmap.lo log.lo evutil.lo evutil_rand.lo strlcpy.lo select.lo poll.lo epoll.lo signal.lo event_tagging.lo http.lo evdns.lo evrpc.lo -lrt
libtool: link: gcc -shared -fPIC -DPIC .libs/event.o .libs/evthread.o .libs/buffer.o .libs/bufferevent.o .libs/bufferevent_sock.o .libs/bufferevent_filter.o .libs/bufferevent_pair.o .libs/listener.o .libs/bufferevent_ratelim.o .libs/evmap.o .libs/log.o .libs/evutil.o .libs/evutil_rand.o .libs/strlcpy.o .libs/select.o .libs/poll.o .libs/epoll.o .libs/signal.o .libs/event_tagging.o .libs/http.o .libs/evdns.o .libs/evrpc.o -lrt -O2 -pthread -pthread -Wl,-soname -Wl,libevent-2.0.so.5 -o .libs/libevent-2.0.so.5.1.1
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/librt.a(clock_gettime.o): relocation R_X86_64_PC32 against undefined symbol `__errno_location##GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libevent.la] Error 1
make[2]: Leaving directory `/home/lpchou/software/httpsqs/libevent-2.0.12-stable'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/lpchou/software/httpsqs/libevent-2.0.12-stable'
make: *** [all] Error 2
Can anyone help? Thanks.
Update
After i install libevent successfully with rpm package as mentioned by #KnudLarsen, i try to install tokyocabinet using make, however same error happens:
/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libm.a(s_sin.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libm.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libtokyocabinet.so.9.10.0] Error 1
I tried methods in Recompiling with -fPIC, but doesn't work. It seems there lacks some dependent packages, for i just install libevent and tokyocabinet in another centos machine and everything works fine.
CentOS 6.8 - 64bits :
tokyocabinet-1.4.32 builds OK : libtokyocabinet.so.8.23.0, libtokyocabinet.a
tokyocabinet-1.4.48 is also OK : libtokyocabinet.so.9.11.0, libtokyocabinet.a
... So I guess you have to install / reinstall your build requirements for gcc :
yum reinstall gcc-c++ glibc-devel glibc-headers kernel-headers
... to have the right files /usr/lib64/ and /usr/include/.
? Which version of tokyocabinet are you trying to build ? And where did you get it ?
I am having pretty much the same problem as in this question
Undefined symbols argp_parse and arpg_usage when installing rng-tools on OSX
but it's a different project. It seems the problem was solved by linking in argp, which I installed with homebrew. However, I can't link it properly. This is the error, where you can see how I've tried to link argp-standalone with -L.
gcc -std=gnu99 -pedantic -Wall -Wextra -Wmissing-prototypes -DRESDIR=\"/usr/local/share/tsim\"
-g -O2 -L/usr/local/opt/argp-standalone/lib -L/usr/X11R6/lib -lXaw -lXt -lXmu -lX11 -lXext
-o tsim tsim-AddToggleWidget.o tsim-DialogPopup.o tsim-file.o tsim-resources.o tsim-timer.o
tsim-tsim.o tsim-bitmap.o tsim-DrawingPalette.o tsim-Graph.o tsim-sound.o tsim-train.o
tsim-BitmapDirectory.o tsim-errcheck.o tsim-pipe.o tsim-Sprite.o tsim-tsim_argp.o
Undefined symbols for architecture x86_64:
"_argp_parse", referenced from:
_parse in tsim-tsim_argp.o
"_argp_usage", referenced from:
_parse_opt in tsim-tsim_argp.o
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]: *** [tsim] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2