Re:Linker issues for libssw on armel, mips64el and mipsel

"Peter Ji" <[email protected]>
Newsgroups gmane.linux.debian.devel.mentors,gmane.linux.debian.ports.mips,gmane.linux.debian.ports.arm
Message-ID <[email protected]>
Hi,I think you linked  the library  libssw.a befor compiling,see The target sequence:



loongson@debian:~/workspace/test/libssw/libssw-1.1/src$ make -n

g++  -fPIC -shared -rdynamic -Wl,-soname,libssw.so.0 -o libssw.so.0 ssw.c ssw.h ssw_cpp.h ssw_cpp.cpp 

cc   -o ssw-align main.c kseq.h -L. -lssw -lm -lz 

cc -c -o ssw.o ssw.c  

cc -o example_c ssw.o example.c   -lm -lz 

g++ -c -o ssw_cpp.o ssw_cpp.cpp  

g++ -o example_cpp example.cpp ssw.o ssw_cpp.o   -lm -lz 

ar rcs libssw.a ssw.o ssw_cpp.o


in line 33 of the  ./src/Makefile,Modified like this may be better:
33:$(PROG): main.c kseq.h $(LIB) $(STATICLIB)
The target sequence after :
loongson@debian:~/workspace/test/libssw/libssw-1.1/src$ make -n
g++   -fPIC -shared -rdynamic -Wl,-soname,libssw.so.0 -o libssw.so.0 ssw.c ssw.h ssw_cpp.h ssw_cpp.cpp 
cc -c -o ssw.o ssw.c  
g++ -c -o ssw_cpp.o ssw_cpp.cpp  
ar rcs libssw.a ssw.o ssw_cpp.o
cc   -o ssw-align main.c kseq.h -L. -lssw -lm -lz 
cc -o example_c ssw.o example.c   -lm -lz 
g++ -o example_cpp example.cpp ssw.o ssw_cpp.o   -lm -lz 


Hoping to help


Peter Ji




At 2020-08-12 15:33:31, "Andreas Tille" <[email protected]> wrote:
>Hi,
>
>while the package libssw builds nicely on most architectures on armel,
>mips64el and mipsel there is a linking issue[1]:
>
>...
>c -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -I"/include" -I"/include/linux" -I/usr/lib/jvm/default-java/include/  -I/usr/lib/jvm/default-java/include/linux -fPIC -shared -rdynamic -o libsswjni.so sswjni.c ssw.c -Wl,-z,relro -Wl,-z,now
>cc -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3 -o ssw-align main.c kseq.h -L. -lssw -lm -lz -Wl,-z,relro -Wl,-z,now
>/usr/bin/ld: cannot find -lssw
>...
>
>(same on some non-released architectures).
>
>Any idea how to fix this?
>
>Kind regards
>
>       Andreas.
>
>
>[1] https://buildd.debian.org/status/package.php?p=libssw
>
>-- 
>http://fam-tille.de
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.