Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

armhf linux build failure. #31

Closed
orbea opened this issue Dec 3, 2017 · 14 comments
Closed

armhf linux build failure. #31

orbea opened this issue Dec 3, 2017 · 14 comments

Comments

@orbea
Copy link

orbea commented Dec 3, 2017

Build failure for the cores-linux-armhf-generic buildbot recipe. I think the bug is here, but I can't test it locally due to a lack of hardware.
https://github.com/libretro/ppsspp/blob/master/libretro/Makefile#L210

g++: error: unrecognized command line option '-marm'
g++: error: unrecognized command line option '-mfpu=neon'
g++: error: unrecognized command line option '-mfloat-abi=hard'
Makefile:444: recipe for target '../ext/native/ext/rg_etc1/rg_etc1.o' failed
make: *** [../ext/native/ext/rg_etc1/rg_etc1.o] Error 1
make: *** Waiting for unfinished jobs....
g++: error: unrecognized command line option '-marm'
g++: error: unrecognized command line option '-mfpu=neon'
g++: error: unrecognized command line option '-marm'
g++: error: unrecognized command line option '-mfloat-abi=hard'
g++: error: unrecognized command line option '-mfpu=neon'
g++: error: unrecognized command line option '-mfloat-abi=hard'
Makefile:444: recipe for target '../ext/native/ext/vjson/json.o' failed
make: *** [../ext/native/ext/vjson/json.o] Error 1
Makefile:444: recipe for target '../ext/native/ext/vjson/block_allocator.o' failed
make: *** [../ext/native/ext/vjson/block_allocator.o] Error 1
g++: error: unrecognized command line option '-marm'
g++: error: unrecognized command line option '-mfpu=neon'
g++: error: unrecognized command line option '-mfloat-abi=hard'
Makefile:444: recipe for target '../ext/native/ext/cityhash/city.o' failed
make: *** [../ext/native/ext/cityhash/city.o] Error 1
g++: error: unrecognized command line option '-marm'
g++: error: unrecognized command line option '-mfpu=neon'
g++: error: unrecognized command line option '-mfloat-abi=hard'
Makefile:444: recipe for target '../ext/snappy/snappy-c.o' failed
make: *** [../ext/snappy/snappy-c.o] Error 1
g++: error: unrecognized command line option '-marm'
g++: error: unrecognized command line option '-mfpu=neon'
g++: error: unrecognized command line option '-mfloat-abi=hard'
Makefile:444: recipe for target '../ext/snappy/snappy.o' failed
make: *** [../ext/snappy/snappy.o] Error 1
COPY CMD: cp -v ppsspp_libretro.so /home/buildbot/buildbot/linux_armhf/dist/unix/ppsspp_libretro.so
cp: cannot stat 'ppsspp_libretro.so': No such file or directory
21:56 <@retrobot> ppsspp: [status: fail] [recipes/linux/cores-linux-armhf-generic] LOG: http://p.0bl.net/103589
@kivutar
Copy link

kivutar commented Dec 7, 2017

When you're getting this kind of errors, it means you-re trying to compile with your own g++, not the cross compiler.

@orbea
Copy link
Author

orbea commented Dec 7, 2017

Yes, its hardcoded to g++, but its hard to fix blindly...

@kivutar
Copy link

kivutar commented Dec 23, 2017

In Lakka, I build it using this https://github.com/libretro/ppsspp/blob/master/libretro/Makefile#L100-L112

Or like this

make platform=armv-gles-neon CC=$CC CXX=$CXX

@gouchi
Copy link

gouchi commented Mar 17, 2018

We should try to remove the hardcoded version and use the correct ones which are present in the default configuration ?

@orbea
Copy link
Author

orbea commented Mar 17, 2018

Thanks for taking a look at this!

@gouchi
Copy link

gouchi commented Mar 20, 2018

No problem, you are welcome.

New log after specifying CC and CXX.

arm-linux-gnueabihf-g++ -std=c++11 -O2 -D_NDEBUG  -D__LIBRETRO__ -DPPSSPP -DUSE_FFMPEG -DGLEW_STATIC -DGLEW_NO_GLU  -I../ffmpeg/linux/arm/include -I. -I. -I.. -I../Common -I../libretro -I../ext/native -I../ext/zlib -I../ext/snappy -I../ffmpeg  -I../ffmpeg/linux/arm/include -I../ext/cityhash -I../ext/armips -I../ext/native/ext -I../ext/native -I../ext/libkirk -I../ext/xbrz -I../ext/xxhash -I../ext/glew  -DARM -fPIC -DARM  -marm -mfpu=neon -D__NEON_OPT -mfloat-abi=hard -D__arm__ -DARM_ASM -DHAVE_OPENGL  -DDYNAREC -D_ARCH_32 -ffunction-sections -fdata-sections -c -o../Core/FileLoaders/RamCachingFileLoader.o ../Core/FileLoaders/RamCachingFileLoader.cpp
In file included from ../ffmpeg/libavutil/avutil.h:288:0,
                 from ../ffmpeg/libavutil/samplefmt.h:24,
                 from ../ffmpeg/libavcodec/avcodec.h:31,
                 from ../Core/AVIDump.cpp:18:
../ffmpeg/libavutil/common.h:45:32: fatal error: libavutil/avconfig.h: No such file or directory
compilation terminated.
Makefile:449: recipe for target '../Core/AVIDump.o' failed
make: *** [../Core/AVIDump.o] Error 1
make: *** Waiting for unfinished jobs....

@orbea
Copy link
Author

orbea commented Mar 21, 2018

I suppose there is a problem with the ffmpeg submodule included, its missing or the Makefile is not using it for some reason?

@gouchi
Copy link

gouchi commented Mar 21, 2018

Not sure if it is related to this include flags as it is not present elsewhere.

@orbea
Copy link
Author

orbea commented Mar 24, 2018

@gouchi Mind making an issue for an more current repo?

@orbea orbea closed this as completed Mar 24, 2018
@orbea
Copy link
Author

orbea commented Mar 24, 2018

Here is a new build log.

BUILD CMD: make -f Makefile platform=unix -j6 platform=armv7-neon-hardfloat ARCH=arm CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++
arm-linux-gnueabihf-g++ -std=c++11 -O2 -D_NDEBUG  -D__LIBRETRO__ -DPPSSPP -DUSE_FFMPEG -DGLEW_STATIC -DGLEW_NO_GLU  -I../ffmpeg/linux/x86_64/include -I. -I. -I.. -I../Common -I../libretro -I../ext/native -I../ext/zlib -I../ext/snappy -I../ffmpeg  -I../ffmpeg/linux/x86_64/include -I../ext/cityhash -I../ext/armips -I../ext/native/ext -I../ext/native -I../ext/libkirk -I../ext/xbrz -I../ext/xxhash -I../ext/glew  -DARM -fPIC -DARM  -marm -mfpu=neon -D__NEON_OPT -mfloat-abi=hard -D__arm__ -DARM_ASM -msse -msse2 -D_M_X64 -D_ARCH_64 -DHAVE_OPENGL  -DDYNAREC -ffunction-sections -fdata-sections -c -o../ext/snappy/snappy-c.o ../ext/snappy/snappy-c.cpp
arm-linux-gnueabihf-g++ -std=c++11 -O2 -D_NDEBUG  -D__LIBRETRO__ -DPPSSPP -DUSE_FFMPEG -DGLEW_STATIC -DGLEW_NO_GLU  -I../ffmpeg/linux/x86_64/include -I. -I. -I.. -I../Common -I../libretro -I../ext/native -I../ext/zlib -I../ext/snappy -I../ffmpeg  -I../ffmpeg/linux/x86_64/include -I../ext/cityhash -I../ext/armips -I../ext/native/ext -I../ext/native -I../ext/libkirk -I../ext/xbrz -I../ext/xxhash -I../ext/glew  -DARM -fPIC -DARM  -marm -mfpu=neon -D__NEON_OPT -mfloat-abi=hard -D__arm__ -DARM_ASM -msse -msse2 -D_M_X64 -D_ARCH_64 -DHAVE_OPENGL  -DDYNAREC -ffunction-sections -fdata-sections -c -o../ext/snappy/snappy.o ../ext/snappy/snappy.cpp
arm-linux-gnueabihf-g++ -std=c++11 -O2 -D_NDEBUG  -D__LIBRETRO__ -DPPSSPP -DUSE_FFMPEG -DGLEW_STATIC -DGLEW_NO_GLU  -I../ffmpeg/linux/x86_64/include -I. -I. -I.. -I../Common -I../libretro -I../ext/native -I../ext/zlib -I../ext/snappy -I../ffmpeg  -I../ffmpeg/linux/x86_64/include -I../ext/cityhash -I../ext/armips -I../ext/native/ext -I../ext/native -I../ext/libkirk -I../ext/xbrz -I../ext/xxhash -I../ext/glew  -DARM -fPIC -DARM  -marm -mfpu=neon -D__NEON_OPT -mfloat-abi=hard -D__arm__ -DARM_ASM -msse -msse2 -D_M_X64 -D_ARCH_64 -DHAVE_OPENGL  -DDYNAREC -ffunction-sections -fdata-sections -c -o../ext/xbrz/xbrz.o ../ext/xbrz/xbrz.cpp
arm-linux-gnueabihf-g++ -std=c++11 -O2 -D_NDEBUG  -D__LIBRETRO__ -DPPSSPP -DUSE_FFMPEG -DGLEW_STATIC -DGLEW_NO_GLU  -I../ffmpeg/linux/x86_64/include -I. -I. -I.. -I../Common -I../libretro -I../ext/native -I../ext/zlib -I../ext/snappy -I../ffmpeg  -I../ffmpeg/linux/x86_64/include -I../ext/cityhash -I../ext/armips -I../ext/native/ext -I../ext/native -I../ext/libkirk -I../ext/xbrz -I../ext/xxhash -I../ext/glew  -DARM -fPIC -DARM  -marm -mfpu=neon -D__NEON_OPT -mfloat-abi=hard -D__arm__ -DARM_ASM -msse -msse2 -D_M_X64 -D_ARCH_64 -DHAVE_OPENGL  -DDYNAREC -ffunction-sections -fdata-sections -c -o../ext/native/ext/vjson/json.o ../ext/native/ext/vjson/json.cpp
arm-linux-gnueabihf-g++ -std=c++11 -O2 -D_NDEBUG  -D__LIBRETRO__ -DPPSSPP -DUSE_FFMPEG -DGLEW_STATIC -DGLEW_NO_GLU  -I../ffmpeg/linux/x86_64/include -I. -I. -I.. -I../Common -I../libretro -I../ext/native -I../ext/zlib -I../ext/snappy -I../ffmpeg  -I../ffmpeg/linux/x86_64/include -I../ext/cityhash -I../ext/armips -I../ext/native/ext -I../ext/native -I../ext/libkirk -I../ext/xbrz -I../ext/xxhash -I../ext/glew  -DARM -fPIC -DARM  -marm -mfpu=neon -D__NEON_OPT -mfloat-abi=hard -D__arm__ -DARM_ASM -msse -msse2 -D_M_X64 -D_ARCH_64 -DHAVE_OPENGL  -DDYNAREC -ffunction-sections -fdata-sections -c -o../ext/native/ext/vjson/block_allocator.o ../ext/native/ext/vjson/block_allocator.cpp
arm-linux-gnueabihf-g++ -std=c++11 -O2 -D_NDEBUG  -D__LIBRETRO__ -DPPSSPP -DUSE_FFMPEG -DGLEW_STATIC -DGLEW_NO_GLU  -I../ffmpeg/linux/x86_64/include -I. -I. -I.. -I../Common -I../libretro -I../ext/native -I../ext/zlib -I../ext/snappy -I../ffmpeg  -I../ffmpeg/linux/x86_64/include -I../ext/cityhash -I../ext/armips -I../ext/native/ext -I../ext/native -I../ext/libkirk -I../ext/xbrz -I../ext/xxhash -I../ext/glew  -DARM -fPIC -DARM  -marm -mfpu=neon -D__NEON_OPT -mfloat-abi=hard -D__arm__ -DARM_ASM -msse -msse2 -D_M_X64 -D_ARCH_64 -DHAVE_OPENGL  -DDYNAREC -ffunction-sections -fdata-sections -c -o../ext/native/ext/cityhash/city.o ../ext/native/ext/cityhash/city.cpp
arm-linux-gnueabihf-g++: error: unrecognized command line option '-msse'
arm-linux-gnueabihf-g++: error: unrecognized command line option '-msse2'
Makefile:435: recipe for target '../ext/snappy/snappy-c.o' failed
make: *** [../ext/snappy/snappy-c.o] Error 1
make: *** Waiting for unfinished jobs....
arm-linux-gnueabihf-g++: error: unrecognized command line option '-msse'
arm-linux-gnueabihf-g++: error: unrecognized command line option '-msse2'
Makefile:435: recipe for target '../ext/snappy/snappy.o' failed
make: *** [../ext/snappy/snappy.o] Error 1
arm-linux-gnueabihf-g++: error: unrecognized command line option '-msse'
arm-linux-gnueabihf-g++: error: unrecognized command line option '-msse2'
Makefile:435: recipe for target '../ext/native/ext/cityhash/city.o' failed
make: *** [../ext/native/ext/cityhash/city.o] Error 1
arm-linux-gnueabihf-g++: error: unrecognized command line option '-msse'
arm-linux-gnueabihf-g++: error: unrecognized command line option '-msse2'
Makefile:435: recipe for target '../ext/native/ext/vjson/block_allocator.o' failed
make: *** [../ext/native/ext/vjson/block_allocator.o] Error 1
arm-linux-gnueabihf-g++: error: unrecognized command line option '-msse'
arm-linux-gnueabihf-g++: error: unrecognized command line option '-msse2'
Makefile:435: recipe for target '../ext/xbrz/xbrz.o' failed
make: *** [../ext/xbrz/xbrz.o] Error 1
arm-linux-gnueabihf-g++: error: unrecognized command line option '-msse'
arm-linux-gnueabihf-g++: error: unrecognized command line option '-msse2'
Makefile:435: recipe for target '../ext/native/ext/vjson/json.o' failed
make: *** [../ext/native/ext/vjson/json.o] Error 1
BUILD CMD /home/buildbot/buildbot/linux_armhf/retrolink.sh ./ppsspp_libretro.so
readelf: Error: './ppsspp_libretro.so': No such file
readelf: Error: './ppsspp_libretro.so': No such file
COPY CMD: cp -v ./ppsspp_libretro.so /home/buildbot/buildbot/linux_armhf/dist/unix//ppsspp_libretro.so
cp: cannot stat './ppsspp_libretro.so': No such file or directory

@gouchi
Copy link

gouchi commented Mar 25, 2018

We should not get

/ffmpeg/linux/x86_64/include

The compilation starts with

make -f Makefile platform=unix -j6 platform=armv7-neon-hardfloat ARCH=arm CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ clean

There are two platform variables.

@orbea
Copy link
Author

orbea commented Mar 25, 2018

Looks like that is a buildbot issue, I'll try to figure out where the extra platform=unix is coming from.

@orbea
Copy link
Author

orbea commented Mar 25, 2018

platform=armv7-neon-hardfloat is set in the recipe.

ppsspp libretro-ppsspp https://github.com/libretro/ppsspp.git master YES GENERIC_GL Makefile libretro platform=armv7-neon-hardfloat ARCH=arm CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++

https://github.com/libretro/libretro-super/blob/master/recipes/linux/cores-linux-armhf-generic

and platform=unix is in the buildbot script.

eval "set -- ${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${CORE_ARGS}"
echo "BUILD CMD: $@" 2>&1 | tee -a "$LOGFILE"
"$@" 2>&1 | tee -a "$LOGFILE"

https://github.com/libretro/libretro-super/blob/master/libretro-buildbot-recipe.sh#L388

@gouchi
Copy link

gouchi commented Apr 6, 2018

New log after this commit.

CPUFLAGS are wrong they are coming from Makefile.common from here because TARGET_ARCH is not arm.

I will be glad to know why there are those lines in the beginning of the Makefile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants