Nice work, but I meet some problem when python setup.py.
Follow your instruction, this system still cannot work on my PC (ubuntu 20, nvcc V10.1.243, gcc/g++ 9.4, clang 10.0.0. CMake 3.16.3)
Any idea how to fix that?
python setup.py install
running install
/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/command/easy_install.py:160: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
writing pydifem.egg-info/PKG-INFO
writing dependency_links to pydifem.egg-info/dependency_links.txt
writing top-level names to pydifem.egg-info/top_level.txt
reading manifest file 'pydifem.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'pydifem.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
CMake Warning (dev) at CMakeLists.txt:2 (project):
Policy CMP0048 is not set: project() command manages VERSION variables.
Run "cmake --help-policy CMP0048" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
The following variable(s) would be set to empty:
CMAKE_PROJECT_VERSION
CMAKE_PROJECT_VERSION_MAJOR
CMAKE_PROJECT_VERSION_MINOR
CMAKE_PROJECT_VERSION_PATCH
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning at CMakeLists.txt:17 (find_package):
By not providing "FindCGAL.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "CGAL", but
CMake did not find one.
Could not find a package configuration file provided by "CGAL" with any of
the following names:
CGALConfig.cmake
cgal-config.cmake
Add the installation prefix of "CGAL" to CMAKE_PREFIX_PATH or set
"CGAL_DIR" to a directory containing one of the above files. If "CGAL"
provides a separate development package or SDK, be sure it has been
installed.
-- Found rapidjson header files in /media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anabur_test/diff_fem/extern/rapidjson/include
Flags :
-- Found OpenMP_C: -fopenmp
-- Found OpenMP_CXX: -fopenmp
-- Boost 1.66.0 found.
-- Found Boost components:
filesystem;python3;numpy3
-- Found OpenMP_C: -fopenmp
-- Found OpenMP_CXX: -fopenmp
-- pybind11 v2.10.0 dev1
CMake Warning (dev) at CMakeLists.txt:66 (target_link_libraries):
Policy CMP0023 is not set: Plain and keyword target_link_libraries
signatures cannot be mixed. Run "cmake --help-policy CMP0023" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
The keyword signature for target_link_libraries has already been used with
the target "pydifem". All uses of target_link_libraries with a target
should be either all-keyword or all-plain.
The uses of the keyword signature are here:
- extern/pybind11/tools/pybind11Tools.cmake:160 (target_link_libraries)
- extern/pybind11/tools/pybind11Tools.cmake:192 (target_link_libraries)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done
CMake Warning at extern/pybind11/tools/pybind11Tools.cmake:158 (add_library):
Cannot generate a safe runtime search path for target pydifem because files
in some directories may conflict with libraries in implicit directories:
runtime library [libgomp.so.1] in /usr/lib/gcc/x86_64-linux-gnu/9 may be hidden by files in:
/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib
Some of these libraries may not be found correctly.
Call Stack (most recent call first):
CMakeLists.txt:63 (pybind11_add_module)
-- Generating done
-- Build files have been written to: /media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anabur_test/diff_fem/build/temp.linux-x86_64-3.8
[1/2] Building CXX object CMakeFiles/pydifem.dir/python/pydifem.cc.o
FAILED: CMakeFiles/pydifem.dir/python/pydifem.cc.o
/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DNDEBUG -DSOFTCON_DIR="/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anabur_test/diff_fem" -DVERSION_INFO=0.0.1 -Dpydifem_EXPORTS -I../../extern/tinyObjLoader -I/usr/include/eigen3 -I../../extern/rapidjson/include -I../../sim -I../../sim/fem -isystem ../../extern/pybind11/include -isystem "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/include/python3.8" -O3 -DNDEBUG -fPIC -fvisibility=hidden -fPIC -std=gnu++11 -Wdeprecated-declarations -flto -fno-fat-lto-objects -fopenmp -std=gnu++14 -MD -MT CMakeFiles/pydifem.dir/python/pydifem.cc.o -MF CMakeFiles/pydifem.dir/python/pydifem.cc.o.d -o CMakeFiles/pydifem.dir/python/pydifem.cc.o -c ../../python/pydifem.cc
In file included from ../../python/pydifem.cc:8:
../../python/../sim/diff/cppad_utils.h:26:10: fatal error: cppad/cppad.hpp: No such file or directory
26 | #include <cppad/cppad.hpp>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "setup.py", line 104, in
setup(
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/init.py", line 155, in setup
return distutils.core.setup(**attrs)
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
return run_commands(dist)
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
dist.run_commands()
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
self.run_command(cmd)
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/command/install.py", line 74, in run
self.do_egg_install()
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/command/install.py", line 116, in do_egg_install
self.run_command('bdist_egg')
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 165, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 151, in call_command
self.run_command(cmdname)
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 11, in run
self.build()
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/_distutils/command/install_lib.py", line 107, in build
self.run_command('build_ext')
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
cmd_obj.run()
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/home/ly/.local/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/home/ly/.local/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "setup.py", line 97, in build_extension
subprocess.check_call(
File "/media/ly/1dc08886-9b59-45c8-809c-468f28b98ce1/anaconda3$/envs/difem/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.']' returned non-zero exit status 1.