edlib: edlib installation fails in conda python if gcc not installed

I’m not posting an issue per say, but more of a config problem if others run into it they can find this. But I’m on Mac, running miniconda2, if you try to install edlib without first installing gcc via condo you get a compilation error. conda install gcc fixes this.

pip install edlib --no-cache-dir
Collecting edlib
  Downloading edlib-1.2.1.tar.gz (48kB)
    100% |████████████████████████████████| 51kB 982kB/s 
Installing collected packages: edlib
  Running setup.py install for edlib ... error
    Complete output from command /Users/ngs/miniconda2/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/4m/ldg9z2hs2kgbf6x926xjzsf40000gn/T/pip-build-6z_1B5/edlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/4m/ldg9z2hs2kgbf6x926xjzsf40000gn/T/pip-EI0aTL-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'edlib' extension
    creating build
    creating build/temp.macosx-10.7-x86_64-2.7
    creating build/temp.macosx-10.7-x86_64-2.7/edlib
    creating build/temp.macosx-10.7-x86_64-2.7/edlib/src
    gcc -fno-strict-aliasing -I/Users/ngs/miniconda2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Iedlib/include -I/Users/ngs/miniconda2/include/python2.7 -c edlib.bycython.cpp -o build/temp.macosx-10.7-x86_64-2.7/edlib.bycython.o -O3 -std=c++11
    gcc -fno-strict-aliasing -I/Users/ngs/miniconda2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Iedlib/include -I/Users/ngs/miniconda2/include/python2.7 -c edlib/src/edlib.cpp -o build/temp.macosx-10.7-x86_64-2.7/edlib/src/edlib.o -O3 -std=c++11
    edlib/src/edlib.cpp:90:10: error: fields must have a constant size: 'variable length array in structure' extension will never be supported
        bool matrix[std::numeric_limits<unsigned char>::max() + 1][std::numeric_limits<unsigned char>::max() + 1];
             ^
    edlib/src/edlib.cpp:90:10: warning: private field 'matrix' is not used [-Wunused-private-field]
    1 warning and 1 error generated.
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------
Command "/Users/ngs/miniconda2/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/4m/ldg9z2hs2kgbf6x926xjzsf40000gn/T/pip-build-6z_1B5/edlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/4m/ldg9z2hs2kgbf6x926xjzsf40000gn/T/pip-EI0aTL-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/4m/ldg9z2hs2kgbf6x926xjzsf40000gn/T/pip-build-6z_1B5/edlib/

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 2
  • Comments: 21 (9 by maintainers)

Most upvoted comments

Oh, I didn’t even see this, cool that it’s instantly useful 😃.

@mbargull @mvdbeek thanks, looks like it is working. Now I need to spend some time learning the conda recipes so I can make install of my tools easier.

$ conda install python-edlib
Fetching package metadata ...................
Solving package specifications: .

Package plan for installation in environment /Users/jon/miniconda2:

The following NEW packages will be INSTALLED:

    python-edlib: 1.2.3-py27_0 bioconda

Proceed ([y]/n)? y

python-edlib-1 100% |##########################################################################################################################################################| Time: 0:00:00 680.03 kB/s

Wow awesome, thanks @mvdbeek and @mbargull! You are super quick/responsive 😃.

@mvdbeek already took the initiative: https://github.com/bioconda/bioconda-recipes/pull/7709. @nextgenusfs: you should be able to install the Python package with conda install python-edlib (in a couple of minutes).

Ah, I see, thanks for the feedback @nextgenusfs. So it looks like the Bioconda recipe only includes Edlib itself but not the Python wrapper. That’s no problem at all, we can also add the Python part on Bioconda.

@Martinsos: Would you say that the Python wrapper is something that the user base expects to always come alongside an Edlib installation? If you think the Python wrapper is generally used/expected, we can add it to the edlib package itself. If not, it could make sense on Bioconda to rather create a separate package, e.g., called python-edlib. That way one could install only Edlib via conda install edlib but also use conda install python-edlib to install both, Edlib as well as its Python wrapper, if needed.