koide3 / hdl_localization

Real-time 3D localization using a (velodyne) 3D LIDAR
BSD 2-Clause "Simplified" License
775 stars 309 forks source link

c++: error: unrecognized command line option ‘-msse’; did you mean ‘-fdse’? #37

Open jsYangCode opened 4 years ago

jsYangCode commented 4 years ago

hello,friends. today, i compile this on Xavier which is NVIDIA's product, it is the ARM architecture different from the intel‘s x86_64. when i build it on Xavier, some errors occur!! like these: c++: error: unrecognized command line option ‘-msse’; did you mean ‘-fdse’? c++: error: unrecognized command line option ‘-msse2’ c++: error: unrecognized command line option ‘-msse3’ c++: error: unrecognized command line option ‘-msse4’ c++: error: unrecognized command line option ‘-msse4.1’ c++: error: unrecognized command line option ‘-msse4.2’ c++: error: unrecognized command line option ‘-msse’; did you mean ‘-fdse’? c++: error: unrecognized command line option ‘-msse2’ c++: error: unrecognized command line option ‘-msse3’ c++: error: unrecognized command line option ‘-msse4’ c++: error: unrecognized command line option ‘-msse4.1’ c++: error: unrecognized command line option ‘-msse4.2’

In the CMakeLists.txt is "add_definitions(-std=c++11 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2) set(CMAKE_CXX_FLAGS "-std=c++11 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2")". which is OK on the intel‘s x86_64 architecture. Can you give me some help ? THANK YOU FIRST!!

cyan-color commented 2 years ago

did you solve this? if you have soled, pease tell me how to do

ZBoIsHere commented 2 years ago

does u guys solve this problem

THLL245 commented 2 years ago

You need to remove the -msse from the cmakelists.txt. See below for example just comment it out.

if("$ENV{ROS_DISTRO}" STRGREATER "melodic") add_definitions(-std=c++17)

add_definitions(-std=c++17 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2)

set(CMAKE_CXX_FLAGS "-std=c++17 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2")

set(CMAKE_CXX_FLAGS "-std=c++17") else()

add_definitions(-std=c++11 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2)

add_definitions(-std=c++11)

set(CMAKE_CXX_FLAGS "-std=c++11 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2")

set(CMAKE_CXX_FLAGS "-std=c++11") endif()

Strinkin commented 4 months ago

i have the same problem, someone can solve it?