jeanlemotan / esp32-cam-fpv

esp32 cam digital low latency fpv
MIT License
292 stars 75 forks source link

make -j4 gives error: unrecognized command-line option ‘-mfpu=neon’ #9

Closed francesco-miccoli closed 2 years ago

francesco-miccoli commented 2 years ago

Hello, I am trying to install the gs on my raspberry pi 4 with ubuntu, I have installed all the dependencies as listed on the guide and edited main.cpp according with my wireless adapters, tough when I try to run sudo make -j4 (just make -j4 gives me permission errors) I get this error and I can't quite figure out what is the problem:

g++ -MT .o/src/main.o -MD -MP -MF .d/src/main.Td -std=c++17 -O3 -DNDEBUG -ffast-math -funroll-loops -mcpu=cortex-a8 -mfpu=neon -Wall -DRASPBERRY_PI -Isrc -Isrc/utils -Isrc/imgui -Icomponents/common -I/opt/vc/include/ -I/usr/include/freetype2 -c -o .o/src/main.o src/main.cpp g++ -MT .o/src/droid_sans_font.o -MD -MP -MF .d/src/droid_sans_font.Td -std=c++17 -O3 -DNDEBUG -ffast-math -funroll-loops -mcpu=cortex-a8 -mfpu=neon -Wall -DRASPBERRY_PI -Isrc -Isrc/utils -Isrc/imgui -Icomponents/common -I/opt/vc/include/ -I/usr/include/freetype2 -c -o .o/src/droid_sans_font.o src/droid_sans_font.cpp g++ -MT .o/src/HUD.o -MD -MP -MF .d/src/HUD.Td -std=c++17 -O3 -DNDEBUG -ffast-math -funroll-loops -mcpu=cortex-a8 -mfpu=neon -Wall -DRASPBERRY_PI -Isrc -Isrc/utils -Isrc/imgui -Icomponents/common -I/opt/vc/include/ -I/usr/include/freetype2 -c -o .o/src/HUD.o src/HUD.cpp g++ -MT .o/src/imgui_impl_opengl3.o -MD -MP -MF .d/src/imgui_impl_opengl3.Td -std=c++17 -O3 -DNDEBUG -ffast-math -funroll-loops -mcpu=cortex-a8 -mfpu=neon -Wall -DRASPBERRY_PI -Isrc -Isrc/utils -Isrc/imgui -Icomponents/common -I/opt/vc/include/ -I/usr/include/freetype2 -c -o .o/src/imgui_impl_opengl3.o src/imgui_impl_opengl3.cpp g++: error: unrecognized command-line option ‘-mfpu=neon’ make: [Makefile:126: .o/src/main.o] Error 1 g++: error: unrecognized command-line option ‘-mfpu=neon’ make: Waiting for unfinished jobs.... make: [Makefile:126: .o/src/droid_sans_font.o] Error 1 g++: error: unrecognized command-line option ‘-mfpu=neon’ g++: error: unrecognized command-line option ‘-mfpu=neon’ make: [Makefile:126: .o/src/HUD.o] Error 1 make: *** [Makefile:126: .o/src/imgui_impl_opengl3.o] Error 1

Does anyone have any idea what I might be doing wrong? Thank you for your time

jeanlemotan commented 2 years ago

try to remove that command line argument, it's possible that ubuntu for pi4 uses a different gcc version and that parameter ('-mfpu=neon') is not recognized nor needed. The fact that you have to do sudo make -j4 indicates a permission problem in your install or usage: you either don't have permission to write in the directory you're trying to build, or you have some other permission issue. Using 'sudo' in this case just pushes the problem further down the line and potentially (probably) makes it bigger, as all the artifacts generated by gcc will now be usable only by root (so with sudo).