Installation error LuaHPDF while installing - makefile

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.

Related

Buildroot | ninja build error | /usr/bin/ld:error adding symbols: file in wrong format

While building casync using ninja build I am facing below errors related to /usr/bin/ld: . . .error adding symbols: file in wrong format
I am following casync build guideline from systemd/casync
ninja: Entering directory `build'
[1/23] Linking target casync-http
FAILED: casync-http
cc -o casync-http casync-http.p/src_casync-http.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib -Wl,--start-group src/libshared.a /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcurl.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so -lm -Wl,--end-group
/usr/bin/ld: /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcurl.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
[2/23] Linking target test-cadigest
FAILED: test-cadigest
cc -o test-cadigest test-cadigest.p/test_test-cadigest.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib -Wl,--start-group src/libshared.a -lacl /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libselinux.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so -lm /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so -Wl,--end-group -pthread
/usr/bin/ld: /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
[3/23] Linking target test-cachunker
FAILED: test-cachunker
cc -o test-cachunker test-cachunker.p/test_test-cachunker.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib -Wl,--start-group src/libshared.a -lacl /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libselinux.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so -lm /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so -Wl,--end-group -pthread
/usr/bin/ld: /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
[4/23] Linking target test-cachunker-histogram
FAILED: test-cachunker-histogram
cc -o test-cachunker-histogram test-cachunker-histogram.p/test_test-cachunker-histogram.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-rpath,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib -Wl,-rpath-link,/root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib -Wl,--start-group src/libshared.a -lacl /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libselinux.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libz.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libzstd.so -lm /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libssl.so /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libcrypto.so -Wl,--end-group -pthread
/usr/bin/ld: /root/raspcm4/sources/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/liblzma.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
[5/23] Linking target test-cachunk
.
.
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
I am using Buildroot as build system and after following similar post in libstdc++.so: error adding symbols: File in wrong format I changed the PATH environment like:
/root/raspcm4/sources/output/host/bin/:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/raspcm4/sources/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/bin
But still I end up getting same errors
Can anyone please let me know how to resolve this issue?
Your help will be much appreciated.
Thanks in advance
P.S: Please let me know if any info is missing here

/usr/bin/ld: cannot find -lhdf5_hl

I'm trying to compile caffe, While running make all command, I have got this linking error:
LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/usr/bin/ld: cannot find -lhdf5_hl
/usr/bin/ld: cannot find -lhdf5
collect2: error: ld returned 1 exit status
Makefile:566: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1
How can I fix this issue?
In your Makefile.config change the following:
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial
Please note that the path may vary depending on your OS.

make[2]: *** [libevent.la] Error 1

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 ?

Openl2tp make on CentOS

Im trying to install openl2tp on CentOS.I have downloaded the source from here but when i try to run make it gives me the following error
gin.o l2tp_event.o l2tp_test.o md5.o l2tp_api.o l2tp_rpc_server.o l2tp_rpc_xdr.o l2tp_config_token.o l2tp_config_parse.o -Wl,-E -L. -Lusl -lusl -ldl -lc -lfl
/usr/bin/ld: cannot find -lfl
collect2: ld returned 1 exit status
make: *** [openl2tpd] Error 1
can someone guide me what im doing wrong...
Regards
libfl is from the flex package. Try installing flex-devel.

source code compiling error on MacOsX 10.8

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?

Resources