Rosemeis / pcangsd

Framework for analyzing low depth NGS data in heterogeneous populations using PCA.
GNU General Public License v3.0
46 stars 11 forks source link

build failure when installing with conda #80

Open NadyaMamoozadeh opened 10 months ago

NadyaMamoozadeh commented 10 months ago

I ran conda env create -f environment.yml and got this environment:

Name Version Build Channel

_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
blas 1.0 mkl
bzip2 1.0.8 h7b6447c_0
ca-certificates 2023.08.22 h06a4308_0
cython 3.0.0 py312h5eee18b_0
expat 2.5.0 h6a678d5_0
intel-openmp 2023.1.0 hdb19cb5_46305
ld_impl_linux-64 2.38 h1181459_1
libffi 3.4.4 h6a678d5_0
libgcc-ng 11.2.0 h1234567_1
libgfortran-ng 11.2.0 h00389a5_1
libgfortran5 11.2.0 h1234567_1
libgomp 11.2.0 h1234567_1
libstdcxx-ng 11.2.0 h1234567_1
libuuid 1.41.5 h5eee18b_0
mkl 2023.1.0 h213fc3f_46343
mkl-service 2.4.0 py312h5eee18b_1
ncurses 6.4 h6a678d5_0
numpy 1.26.0 py312hc5e2394_0
numpy-base 1.26.0 py312h0da6c21_0
openssl 3.0.12 h7f8727e_0
pip 23.3 py312h06a4308_0
python 3.12.0 h996f2a0_0
readline 8.2 h5eee18b_0
scipy 1.11.3 py312hc5e2394_0
setuptools 68.0.0 py312h06a4308_0
sqlite 3.41.2 h5eee18b_0
tbb 2021.8.0 hdb19cb5_0
tk 8.6.12 h1ccaba5_0
tzdata 2023c h04d1e81_0
wheel 0.41.2 py312h06a4308_0
xz 5.4.2 h5eee18b_0
zlib 1.2.13 h5eee18b_0

When I then ran pip3 install . I got an error:

building 'pcangsd.shared_cy' extension gcc -pthread -B /mnt/home/mamooz/software/miniconda3/envs/pcangsd/compiler_compat -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /mnt/home/mamooz/software/miniconda3/envs/pcangsd/include -fPIC -O2 -isystem /mnt/home/mamooz/software/miniconda3/envs/pcangsd/include -fPIC -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -I/tmp/pip-build-env-mvsc13_x/overlay/lib/python3.12/site-packages/numpy/core/include -I/tmp/pip-build-env-mvsc13_x/overlay/lib/python3.12/site-packages/numpy/core/include -I/mnt/home/mamooz/software/miniconda3/envs/pcangsd/include/python3.12 -c pcangsd/shared_cy.c -o build/temp.linux-x86_64-cpython-312/pcangsd/shared_cy.o -fopenmp -g0 -Wno-unreachable-code In file included from pcangsd/shared_cy.c:31567:0: /mnt/home/mamooz/software/miniconda3/envs/pcangsd/include/python3.12/internal/pycore_frame.h: In function ‘_PyFrame_Initialize’: /mnt/home/mamooz/software/miniconda3/envs/pcangsd/include/python3.12/internal/pycore_frame.h:132:5: error: ‘for’ loop initial declarations are only allowed in C99 mode for (int i = null_locals_from; i < code->co_nlocalsplus; i++) { ^ /mnt/home/mamooz/software/miniconda3/envs/pcangsd/include/python3.12/internal/pycore_frame.h:132:5: note: use option -std=c99 or -std=gnu99 to compile your code error: command '/usr/bin/gcc' failed with exit code 1 [end of output]

Is there a way to fix this?

Rosemeis commented 10 months ago

Hi,

It seems that you may have a very old gcc compiler on your system. Is there a way for you to upgrade or through conda perhaps?

Best, Jonas