genome / bam-readcount

Count bases in BAM/CRAM files
MIT License
298 stars 95 forks source link

Compilation Issue #102

Open KevinYie opened 2 years ago

KevinYie commented 2 years ago

I get the following error message when compiling: /usr/bin/ld: /gpfs/share/apps/bam-readcount/1.0.1/bam-readcount/build/vendor/mbedtls/lib/libmbedcrypto.a(timing.o): relocation R_X86_64_32 against .text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /gpfs/share/apps/bam-readcount/1.0.1/bam-readcount/build/vendor/mbedtls/lib/libmbedcrypto.a(aes.o): relocation R_X86_64_32 against.bss' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /gpfs/share/apps/bam-readcount/1.0.1/bam-readcount/build/vendor/mbedtls/lib/libmbedcrypto.a(arc4.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /gpfs/share/apps/bam-readcount/1.0.1/bam-readcount/build/vendor/mbedtls/lib/libmbedcrypto.a(base64.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /gpfs/share/apps/bam-readcount/1.0.1/bam-readcount/build/vendor/mbedtls/lib/libmbedcrypto.a(blowfish.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /gpfs/share/apps/bam-readcount/1.0.1/bam-readcount/build/vendor/mbedtls/lib/libmbedcrypto.a(camellia.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /gpfs/share/apps/bam-readcount/1.0.1/bam-readcount/build/vendor/mbedtls/lib/libmbedcrypto.a(ccm.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /gpfs/share/apps/bam-readcount/1.0.1/bam-readcount/build/vendor/mbedtls/lib/libmbedcrypto.a(chacha20.o): relocation R_X86_64_32 against.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /gpfs/share/apps/bam-readcount/1.0.1/bam-readcount/build/vendor/mbedtls/lib/libmbedcrypto.a(chachapoly.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /gpfs/share/apps/bam-readcount/1.0.1/bam-readcount/build/vendor/mbedtls/lib/libmbedcrypto.a(ecdsa.o): relocation R_X86_64_32S against symbolmbedtls_hmac_drbg_random' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /gpfs/share/apps/bam-readcount/1.0.1/bam-readcount/build/vendor/mbedtls/lib/libmbedcrypto.a(hmac_drbg.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /gpfs/share/apps/bam-readcount/1.0.1/bam-readcount/build/vendor/mbedtls/lib/libmbedcrypto.a(pkcs5.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /gpfs/share/apps/bam-readcount/1.0.1/bam-readcount/build/vendor/mbedtls/lib/libmbedcrypto.a(poly1305.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status make[5]: [libcurl.la] Error 1 make[4]: [all] Error 2 make[3]: [all-recursive] Error 1 make[2]: [vendor/src/curl-stamp/curl-build] Error 2 make[1]: [CMakeFiles/curl.dir/all] Error 2 make: [all] Error 2

Adding -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC to cmake didn't seem to help the issue.

I'd appreciate any help on this!

swbujnowski commented 2 years ago

I also get the following error when trying to run the "make" command: /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedtls.a(ssl_ciphersuites.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedtls.a(ssl_tls.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedtls.a(debug.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedtls.a(ssl_cli.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedtls.a(ssl_srv.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedx509.a(x509_crl.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedx509.a(x509_crt.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedx509.a(x509.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(bignum.o): relocation R_X86_64_32S against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(cipher.o): relocation R_X86_64_32 against undefined symbolmbedtls_cipher_supported' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(ctr_drbg.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(des.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(dhm.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(ecp.o): relocation R_X86_64_32 against.rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(ecp_curves.o): relocation R_X86_64_32S against .data' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(entropy.o): relocation R_X86_64_32S against symbolmbedtls_platform_entropy_poll' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(entropy_poll.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(error.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(gcm.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(md.o): relocation R_X86_64_32 against.rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(md5.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(oid.o): relocation R_X86_64_32 against.rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(pk.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(pk_wrap.o): relocation R_X86_64_32S against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(pkparse.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(pkwrite.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(ripemd160.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(rsa.o): relocation R_X86_64_32 against.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(sha1.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(sha256.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(sha512.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(timing.o): relocation R_X86_64_32 against.text' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(aes.o): relocation R_X86_64_32 against .bss' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(arc4.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(base64.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(blowfish.o): relocation R_X86_64_32S against.rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(camellia.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(ccm.o): relocation R_X86_64_32 against.rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(chacha20.o): relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(chachapoly.o): relocation R_X86_64_32 against.rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(ecdsa.o): relocation R_X86_64_32S against symbol mbedtls_hmac_drbg_random' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(hmac_drbg.o): relocation R_X86_64_32 against.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(pkcs5.o): relocation R_X86_64_32S against .rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: /risapps/build7/bam-readcount-master/build/vendor/mbedtls/lib/libmbedcrypto.a(poly1305.o): relocation R_X86_64_32 against.rodata' can not be used when making a shared object; recompile with -fPIC /bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status make[5]: [libcurl.la] Error 1 make[4]: [all] Error 2 make[3]: [all-recursive] Error 1 make[2]: [vendor/src/curl-stamp/curl-build] Error 2 make[1]: [CMakeFiles/curl.dir/all] Error 2 make: [all] Error 2

Please let me know what I can do to resolve this!

alaminzju commented 1 year ago

I have used the following command and it solved my problem. conda create -n sratools -c bioconda sra-tools conda activate sratools

SoManyPepople commented 1 year ago

I have used the following command and it solved my problem. conda create -n sratools -c bioconda sra-tools conda activate sratools

It worked well for me! thx!