BlitterStudio / amiberry

Optimized Amiga emulator for Linux/macOS
https://amiberry.com
GNU General Public License v3.0
663 stars 89 forks source link

Compile on a RaspberryPi4 Latest OS #1224

Closed ghhann closed 9 months ago

ghhann commented 9 months ago

Getting the following error (apparently the C compiler does not understand the following:

c++: error: unrecognized command-line option '-mfpu=neon-fp-armv8'

The full error log

Detecting CXX compiler ABI info failed to compile with the following output: Change Dir: /home/ghhann/Programs/16bitsystems/Amiga/amiberry/external/mt32emu/build/CMakeFiles/CMakeScratch/TryCompile-sPtJp8

Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_3f23e/fast && gmake[1]: Entering directory '/home/ghhann/Programs/16bitsystems/Amiga/amiberry/external/mt32emu/build/CMakeFiles/CMakeScratch/TryCompile-sPtJp8' /usr/bin/gmake -f CMakeFiles/cmTC_3f23e.dir/build.make CMakeFiles/cmTC_3f23e.dir/build gmake[2]: Entering directory '/home/ghhann/Programs/16bitsystems/Amiga/amiberry/external/mt32emu/build/CMakeFiles/CMakeScratch/TryCompile-sPtJp8' Building CXX object CMakeFiles/cmTC_3f23e.dir/CMakeCXXCompilerABI.cpp.o /usr/bin/c++ -mcpu=cortex-a72 -mfpu=neon-fp-armv8 -pipe -Wno-shift-overflow -Wno-narrowing -fno-pie -O3 -std=gnu++17 -v -o CMakeFiles/cmTC_3f23e.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.25/Modules/CMakeCXXCompilerABI.cpp Using built-in specs. COLLECT_GCC=/usr/bin/c++ c++: error: unrecognized command-line option '-mfpu=neon-fp-armv8' Target: aarch64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 12.2.0-14' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.2.0 (Debian 12.2.0-14) gmake[2]: [CMakeFiles/cmTC_3f23e.dir/build.make:78: CMakeFiles/cmTC_3f23e.dir/CMakeCXXCompilerABI.cpp.o] Error 1 gmake[2]: Leaving directory '/home/ghhann/Programs/16bitsystems/Amiga/amiberry/external/mt32emu/build/CMakeFiles/CMakeScratch/TryCompile-sPtJp8' gmake[1]: [Makefile:127: cmTC_3f23e/fast] Error 2 gmake[1]: Leaving directory '/home/ghhann/Programs/16bitsystems/Amiga/amiberry/external/mt32emu/build/CMakeFiles/CMakeScratch/TryCompile-sPtJp8'

My understandis that the neon command is not necessary any more....But your the experts

midwan commented 9 months ago

I'm going to take a guess here, and say that you're trying to compile the 32-bit version on a 64-bit OS.. ;)

ghhann commented 9 months ago

Yes it’s the 64bit os. Do you need to use those options or can we add a new platform build code?

is there software compatibilities running it on 64 bit?

What can I do to help?

midwan commented 9 months ago

Just pick the right option during the compile: https://github.com/BlitterStudio/amiberry/wiki/Available-Platforms

ghhann commented 9 months ago

I did I used the rpi4 64 sdl and got the same error. Not sure but it’s also being check in the line where you check for the string rpi4 and setting the neon etc

midwan commented 9 months ago

@ghhann The NEON options are only used when a 32-bit target is selected. For the RPI4, you should be using PLATFORM=rpi4-64-sdl2. I have automated builds running for the last 3 debian releases, so we know the builds work :)

giantclambake commented 9 months ago

I did I used the rpi4 64 sdl and got the same error.

My guess is this must be literal ...ie; 'rpi4 64 sdl' with no hyphens ...that's wrong, it will delimit after 'rpi4', and produce this error.

As midwan has pointed out, for the RPI4, you should be using PLATFORM=rpi4-64-sdl2 (including hyphens)

edit: just for completeness, I confirm the build process completes successfully on rpi4 / debian 12.5