-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Fix Compilation on ARM #41
Comments
@LilyGinger could you add the following to
and then run |
Hi, @fwilliams Here is the output:
|
Thanks @LilyGinger Can you also add the following after that line and rerun the build:
|
Hi, Here is the new output. zbz@nvidia-desktop ~/z/point-cloud-utils (master)> python3 setup.py build
running build
running build_py
running build_ext
CMake Warning (dev) at external/numpyeigen/cmake/numpyeigen.cmake:98 (set):
Cannot set "NPE_ROOT_DIR": current scope has no parent.
Call Stack (most recent call first):
CMakeLists.txt:21 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- pybind11 v2.9.0
-- Detecting default ISA...
-- Detected default ISA: SSE2
VORPALINE_PLATFORM: Linux64-gcc-dynamic
-- Using local options file: /home/zbz/zbz/point-cloud-utils/external/geogram/CMakeOptions.txt
-- Configuring build for standalone Geogram (without Vorpaline)
-- GCC version >= 4.3, activating sign conversion warnings
-- GCC version >= 4.6, activating double promotion warnings
-- Doxygen >= 1.7.0 not found, cannot generate documentation
-- Found OpenMP_C: -fopenmp
-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP_C: -fopenmp
-- Found OpenMP_CXX: -fopenmp
-- Configuring done
-- Generating done
-- Build files have been written to: /home/zbz/zbz/point-cloud-utils/build/temp.linux-aarch64-3.6
[ 1%] Built target npe
[ 3%] Built target manifold
[ 3%] Building C object geogram/src/lib/geogram/third_party/CMakeFiles/geogram_third_party.dir/LM7/libmeshb7.c.o
[ 3%] Building CXX object embree/common/sys/CMakeFiles/sys.dir/sysinfo.cpp.o
cc: error: unrecognized command line option ‘-m64’
geogram/src/lib/geogram/third_party/CMakeFiles/geogram_third_party.dir/build.make:62: recipe for target 'geogram/src/lib/geogram/third_party/CMakeFiles/geogram_third_party.dir/LM7/libmeshb7.c.o' failed
make[2]: *** [geogram/src/lib/geogram/third_party/CMakeFiles/geogram_third_party.dir/LM7/libmeshb7.c.o] Error 1
CMakeFiles/Makefile2:780: recipe for target 'geogram/src/lib/geogram/third_party/CMakeFiles/geogram_third_party.dir/all' failed
make[1]: *** [geogram/src/lib/geogram/third_party/CMakeFiles/geogram_third_party.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
c++: error: unrecognized command line option ‘-msse2’
embree/common/sys/CMakeFiles/sys.dir/build.make:62: recipe for target 'embree/common/sys/CMakeFiles/sys.dir/sysinfo.cpp.o' failed
make[2]: *** [embree/common/sys/CMakeFiles/sys.dir/sysinfo.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 3%] Building CXX object embree/common/sys/CMakeFiles/sys.dir/alloc.cpp.o
c++: error: unrecognized command line option ‘-msse2’
embree/common/sys/CMakeFiles/sys.dir/build.make:86: recipe for target 'embree/common/sys/CMakeFiles/sys.dir/alloc.cpp.o' failed
make[2]: *** [embree/common/sys/CMakeFiles/sys.dir/alloc.cpp.o] Error 1
CMakeFiles/Makefile2:310: recipe for target 'embree/common/sys/CMakeFiles/sys.dir/all' failed
make[1]: *** [embree/common/sys/CMakeFiles/sys.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "setup.py", line 116, in <module>
main()
File "setup.py", line 111, in main
test_suite="tests"
File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 39, in run
self.build_extension(ext)
File "setup.py", line 72, in build_extension
subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2. |
@LilyGinger I think something might be amiss. Did you paste the above lines in |
Is there a solution to build on ARM systems that you have not documented here @fwilliams ? |
From my understanding the problem comes from geogram, which (as you mentioned) has the -m64 tag that breaks the ARM build. In the geogram repo they mention a way to make it work but I'm unsure on how to integrate it into this repository. Any suggestions? |
Hi, yes it seems the problem is with geogram (geogram is also blocking builds on M1 macs). I have a copy of geogram directly in the repo (i.e. not a CMake external project), so you can modify geogram's CMake directly to make it work. I don't have an ARM machine to test this on so I haven't done it. If you manage to get it compiling, I would love a PR. Also very happy to answer any questions/work with you to get this working! |
I'm actually working on a Khadas Vim3 board (https://www.khadas.com/vim3). I will see what i can do to make it work. Any initial hints what I should look out for? |
I think making a branch in the geogram cmake without the -m64 flag is a good start. Embree may also give you trouble but bumping the version should work. See the M1 Mac issue #42 which has more on that. Geogram had issues building on M1 Mac but that's just because the ifdefs for OSX assume Intel CPUs and include things like SSE headers. This shouldn't impact your case. Let me know if you run into any issues! |
Geogram should indeed just have a switch for excluding the -m64 and -m32 flags on non arm builds and as you mentioned eigen is the next problem a build runs into. |
Thanks @Layer3! Did you embree instead of Eigen? For both @brunovollmer and @Layer3, I created an arm branch which has the latest version of embree. If you can fix geogram, you can use that as the base for your PR. |
Yea @fwilliams compiling geogram isn't the big issue for me, that is easily doable by adding a little cmake switchto exclude the -m64/-m32 flags. The bigger problem is that the CortexA73 doesn't play nice with sse, so now I'm currently stuck with this.
Up to this point I've just been deactivating sse where I could or adjust the asm calls if I had to, but this one feels just too wrong. |
Hey @fwilliams, |
Thanks for this, I'd love to merge these changes into the repo! Could you create a PR with your fork? That would help me resolve your issue. |
Sure, I can clean them up some more and then PR them to one of the arm branches. |
Just to confirm that it runs, this is on a CortexA73
|
Amazing that it works!!! I would ignore the current arm branch! I was messing around with updating embree but didn't really get anywhere. I'll delete it for now. |
@fwilliams Prepared the PR, do you want to open a separate branch for that? |
Hi @fwilliams, I am trying to install your repo. Can you make a documentation about installation for M1 mac users? |
Hi @BupyeongHealer thanks for posting here. There's currently an open PR which fixes M1 mac compilation #55 |
Good to hear that! Thanks a lot 👍 |
This is fixed! |
Hello, just to notify that the new version of Geogram is compatible with M1, in case it is useful to you ! |
It seems like
-m64
is an x86 tag. See (compilation errorcc: error: unrecognized command line option ‘-m64'
in #40 ). This appears to be breaking ARM builds.The text was updated successfully, but these errors were encountered: