JeremyBYU/OrganizedPointFilters

Building on RPi

Closed this issue · 4 comments

oori commented

Trying to build on RPi (ARM cpu) getting this error:

pi@raspberrypi:~/polylidar/OrganizedPointFilters/cmake-build $ cmake --build .
Built target OrganizedPointFilters
Building CXX object src/Python/CMakeFiles/organizedpointfilters.dir/organizedpointfilters_pybind/docstring/docstring.cpp.o
c++: error: unrecognized command line option ‘-msse4.2’
make[2]: *** [src/Python/CMakeFiles/organizedpointfilters.dir/build.make:82: src/Python/CMakeFiles/organizedpointfilters.dir/organizedpointfilters_pybind/docstring/docstring.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:40807: src/Python/CMakeFiles/organizedpointfilters.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

Obviously, SSE extension isn't available on ARM. I couldn't find where to disable this, as I only found this comment in your code ;)

Thanks!

I have an AMD cpu, zen 2 3900x. What do you have?

You can disable this here as well:

set(OPTIMIZATION_FLAGS "-O3 -DNDEBUG -ffast-math -funsafe-math-optimizations -msse4.2")

You will have to delete the cmake-build directory.
Let's keep this open so I can make a cross platform change that works even on arm cpus and old x86

Oh sorry I saw that you said AMD but meant ARM. Should have known from title. Nevermind the question!

oori commented

Yeap, edited the original post and corrected to ARM... sorry.

oori commented

I removed -msse4.2 and rebuilt on RPi. it now works!
I missed it because search "sse" or "msse" on GitHub never returned this result, only the comment I mentioned above ;(

I'll try the full monty with polylidar-realsense on the RPi in the next days, and update you.
thanks again!