genome / bam-readcount

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

Compilation fails because of missing -fPIC #75

Closed SethosII closed 3 years ago

SethosII commented 3 years ago

I tried to build the new release but it fails. It succeeds with -fPIC:

$ mkdir build
$ cd build
$ cmake ..
$ make -j
...
/dev/shm/bam-readcount-1.0.0/build/vendor/mbedtls/lib/libmbedcrypto.a(poly1305.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
$ make clean
$ export CFLAGS="-fPIC"
$ make -j
apldx commented 3 years ago

Can you provide more platform information? We'd like to keep a record of build issues.

SethosII commented 3 years ago

@apldx I used Ubuntu 20.04 with the GCC 10.3.0 toolchain from EasyBuild.

I did more testing and it works with the packages from the Ubuntu repositories. It seems to be related to their binutils version (binutils/2.36.1-GCCcore-10.3.0). Building works without it so it seems to be an issue there.