-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in building with setup.py #331
Comments
You need to install the dependecies |
This may not be an error caused by missing dependencies. I get the same error messages as @sakshambh, but this is due to a linker bug in the used mmg version (see MmgTools/mmg#85). I get the same error messages and switching to version 5.5.1 or any newer one of mmg does not work directly due to some changes in the method declaration of the following functions:
|
Similar issue here: [ 87%] Built target lib_Wires
/home/ubuntu/python/PyMesh/tools/Triangulation/MMG/Delaunay.cpp: In member function ‘virtual void PyMesh::MMG::Delaunay::run()’:
/home/ubuntu/python/PyMesh/tools/Triangulation/MMG/Delaunay.cpp:45:27: error: too few arguments to function ‘int MMG2D_Set_meshSize(MMG5_pMesh, int, int, int, int)’
45 | if (MMG2D_Set_meshSize(mmgMesh,num_points,0,num_segments) != 1) {
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/python/PyMesh/python/pymesh/third_party/include/mmg/libmmg.h:38,
from /home/ubuntu/python/PyMesh/tools/Triangulation/MMG/Delaunay.cpp:8:
/home/ubuntu/python/PyMesh/python/pymesh/third_party/include/mmg/mmg2d/libmmg2d.h:324:8: note: declared here
324 | int MMG2D_Set_meshSize(MMG5_pMesh mesh, int np, int nt, int nquad, int na);
| ^~~~~~~~~~~~~~~~~~
/home/ubuntu/python/PyMesh/tools/Triangulation/MMG/Delaunay.cpp:85:27: error: too few arguments to function ‘int MMG2D_Get_meshSize(MMG5_pMesh, int*, int*, int*, int*)’
85 | if (MMG2D_Get_meshSize(mmgMesh,
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~
86 | &num_vertices, &num_triangles, &num_edges) !=1) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/python/PyMesh/python/pymesh/third_party/include/mmg/libmmg.h:38,
from /home/ubuntu/python/PyMesh/tools/Triangulation/MMG/Delaunay.cpp:8:
/home/ubuntu/python/PyMesh/python/pymesh/third_party/include/mmg/mmg2d/libmmg2d.h:873:8: note: declared here
873 | int MMG2D_Get_meshSize(MMG5_pMesh mesh, int* np, int* nt, int* nquad, int* na);
| ^~~~~~~~~~~~~~~~~~
/home/ubuntu/python/PyMesh/tools/Triangulation/MMG/Delaunay.cpp: In member function ‘virtual void PyMesh::MMG::Delaunay::refine(const MatrixFr&)’:
/home/ubuntu/python/PyMesh/tools/Triangulation/MMG/Delaunay.cpp:156:27: error: too few arguments to function ‘int MMG2D_Set_meshSize(MMG5_pMesh, int, int, int, int)’
156 | if (MMG2D_Set_meshSize(mmgMesh,num_input_vertices,num_input_faces,0) != 1) {
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/python/PyMesh/python/pymesh/third_party/include/mmg/libmmg.h:38,
from /home/ubuntu/python/PyMesh/tools/Triangulation/MMG/Delaunay.cpp:8:
/home/ubuntu/python/PyMesh/python/pymesh/third_party/include/mmg/mmg2d/libmmg2d.h:324:8: note: declared here
324 | int MMG2D_Set_meshSize(MMG5_pMesh mesh, int np, int nt, int nquad, int na);
| ^~~~~~~~~~~~~~~~~~
/home/ubuntu/python/PyMesh/tools/Triangulation/MMG/Delaunay.cpp:215:27: error: too few arguments to function ‘int MMG2D_Get_meshSize(MMG5_pMesh, int*, int*, int*, int*)’
215 | if (MMG2D_Get_meshSize(mmgMesh,
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~
216 | &num_vertices, &num_triangles, &num_edges) !=1) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/python/PyMesh/python/pymesh/third_party/include/mmg/libmmg.h:38,
from /home/ubuntu/python/PyMesh/tools/Triangulation/MMG/Delaunay.cpp:8:
/home/ubuntu/python/PyMesh/python/pymesh/third_party/include/mmg/mmg2d/libmmg2d.h:873:8: note: declared here
873 | int MMG2D_Get_meshSize(MMG5_pMesh mesh, int* np, int* nt, int* nquad, int* na);
| ^~~~~~~~~~~~~~~~~~
gmake[2]: *** [tools/Triangulation/CMakeFiles/lib_Triangulation.dir/build.make:188: tools/Triangulation/CMakeFiles/lib_Triangulation.dir/MMG/Delaunay.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1875: tools/Triangulation/CMakeFiles/lib_Triangulation.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
Traceback (most recent call last):
File "/home/ubuntu/python/PyMesh/./setup.py", line 106, in <module>
setup(
File "/home/ubuntu/miniconda3/envs/aniform/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "/home/ubuntu/miniconda3/envs/aniform/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/home/ubuntu/miniconda3/envs/aniform/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/home/ubuntu/miniconda3/envs/aniform/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
self.run_command(cmd)
File "/home/ubuntu/miniconda3/envs/aniform/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
super().run_command(command)
File "/home/ubuntu/miniconda3/envs/aniform/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
cmd_obj.run()
File "/home/ubuntu/python/PyMesh/./setup.py", line 103, in run
self.build_pymesh()
File "/home/ubuntu/python/PyMesh/./setup.py", line 75, in build_pymesh
self._build(
File "/home/ubuntu/python/PyMesh/./setup.py", line 97, in _build
check_call(c.split())
File "/home/ubuntu/miniconda3/envs/aniform/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j', '4']' returned non-zero exit status 2. |
Workaround for compiling mmg, modify line 93 of SET(CMAKE_C_FLAGS " -Wno-char-subscripts -fcommon ${CMAKE_C_FLAGS}") to force |
Just saw this is likely duplicate of #255 |
Hey! |
Hi, may I ask where should I change the mmg version? |
What precisely is unclear? It’s says right there where to put it “change mmg version in third_party/mmg.” You clone the repo and in the third_party folder you need to put all the files that the new version of mmg comprises of. |
Thanks for the answer. I thought there was a version configuration file needs to be edited. |
Kindly help me with issue
The text was updated successfully, but these errors were encountered: