Hi,
I'm failing the installation in both approaches.
I have g++ version 7.5.0 and CMake version 3.23.0
pip install gtn
gives:
Collecting gtn
Using cached gtn-0.0.1.tar.gz (14 kB)
Building wheels for collected packages: gtn
Building wheel for gtn (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/pyp/miniconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-p97r2dzi/gtn/setup.py'"'"'; __file__='"'"'/tmp/pip-install-p97r2dzi/gtn/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-7wzo73o6
cwd: /tmp/pip-install-p97r2dzi/gtn/
Complete output (49 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/gtn
copying src/bindings/python/gtn/__init__.py -> build/lib.linux-x86_64-3.8/gtn
creating build/lib.linux-x86_64-3.8/gtn/criterion
copying src/bindings/python/gtn/criterion/__init__.py -> build/lib.linux-x86_64-3.8/gtn/criterion
running build_ext
CMake Warning:
Ignoring extra path from command line:
"/tmp/pip-install-p97r2dzi/gtn/src"
CMake Error: The source directory "/tmp/pip-install-p97r2dzi/gtn/src" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-p97r2dzi/gtn/setup.py", line 100, in <module>
setup(
File "/home/pyp/miniconda3/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/pyp/miniconda3/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/pyp/miniconda3/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/pyp/miniconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/pyp/miniconda3/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 290, in run
self.run_command('build')
File "/home/pyp/miniconda3/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/pyp/miniconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/pyp/miniconda3/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/pyp/miniconda3/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/pyp/miniconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-p97r2dzi/gtn/setup.py", line 53, in run
self.build_extension(ext)
File "/tmp/pip-install-p97r2dzi/gtn/setup.py", line 92, in build_extension
subprocess.check_call(
File "/home/pyp/miniconda3/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-p97r2dzi/gtn/src', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-p97r2dzi/gtn/build/lib.linux-x86_64-3.8/gtn/', '-DPYTHON_EXECUTABLE=/home/pyp/miniconda3/bin/python', '-DPROJECT_SOURCE_DIR=/tmp/pip-install-p97r2dzi/gtn/src', '-DGTN_BUILD_PYTHON_BINDINGS=ON', '-DGTN_BUILD_EXAMPLES=OFF', '-DGTN_BUILD_BENCHMARKS=OFF', '-DGTN_BUILD_TESTS=OFF', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for gtn
Running setup.py clean for gtn
Failed to build gtn
Installing collected packages: gtn
Running setup.py install for gtn ... error
ERROR: Command errored out with exit status 1:
command: /home/pyp/miniconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-p97r2dzi/gtn/setup.py'"'"'; __file__='"'"'/tmp/pip-install-p97r2dzi/gtn/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-3jz66vin/install-record.txt --single-version-externally-managed --compile --install-headers /home/pyp/miniconda3/include/python3.8/gtn
cwd: /tmp/pip-install-p97r2dzi/gtn/
Complete output (51 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/gtn
copying src/bindings/python/gtn/__init__.py -> build/lib.linux-x86_64-3.8/gtn
creating build/lib.linux-x86_64-3.8/gtn/criterion
copying src/bindings/python/gtn/criterion/__init__.py -> build/lib.linux-x86_64-3.8/gtn/criterion
running build_ext
CMake Warning:
Ignoring extra path from command line:
"/tmp/pip-install-p97r2dzi/gtn/src"
CMake Error: The source directory "/tmp/pip-install-p97r2dzi/gtn/src" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-p97r2dzi/gtn/setup.py", line 100, in <module>
setup(
File "/home/pyp/miniconda3/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/pyp/miniconda3/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/pyp/miniconda3/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/pyp/miniconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/pyp/miniconda3/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/home/pyp/miniconda3/lib/python3.8/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/home/pyp/miniconda3/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/pyp/miniconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/pyp/miniconda3/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/pyp/miniconda3/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/pyp/miniconda3/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-p97r2dzi/gtn/setup.py", line 53, in run
self.build_extension(ext)
File "/tmp/pip-install-p97r2dzi/gtn/setup.py", line 92, in build_extension
subprocess.check_call(
File "/home/pyp/miniconda3/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-p97r2dzi/gtn/src', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-p97r2dzi/gtn/build/lib.linux-x86_64-3.8/gtn/', '-DPYTHON_EXECUTABLE=/home/pyp/miniconda3/bin/python', '-DPROJECT_SOURCE_DIR=/tmp/pip-install-p97r2dzi/gtn/src', '-DGTN_BUILD_PYTHON_BINDINGS=ON', '-DGTN_BUILD_EXAMPLES=OFF', '-DGTN_BUILD_BENCHMARKS=OFF', '-DGTN_BUILD_TESTS=OFF', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /home/pyp/miniconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-p97r2dzi/gtn/setup.py'"'"'; __file__='"'"'/tmp/pip-install-p97r2dzi/gtn/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-3jz66vin/install-record.txt --single-version-externally-managed --compile --install-headers /home/pyp/miniconda3/include/python3.8/gtn Check the logs for full command output.
When build from source, running make -j 8
gives:
[ 1%] Building CXX object CMakeFiles/gtn.dir/gtn/autograd.cpp.o
[ 3%] Building CXX object CMakeFiles/gtn.dir/gtn/cpu/creations.cpp.o
[ 5%] Building CXX object CMakeFiles/gtn.dir/gtn/cpu/compose.cpp.o
[ 6%] Building CXX object CMakeFiles/gtn.dir/gtn/cpu/functions.cpp.o
[ 8%] Building CXX object CMakeFiles/gtn.dir/gtn/cpu/shortest.cpp.o
[ 10%] Building CXX object CMakeFiles/gtn.dir/gtn/creations.cpp.o
[ 11%] Building CXX object CMakeFiles/gtn.dir/gtn/device.cpp.o
[ 13%] Building CXX object CMakeFiles/gtn.dir/gtn/criterions.cpp.o
[ 15%] Building CXX object CMakeFiles/gtn.dir/gtn/functions.cpp.o
[ 16%] Building CXX object CMakeFiles/gtn.dir/gtn/graph.cpp.o
[ 18%] Building CXX object CMakeFiles/gtn.dir/gtn/parallel/parallel_map.cpp.o
[ 20%] Building CXX object CMakeFiles/gtn.dir/gtn/rand.cpp.o
[ 22%] Building CXX object CMakeFiles/gtn.dir/gtn/utils.cpp.o
[ 23%] Building CUDA object CMakeFiles/gtn.dir/gtn/cuda/creations.cu.o
[ 25%] Building CUDA object CMakeFiles/gtn.dir/gtn/cuda/compose.cu.o
[ 27%] Building CUDA object CMakeFiles/gtn.dir/gtn/cuda/cuda.cu.o
[ 28%] Building CXX object CMakeFiles/gtn.dir/gtn/cuda/functions.cpp.o
[ 30%] Building CUDA object CMakeFiles/gtn.dir/gtn/cuda/shortest.cu.o
/home/pyp/gtn/gtn/cuda/cuda.cu(94): error: identifier "cudaMallocAsync" is undefined
/home/pyp/gtn/gtn/cuda/cuda.cu(99): error: identifier "cudaFreeAsync" is undefined
/home/pyp/gtn/gtn/cuda/shortest.cu(19): error: A __constant__ variable cannot be marked constexpr
/home/pyp/gtn/gtn/cuda/shortest.cu(20): error: A __constant__ variable cannot be marked constexpr
2 errors detected in the compilation of "/home/pyp/gtn/gtn/cuda/cuda.cu".
CMakeFiles/gtn.dir/build.make:285: recipe for target 'CMakeFiles/gtn.dir/gtn/cuda/cuda.cu.o' failed
make[2]: *** [CMakeFiles/gtn.dir/gtn/cuda/cuda.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
2 errors detected in the compilation of "/home/pyp/gtn/gtn/cuda/shortest.cu".
CMakeFiles/gtn.dir/build.make:313: recipe for target 'CMakeFiles/gtn.dir/gtn/cuda/shortest.cu.o' failed
make[2]: *** [CMakeFiles/gtn.dir/gtn/cuda/shortest.cu.o] Error 1
CMakeFiles/Makefile2:173: recipe for target 'CMakeFiles/gtn.dir/all' failed
make[1]: *** [CMakeFiles/gtn.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2
Thank you so much for your time!