I get the v2.12.2b.tar.gz from Releases, unzip and cdin it. Then I use the command ./setup.py build and get the following error:
-- Found SWIG: /home/lsli/software/swig-4.0.2/bin/swig (found suitable version "4.0.2", minimum required is "4.0") found components: python
-- >>> Linux System
-- Found SWIG: /home/lsli/software/swig-4.0.2/bin/swig (found version "4.0.2")
-- >>> Linux System
-- Configuring done
-- Generating done
-- Build files have been written to: /home/lsli/downloads/underworld2-2.12.2b/build/temp.linux-x86_64-3.8_libUnderworld
[1/195] Building CXX object CMakeFiles/PICellerator.dir/PICellerator/MaterialPoints/src/GeneralSwarm.cpp.o
FAILED: CMakeFiles/PICellerator.dir/PICellerator/MaterialPoints/src/GeneralSwarm.cpp.o
/usr/bin/c++ -DCURR_MODULE_NAME=\"PICellerator\" -DLIB_DIR=\".\" -DMODULE_EXT=\".so\" -DPICellerator_EXPORTS -I/usr/include/libxml2 -I/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld -isystem /opt/miniconda3/envs/uw/include/python3.8 -isystem /opt/miniconda3/envs/uw/lib/python3.8/site-packages/numpy/core/include -isystem /home/lsli/software/openmpi-4.1.2/include -isystem /home/lsli/software/openmpi-4.1.2/include/openmpi -O3 -DNDEBUG -fPIC -DU_SHOW_CPLUSPLUS_API=0 -std=gnu++11 -MD -MT CMakeFiles/PICellerator.dir/PICellerator/MaterialPoints/src/GeneralSwarm.cpp.o -MF CMakeFiles/PICellerator.dir/PICellerator/MaterialPoints/src/GeneralSwarm.cpp.o.d -o CMakeFiles/PICellerator.dir/PICellerator/MaterialPoints/src/GeneralSwarm.cpp.o -c /home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/MaterialPoints/src/GeneralSwarm.cpp
/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/MaterialPoints/src/GeneralSwarm.cpp:16:10: fatal error: petsc.h: No such file or directory
16 | #include
| ^~~~~
compilation terminated.
[9/195] Building C object CMakeFiles/PICellerator.dir/PICellerator/Utils/src/PCDVC.c.o
/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/Utils/src/PCDVC.c: In function ‘_PCDVC_Calculate3D’:
/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/Utils/src/PCDVC.c:369:36: warning: passing argument 3 of ‘PCDVC_Firewall’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
369 | PCDVC_Firewall( nump, lCell_I, func );
| ^~~~
/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/Utils/src/PCDVC.c:50:51: note: expected ‘char ’ but argument is of type ‘const char ’
50 | void PCDVC_Firewall( int nump, int lCell_I, char funcguy )
| ~~^~~
/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/Utils/src/PCDVC.c:515:48: warning: passing argument 3 of ‘PCDVC_Firewall’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
515 | PCDVC_Firewall( nump, lCell_I, func );
| ^~~~
/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/Utils/src/PCDVC.c:50:51: note: expected ‘char ’ but argument is of type ‘const char ’
50 | void PCDVC_Firewall( int nump, int lCell_I, char funcguy )
| ~~^~~
/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/Utils/src/PCDVC.c:650:44: warning: passing argument 3 of ‘PCDVC_Firewall’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
650 | PCDVC_Firewall( nump, lCell_I, func );
| ^~~~
/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/Utils/src/PCDVC.c:50:51: note: expected ‘char ’ but argument is of type ‘const char ’
50 | void PCDVC_Firewall( int nump, int lCell_I, char funcguy )
| ~~^~~
/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/Utils/src/PCDVC.c: In function ‘_PCDVC_Calculate2D’:
/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/Utils/src/PCDVC.c:754:36: warning: passing argument 3 of ‘PCDVC_Firewall’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
754 | PCDVC_Firewall( nump, lCell_I, func );
| ^~~~
/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/Utils/src/PCDVC.c:50:51: note: expected ‘char ’ but argument is of type ‘const char ’
50 | void PCDVC_Firewall( int nump, int lCell_I, char funcguy )
| ~~^~~
/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/Utils/src/PCDVC.c:898:48: warning: passing argument 3 of ‘PCDVC_Firewall’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
898 | PCDVC_Firewall( nump, lCell_I, func );
| ^~~~
/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/Utils/src/PCDVC.c:50:51: note: expected ‘char ’ but argument is of type ‘const char ’
50 | void PCDVC_Firewall( int nump, int lCell_I, char funcguy )
| ~~^~~
/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/Utils/src/PCDVC.c:1029:44: warning: passing argument 3 of ‘PCDVC_Firewall’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
1029 | PCDVC_Firewall( nump, lCell_I, func );
| ^~~~
/home/lsli/downloads/underworld2-2.12.2b/underworld/libUnderworld/PICellerator/Utils/src/PCDVC.c:50:51: note: expected ‘char ’ but argument is of type ‘const char ’
50 | void PCDVC_Firewall( int nump, int lCell_I, char funcguy )
| ~~^~~
[10/195] Building C object CMakeFiles/PICellerator.dir/PICellerator/Weights/src/DVCWeights.c.o
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "./setup.py", line 289, in
setup(name='underworld',
File "/opt/miniconda3/envs/uw/lib/python3.8/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/opt/miniconda3/envs/uw/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/opt/miniconda3/envs/uw/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/opt/miniconda3/envs/uw/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/opt/miniconda3/envs/uw/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/opt/miniconda3/envs/uw/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/miniconda3/envs/uw/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "./setup.py", line 138, in run
self.build_extension(ext)
File "./setup.py", line 245, in build_extension
subprocess.check_call(build_command)
File "/opt/miniconda3/envs/uw/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '/home/lsli/downloads/underworld2-2.12.2b/build/temp.linux-x86_64-3.8_libUnderworld', '--config', 'Release']' returned non-zero exit status 1.
Hi everyone,
I get the
v2.12.2b.tar.gz
from Releases, unzip andcd
in it. Then I use the command./setup.py build
and get the following error:Thanks in advance.