uzh-rpg / fast

FAST corner detector by Edward Rosten
GNU Lesser General Public License v2.1
113 stars 89 forks source link

Compile Errors on RPI4 under Ubuntu 18.04 #8

Open mjs513 opened 4 years ago

mjs513 commented 4 years ago

Turns out that I needed to use fast for one of the other ROS packages that I am trying to use. When I do a catkin_make I get an error that

  This workspace contains non-catkin packages in it, and catkin cannot build
  a non-homogeneous workspace without isolation.  Try the
  'catkin_make_isolated' command instead

If I look at the error log and output log it is pointing back to the fast package (i am using the catkin branch). It further recommended that i use catkin_make_isolated so I tried that but then I get the following errors (Note this is only the last bunch of lines before the errors for fast:

==> Processing catkin package: 'eigen_catkin'
==> Creating build directory: 'build_isolated/eigen_catkin'
==> Building with env: '/home/ubuntu/catkin_ws/devel_isolated/dji_sdk_web_groundstation/env.sh'
==> cmake /home/ubuntu/catkin_ws/src/eigen_catkin -DCATKIN_DEVEL_PREFIX=/home/ubuntu/catkin_ws/devel_isolated/eigen_catkin -DCMAKE_INSTALL_PREFIX=/home/ubuntu/catkin_ws/install_isolated -G Unix Makefiles in '/home/ubuntu/catkin_ws/build_isolated/eigen_catkin'
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/ubuntu/catkin_ws/devel_isolated/eigen_catkin
-- Using CMAKE_PREFIX_PATH: /home/ubuntu/catkin_ws/devel_isolated/dji_sdk_web_groundstation;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk_dji2mav;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk_demo;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk_lib;/home/ubuntu/catkin_ws/devel_isolated/controller_msgs;/home/ubuntu/catkin_ws/devel_isolated/cmake_utils;/home/ubuntu/catkin_ws/devel_isolated/catkin_simple;/opt/ros/melodic
-- This workspace overlays: /home/ubuntu/catkin_ws/devel_isolated/dji_sdk_web_groundstation;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk_dji2mav;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk_demo;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk_lib;/home/ubuntu/catkin_ws/devel_isolated/controller_msgs;/home/ubuntu/catkin_ws/devel_isolated/cmake_utils;/home/ubuntu/catkin_ws/devel_isolated/catkin_simple;/opt/ros/melodic
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/ubuntu/catkin_ws/build_isolated/eigen_catkin/test_results
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.17") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.28
-- BUILD_SHARED_LIBS is on
-- Suitable Eigen version found. Minimum version: 3.3.4 Found version: 3.3.4
-- eigen_catkin is configured to USE system eigen
-- Found and using system Eigen in /usr/include/eigen3
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/catkin_ws/build_isolated/eigen_catkin
==> make -j4 -l4 in '/home/ubuntu/catkin_ws/build_isolated/eigen_catkin'
<== Finished processing package [9 of 51]: 'eigen_catkin'

==> Processing catkin package: 'fast'
==> Creating build directory: 'build_isolated/fast'
==> Building with env: '/home/ubuntu/catkin_ws/devel_isolated/eigen_catkin/env.sh'
==> cmake /home/ubuntu/catkin_ws/src/fast-catkin -DCATKIN_DEVEL_PREFIX=/home/ubuntu/catkin_ws/devel_isolated/fast -DCMAKE_INSTALL_PREFIX=/home/ubuntu/catkin_ws/install_isolated -G Unix Makefiles in '/home/ubuntu/catkin_ws/build_isolated/fast'
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/ubuntu/catkin_ws/devel_isolated/fast
-- Using CMAKE_PREFIX_PATH: /home/ubuntu/catkin_ws/devel_isolated/eigen_catkin;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk_web_groundstation;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk_dji2mav;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk_demo;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk_lib;/home/ubuntu/catkin_ws/devel_isolated/controller_msgs;/home/ubuntu/catkin_ws/devel_isolated/cmake_utils;/home/ubuntu/catkin_ws/devel_isolated/catkin_simple;/opt/ros/melodic
-- This workspace overlays: /home/ubuntu/catkin_ws/devel_isolated/eigen_catkin;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk_web_groundstation;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk_dji2mav;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk_demo;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk;/home/ubuntu/catkin_ws/devel_isolated/dji_sdk_lib;/home/ubuntu/catkin_ws/devel_isolated/controller_msgs;/home/ubuntu/catkin_ws/devel_isolated/cmake_utils;/home/ubuntu/catkin_ws/devel_isolated/catkin_simple;/opt/ros/melodic
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/ubuntu/catkin_ws/build_isolated/fast/test_results
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.17") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.28
-- BUILD_SHARED_LIBS is on
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/catkin_ws/build_isolated/fast
==> make -j4 -l4 in '/home/ubuntu/catkin_ws/build_isolated/fast'
Scanning dependencies of target fast
[ 60%] Building CXX object CMakeFiles/fast.dir/src/fast_10_score.cpp.o
[ 60%] Building CXX object CMakeFiles/fast.dir/src/faster_corner_10_sse.cpp.o
[ 60%] Building CXX object CMakeFiles/fast.dir/src/fast_10.cpp.o
[ 80%] Building CXX object CMakeFiles/fast.dir/src/nonmax_3x3.cpp.o
c++: error: unrecognized command line option ‘-mmmx’
c++: error: unrecognized command line option ‘-msse’; did you mean ‘-fdse’?
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 ‘-mmmx’
c++: error: unrecognized command line option ‘-mmmx’
c++: error: unrecognized command line option ‘-msse’; did you mean ‘-fdse’?
c++: error: unrecognized command line option ‘-msse’; did you mean ‘-fdse’?
c++: error: unrecognized command line option ‘-mssse3’
c++: error: unrecognized command line option ‘-msse’; did you mean ‘-fdse’?
c++: error: unrecognized command line option ‘-msse’; did you mean ‘-fdse’?
c++: error: unrecognized command line option ‘-msse2’
c++: error: unrecognized command line option ‘-msse2’
c++: error: unrecognized command line option ‘-msse3’
c++: error: unrecognized command line option ‘-mssse3’
CMakeFiles/fast.dir/build.make:134: recipe for target 'CMakeFiles/fast.dir/src/faster_corner_10_sse.cpp.o' failed
make[2]: *** [CMakeFiles/fast.dir/src/faster_corner_10_sse.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
c++: error: unrecognized command line option ‘-msse3’
c++: error: unrecognized command line option ‘-mssse3’
CMakeFiles/fast.dir/build.make:86: recipe for target 'CMakeFiles/fast.dir/src/fast_10_score.cpp.o' failed
make[2]: *** [CMakeFiles/fast.dir/src/fast_10_score.cpp.o] Error 1
CMakeFiles/fast.dir/build.make:62: recipe for target 'CMakeFiles/fast.dir/src/fast_10.cpp.o' failed
make[2]: *** [CMakeFiles/fast.dir/src/fast_10.cpp.o] Error 1
c++: error: unrecognized command line option ‘-mmmx’
c++: error: unrecognized command line option ‘-msse’; did you mean ‘-fdse’?
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 ‘-mssse3’
CMakeFiles/fast.dir/build.make:110: recipe for target 'CMakeFiles/fast.dir/src/nonmax_3x3.cpp.o' failed
make[2]: *** [CMakeFiles/fast.dir/src/nonmax_3x3.cpp.o] Error 1
CMakeFiles/Makefile2:131: recipe for target 'CMakeFiles/fast.dir/all' failed
make[1]: *** [CMakeFiles/fast.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
<== Failed to process package 'fast': 
  Command '['/home/ubuntu/catkin_ws/devel_isolated/eigen_catkin/env.sh', 'make', '-j4', '-l4']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /home/ubuntu/catkin_ws/build_isolated/fast && /home/ubuntu/catkin_ws/devel_isolated/eigen_catkin/env.sh make -j4 -l4

Command failed, exiting.

Looking at something in another message tried modifying the cmake for fast but no luck (probably because have no idea what I am doing with cmake files ). The pi4 is a uad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz i think

Any help would be appreciated.

EDIT: Think this is related to issue 7 that i just noticed. I tried editing the the make file againso it just reads:

#IF(DEFINED ENV{ARM_ARCHITECTURE})
    SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3")
#ELSE()
#   SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3 -mmmx -msse -msse -msse2 -msse3 -mssse3 -fomit-frame-pointer")
#ENDIF()

but the file fater_corner_10_sse throws all kinds of errors on check barrier and says it requires SSE2 support.