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

"error: command 'gcc' failed with exit status 1"; building setup.py #75

Open
quinn-ca opened this issue Feb 9, 2023 · 0 comments
Open

Comments

@quinn-ca
Copy link

quinn-ca commented Feb 9, 2023

I'm working in a conda virtual environment (remote linux server) where I've installed python 2.7. I followed the instructions for installing FastStructure, including:

  1. Installed dependencies (using cython 0.27.3)
  2. Installed FastStructure: git clone https://github.com/rajanil/fastStructure
  3. Added gcc to my .bashrc file

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/scarvey/miniconda3/envs/python2.7_venv/lib
export CFLAGS="-I/home/scarvey/miniconda3/envs/python2.7_venv/include/gsl"
export LDFLAGS="-L/home/scarvey/miniconda3/envs/python2.7_venv/lib"

  1. Ran: source ~/.bashrc
  2. Successfully (seemingly at least) ran python setup.py build_ext -f --inplace in the fastStructure directory
  3. cd into the vars directory and ran: python setup.py build_ext -f --inplace (tried with and without the -f flag)

Code ran until I encountered the error:

gcc -pthread -B /home/scarvey/miniconda3/envs/python2.7_venv/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/home/scarvey/miniconda3/envs/python2.7_venv/bin -fPIC -I/home/scarvey/miniconda3/envs/python2.7_venv/lib/python2.7/site-packages/numpy/core/include -I. -I/home/scarvey/miniconda3/envs/python2.7_venv/include/python2.7 -c C_allelefreq.c -o build/temp.linux-x86_64-2.7/C_allelefreq.o -O3
C_allelefreq.c:7:28: fatal error: gsl/gsl_sf_psi.h: No such file or directory
 #include <gsl/gsl_sf_psi.h>
                            ^
compilation terminated.
error: command 'gcc' failed with exit status 1

I confirmed the file 'gsl_sf_psi.h' is saved in the directory I added to my .bashrc file (export CFLAGS="-I/home/scarvey/miniconda3/envs/python2.7_venv/include/gsl"), so I'm not sure why it isn't finding this.

There are a lot of helpful resources for installing FastStructure and I seem to have exhausted the current tips for getting this to work and greatly appreciate any help!

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

1 participant