When I ran pip install . I first got an error saying:
Could not build wheels for bottleneck which use PEP 517 and cannot be installed directly
I found this StackOverflow thread where they proposed to downgrade pip to 18.1. Indeed this solved the above error however another one occurs:
[100%] Linking CXX shared module ../../../lib.linux-x86_64-3.7/bifrost_python.cpython-37m-x86_64-linux-gnu.so
/usr/bin/ld: ../../vendor/bifrost/src/libbifrost.a(BitContainer.cpp.o): relocation R_X86_64_PC32 against symbol `_ZTISt13runtime_error@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[3]: [src/bifrost_python/CMakeFiles/bifrost_python.dir/build.make:225: ../lib.linux-x86_64-3.7/bifrost_python.cpython-37m-x86_64-linux-gnu.so] Error 1
make[2]: [CMakeFiles/Makefile2:1120: src/bifrost_python/CMakeFiles/bifrost_python.dir/all] Error 2
make[1]: [CMakeFiles/Makefile2:1127: src/bifrost_python/CMakeFiles/bifrost_python.dir/rule] Error 2
make: [Makefile:597: bifrost_python] Error 2
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-req-build-wpp92io0/setup.py", line 91, in
zip_safe=False,
File "/tmp/pip-build-env-01cv2jwf/lib/python3.7/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/rickb/anaconda3/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/rickb/anaconda3/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/rickb/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-01cv2jwf/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 290, in run
self.run_command('build')
File "/home/rickb/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/rickb/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/rickb/anaconda3/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/rickb/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/rickb/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-wpp92io0/setup.py", line 36, in run
self.build_extension(ext)
File "/tmp/pip-req-build-wpp92io0/setup.py", line 67, in build_extension
cwd=self.build_temp)
File "/home/rickb/anaconda3/lib/python3.7/subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'bifrost_python', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
It seems to be related to recompile with -fPIC. Notably, I got this exact same error on another machine and both with and without anaconda. Any suggestions on how to fix this?
Full log:
Processing /home/rickb/tools/pyfrost/pyfrost
Installing build dependencies ... done
Building wheels for collected packages: pyfrost
Running setup.py bdist_wheel for pyfrost ... error
Complete output from command /home/rickb/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-wpp92io0/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-vp74o6cn --python-tag cp37:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/pyfrost
copying src/pyfrost/graph.py -> build/lib.linux-x86_64-3.7/pyfrost
copying src/pyfrost/__init__.py -> build/lib.linux-x86_64-3.7/pyfrost
copying src/pyfrost/views.py -> build/lib.linux-x86_64-3.7/pyfrost
copying src/pyfrost/seq.py -> build/lib.linux-x86_64-3.7/pyfrost
copying src/pyfrost/io.py -> build/lib.linux-x86_64-3.7/pyfrost
copying src/pyfrost/counter.py -> build/lib.linux-x86_64-3.7/pyfrost
copying src/pyfrost/_version.py -> build/lib.linux-x86_64-3.7/pyfrost
creating build/lib.linux-x86_64-3.7/pyfrost/viz
copying src/pyfrost/viz/__init__.py -> build/lib.linux-x86_64-3.7/pyfrost/viz
copying src/pyfrost/viz/dot.py -> build/lib.linux-x86_64-3.7/pyfrost/viz
running egg_info
creating src/pyfrost.egg-info
writing src/pyfrost.egg-info/PKG-INFO
writing dependency_links to src/pyfrost.egg-info/dependency_links.txt
writing top-level names to src/pyfrost.egg-info/top_level.txt
writing manifest file 'src/pyfrost.egg-info/SOURCES.txt'
reading manifest file 'src/pyfrost.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.h' under directory 'tests'
writing manifest file 'src/pyfrost.egg-info/SOURCES.txt'
UPDATING build/lib.linux-x86_64-3.7/pyfrost/_version.py
set build/lib.linux-x86_64-3.7/pyfrost/_version.py to '0.1.0a3+23.g2af0fe9'
running build_ext
-- The CXX compiler identification is GNU 9.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The C compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
Maximum k-mer size: 31
Compilation architecture: native
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Found PythonInterp: /home/rickb/anaconda3/bin/python (found version "3.7.3")
-- Found PythonLibs: /home/rickb/anaconda3/lib/libpython3.7m.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.5.0
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-req-build-wpp92io0/build/temp.linux-x86_64-3.7
Scanning dependencies of target bifrost_static
[ 4%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/Bifrost.cpp.o
[ 8%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/BitContainer.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/Bifrost.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 12%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/BlockedBloomFilter.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 16%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/ColorSet.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColorSet.hpp:6,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColorSet.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 20%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/CompressedCoverage.cpp.o
[ 24%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/CompressedSequence.cpp.o
[ 28%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/FASTX_Parser.cpp.o
[ 32%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/GFA_Parser.cpp.o
[ 36%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/Kmer.cpp.o
[ 40%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/KmerIterator.cpp.o
[ 44%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/MinimizerIndex.cpp.o
[ 48%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/TinyBitmap.cpp.o
[ 52%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/UnitigMap.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/UnitigMap.tcc:4,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/UnitigMap.hpp:336,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/UnitigMap.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 56%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/roaring.cpp.o
[ 60%] Linking CXX static library libbifrost.a
[ 60%] Built target bifrost_static
Scanning dependencies of target bifrost_python
[ 64%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/Kmer.cpp.o
[ 68%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/KmerCounter.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/UnitigDataDict.h:5,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Kmer.h:7,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Kmer.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Pyfrost.h:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/KmerCounter.h:18,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/KmerCounter.cpp:7:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 72%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/UnitigColors.cpp.o
[ 76%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/UnitigDataProxy.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Pyfrost.h:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/UnitigColors.h:4,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/UnitigColors.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Pyfrost.h:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/UnitigDataProxy.h:6,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/UnitigDataProxy.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 80%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/AdjacencyProxy.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/NeighborIterator.tcc:4,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/NeighborIterator.hpp:198,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/AdjacencyProxy.h:5,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/AdjacencyProxy.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 84%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/NodeView.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Pyfrost.h:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/NodeView.h:5,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/NodeView.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 88%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/EdgeView.cpp.o
[ 92%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/BifrostDiGraph.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Pyfrost.h:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/BifrostDiGraph.h:5,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/EdgeView.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Pyfrost.h:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/UnitigDataProxy.h:6,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/DegreeView.h:6,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/BifrostDiGraph.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 96%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/bifrost_python.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Pyfrost.h:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/bifrost_python.cpp:4:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[100%] Linking CXX shared module ../../../lib.linux-x86_64-3.7/bifrost_python.cpython-37m-x86_64-linux-gnu.so
/usr/bin/ld: ../../vendor/bifrost/src/libbifrost.a(BitContainer.cpp.o): relocation R_X86_64_PC32 against symbol `_ZTISt13runtime_error@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[3]: *** [src/bifrost_python/CMakeFiles/bifrost_python.dir/build.make:225: ../lib.linux-x86_64-3.7/bifrost_python.cpython-37m-x86_64-linux-gnu.so] Error 1
make[2]: *** [CMakeFiles/Makefile2:1120: src/bifrost_python/CMakeFiles/bifrost_python.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1127: src/bifrost_python/CMakeFiles/bifrost_python.dir/rule] Error 2
make: *** [Makefile:597: bifrost_python] Error 2
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-wpp92io0/setup.py", line 91, in <module>
zip_safe=False,
File "/tmp/pip-build-env-01cv2jwf/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/rickb/anaconda3/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/rickb/anaconda3/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/rickb/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-01cv2jwf/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 290, in run
self.run_command('build')
File "/home/rickb/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/rickb/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/rickb/anaconda3/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/rickb/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/rickb/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-wpp92io0/setup.py", line 36, in run
self.build_extension(ext)
File "/tmp/pip-req-build-wpp92io0/setup.py", line 67, in build_extension
cwd=self.build_temp)
File "/home/rickb/anaconda3/lib/python3.7/subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'bifrost_python', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
----------------------------------------
Failed building wheel for pyfrost
Running setup.py clean for pyfrost
Failed to build pyfrost
Installing collected packages: pyfrost
Running setup.py install for pyfrost ... error
Complete output from command /home/rickb/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-wpp92io0/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-lezygw8e/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/pyfrost
copying src/pyfrost/graph.py -> build/lib.linux-x86_64-3.7/pyfrost
copying src/pyfrost/__init__.py -> build/lib.linux-x86_64-3.7/pyfrost
copying src/pyfrost/views.py -> build/lib.linux-x86_64-3.7/pyfrost
copying src/pyfrost/seq.py -> build/lib.linux-x86_64-3.7/pyfrost
copying src/pyfrost/io.py -> build/lib.linux-x86_64-3.7/pyfrost
copying src/pyfrost/counter.py -> build/lib.linux-x86_64-3.7/pyfrost
copying src/pyfrost/_version.py -> build/lib.linux-x86_64-3.7/pyfrost
creating build/lib.linux-x86_64-3.7/pyfrost/viz
copying src/pyfrost/viz/__init__.py -> build/lib.linux-x86_64-3.7/pyfrost/viz
copying src/pyfrost/viz/dot.py -> build/lib.linux-x86_64-3.7/pyfrost/viz
running egg_info
writing src/pyfrost.egg-info/PKG-INFO
writing dependency_links to src/pyfrost.egg-info/dependency_links.txt
writing top-level names to src/pyfrost.egg-info/top_level.txt
reading manifest file 'src/pyfrost.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.h' under directory 'tests'
writing manifest file 'src/pyfrost.egg-info/SOURCES.txt'
UPDATING build/lib.linux-x86_64-3.7/pyfrost/_version.py
set build/lib.linux-x86_64-3.7/pyfrost/_version.py to '0.1.0a3+23.g2af0fe9'
running build_ext
-- The CXX compiler identification is GNU 9.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The C compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
Maximum k-mer size: 31
Compilation architecture: native
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Found PythonInterp: /home/rickb/anaconda3/bin/python (found version "3.7.3")
-- Found PythonLibs: /home/rickb/anaconda3/lib/libpython3.7m.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.5.0
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-req-build-wpp92io0/build/temp.linux-x86_64-3.7
Scanning dependencies of target bifrost_static
[ 4%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/Bifrost.cpp.o
[ 8%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/BitContainer.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/Bifrost.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 12%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/BlockedBloomFilter.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 16%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/ColorSet.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColorSet.hpp:6,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColorSet.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 20%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/CompressedCoverage.cpp.o
[ 24%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/CompressedSequence.cpp.o
[ 28%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/FASTX_Parser.cpp.o
[ 32%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/GFA_Parser.cpp.o
[ 36%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/Kmer.cpp.o
[ 40%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/KmerIterator.cpp.o
[ 44%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/MinimizerIndex.cpp.o
[ 48%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/TinyBitmap.cpp.o
[ 52%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/UnitigMap.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/UnitigMap.tcc:4,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/UnitigMap.hpp:336,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/UnitigMap.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 56%] Building CXX object vendor/bifrost/src/CMakeFiles/bifrost_static.dir/roaring.cpp.o
[ 60%] Linking CXX static library libbifrost.a
[ 60%] Built target bifrost_static
Scanning dependencies of target bifrost_python
[ 64%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/Kmer.cpp.o
[ 68%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/KmerCounter.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/UnitigDataDict.h:5,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Kmer.h:7,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Kmer.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Pyfrost.h:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/KmerCounter.h:18,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/KmerCounter.cpp:7:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 72%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/UnitigColors.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Pyfrost.h:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/UnitigColors.h:4,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/UnitigColors.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 76%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/UnitigDataProxy.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Pyfrost.h:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/UnitigDataProxy.h:6,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/UnitigDataProxy.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 80%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/AdjacencyProxy.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/NeighborIterator.tcc:4,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/NeighborIterator.hpp:198,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/AdjacencyProxy.h:5,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/AdjacencyProxy.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 84%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/NodeView.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Pyfrost.h:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/NodeView.h:5,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/NodeView.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 88%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/EdgeView.cpp.o
[ 92%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/BifrostDiGraph.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Pyfrost.h:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/BifrostDiGraph.h:5,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/EdgeView.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Pyfrost.h:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/UnitigDataProxy.h:6,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/DegreeView.h:6,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/BifrostDiGraph.cpp:1:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[ 96%] Building CXX object src/bifrost_python/CMakeFiles/bifrost_python.dir/bifrost_python.cpp.o
In file included from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/CompactedDBG.hpp:24,
from /tmp/pip-req-build-wpp92io0/vendor/bifrost/src/ColoredCDBG.hpp:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/Pyfrost.h:9,
from /tmp/pip-req-build-wpp92io0/src/bifrost_python/bifrost_python.cpp:4:
/tmp/pip-req-build-wpp92io0/vendor/bifrost/src/BlockedBloomFilter.hpp:27:7: warning: ‘BlockedBloomFilter’ has a field ‘BlockedBloomFilter::fast_div_’ whose type uses the anonymous namespace [-Wsubobject-linkage]
27 | class BlockedBloomFilter {
| ^~~~~~~~~~~~~~~~~~
[100%] Linking CXX shared module ../../../lib.linux-x86_64-3.7/bifrost_python.cpython-37m-x86_64-linux-gnu.so
/usr/bin/ld: ../../vendor/bifrost/src/libbifrost.a(BitContainer.cpp.o): relocation R_X86_64_PC32 against symbol `_ZTISt13runtime_error@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[3]: *** [src/bifrost_python/CMakeFiles/bifrost_python.dir/build.make:225: ../lib.linux-x86_64-3.7/bifrost_python.cpython-37m-x86_64-linux-gnu.so] Error 1
make[2]: *** [CMakeFiles/Makefile2:1120: src/bifrost_python/CMakeFiles/bifrost_python.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1127: src/bifrost_python/CMakeFiles/bifrost_python.dir/rule] Error 2
make: *** [Makefile:597: bifrost_python] Error 2
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-wpp92io0/setup.py", line 91, in <module>
zip_safe=False,
File "/tmp/pip-build-env-01cv2jwf/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/rickb/anaconda3/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/rickb/anaconda3/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/rickb/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-build-env-01cv2jwf/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/home/rickb/anaconda3/lib/python3.7/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/home/rickb/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/rickb/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/rickb/anaconda3/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/rickb/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/rickb/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-req-build-wpp92io0/setup.py", line 36, in run
self.build_extension(ext)
File "/tmp/pip-req-build-wpp92io0/setup.py", line 67, in build_extension
cwd=self.build_temp)
File "/home/rickb/anaconda3/lib/python3.7/subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'bifrost_python', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2.
----------------------------------------
Command "/home/rickb/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-wpp92io0/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-lezygw8e/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-req-build-wpp92io0/
When I ran
pip install .
I first got an error saying:I found this StackOverflow thread where they proposed to downgrade pip to
18.1
. Indeed this solved the above error however another one occurs:It seems to be related to
recompile with -fPIC
. Notably, I got this exact same error on another machine and both with and without anaconda. Any suggestions on how to fix this?Full log: