Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link error occurred in running ./setup.sh <install_path> #114

Open
zhangzhen opened this issue Feb 14, 2025 · 1 comment
Open

link error occurred in running ./setup.sh <install_path> #114

zhangzhen opened this issue Feb 14, 2025 · 1 comment

Comments

@zhangzhen
Copy link

GCC 10.4.0 was used in compilation.

Several link errors happened in compilation of HTSLIB as follows:

gcc -Wall -I/dshare/home/zhangz/NanoSeq/include -D HAVE_LIBDEFLATE -fvisibility=hidden -I.  -c -o hts.o hts.c
gcc -shared -Wl,-soname,libhts.so.3 -L/dshare/home/zhangz/NanoSeq/lib -fvisibility=hidden  -o libhts.so kfunc.pico kstring.pico bcf_sr_sort.pico bgzf.pico errmod.pico faidx.pico header.pico hfile.pico hts.pico hts_expr.pico hts_os.pico md5.pico multipart.pico probaln.pico realn.pico regidx.pico region.pico sam.pico synced_bcf_reader.pico vcf_sweep.pico tbx.pico textutils.pico thread_pool.pico vcf.pico vcfutils.pico cram/cram_codecs.pico cram/cram_decode.pico cram/cram_encode.pico cram/cram_external.pico cram/cram_index.pico cram/cram_io.pico cram/cram_stats.pico cram/mFILE.pico cram/open_trace_file.pico cram/pooled_alloc.pico cram/string_alloc.pico htscodecs/htscodecs/arith_dynamic.pico htscodecs/htscodecs/fqzcomp_qual.pico htscodecs/htscodecs/htscodecs.pico htscodecs/htscodecs/pack.pico htscodecs/htscodecs/rANS_static4x16pr.pico htscodecs/htscodecs/rANS_static.pico htscodecs/htscodecs/rle.pico htscodecs/htscodecs/tokenise_name3.pico hfile_libcurl.pico hfile_gcs.pico hfile_s3.pico hfile_s3_write.pico -llzma -lbz2 -lz -lm -l:libdeflate.a  -lcurl -lcrypto -lpthread
gcc -L/dshare/home/zhangz/NanoSeq/lib -fvisibility=hidden  -o test/hts_endian test/hts_endian.o -llzma -lbz2 -lz -lm -l:libdeflate.a  -lcurl -lcrypto
gcc -L/dshare/home/zhangz/NanoSeq/lib -fvisibility=hidden  -o test/plugins-dlhts test/plugins-dlhts.o -llzma -lbz2 -lz -lm -l:libdeflate.a  -lcurl -lcrypto
/usr/bin/ld: /dshare/home/zhangz/NanoSeq/lib/libdeflate.a(deflate_decompress.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /dshare/home/zhangz/NanoSeq/lib/libdeflate.a(deflate_compress.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /dshare/home/zhangz/NanoSeq/lib/libdeflate.a(crc32.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC

Any help is appreciated to solve this problem!

@fa8sanger
Copy link
Collaborator

I am not sure. The error message suggests using option -fPIC.
In addition, I would try to download htslib myself and install it myself, just to make sure it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants