Created attachment 214947 [details] libretro-xrick-v1.diff Libretro implementation of "Rick Dangerous"
I'm pinging this port because it's one of my libretro cores pending to evaluation and it's being 6 months already.
Hi Daniel This one fails with: ===> Building for libretro-xrick-0.20200527 gmake[1]: Entering directory '/wrkdirs/usr/ports/games/libretro-xrick/work/xrick-libretro-5099ffa' gcc -O2 -pipe -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9 -isystem /usr/local/include -fno-strict-aliasing -O2 -DNDEBUG -DWANT_ZLIB -fsigned-char -Wno-strict-prototypes -ffast-math -fomit-frame-pointer -fno-builtin -I./include -I./include/compat -I./src -I./libretro -I./libretro/sdl_wrapp -I./libretro/include -D__LIBRETRO__ -DINLINE="inline" -fPIC -DALIGN_DWORD -c -osrc/unzip.o src/unzip.c gcc -O2 -pipe -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9 -isystem /usr/local/include -fno-strict-aliasing -O2 -DNDEBUG -DWANT_ZLIB -fsigned-char -Wno-strict-prototypes -ffast-math -fomit-frame-pointer -fno-builtin -I./include -I./include/compat -I./src -I./libretro -I./libretro/sdl_wrapp -I./libretro/include -D__LIBRETRO__ -DINLINE="inline" -fPIC -DALIGN_DWORD -c -osrc/data.o src/data.c gcc -O2 -pipe -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9 -isystem /usr/local/include -fno-strict-aliasing -O2 -DNDEBUG -DWANT_ZLIB -fsigned-char -Wno-strict-prototypes -ffast-math -fomit-frame-pointer -fno-builtin -I./include -I./include/compat -I./src -I./libretro -I./libretro/sdl_wrapp -I./libretro/include -D__LIBRETRO__ -DINLINE="inline" -fPIC -DALIGN_DWORD -c -osrc/scr_xrick.o src/scr_xrick.c gcc -O2 -pipe -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9 -isystem /usr/local/include -fno-strict-aliasing -O2 -DNDEBUG -DWANT_ZLIB -fsigned-char -Wno-strict-prototypes -ffast-math -fomit-frame-pointer -fno-builtin -I./include -I./include/compat -I./src -I./libretro -I./libretro/sdl_wrapp -I./libretro/include -D__LIBRETRO__ -DINLINE="inline" -fPIC -DALIGN_DWORD -c -osrc/scr_pause.o src/scr_pause.c /bin/sh: gcc: not found gmake[1]: *** [Makefile.libretro:426: src/unzip.o] Error 127 gmake[1]: *** Waiting for unfinished jobs.... /bin/sh: gcc: not found gmake[1]: *** [Makefile.libretro:426: src/data.o] Error 127 /bin/sh: gcc: not found gmake[1]: *** [Makefile.libretro:426: src/scr_xrick.o] Error 127 /bin/sh: gcc: not found gmake[1]: *** [Makefile.libretro:426: src/scr_pause.o] Error 127 gmake[1]: Leaving directory '/wrkdirs/usr/ports/games/libretro-xrick/work/xrick-libretro-5099ffa' ===> Compilation failed unexpectedly.
(In reply to Max Brazhnikov from comment #2) Strange, he's missing gcc for some reason, works fine here. Look at mine: gcc -o xrick_libretro.so -fPIC -shared -Wl,--version-script=./libretro/core/link.T -Wl,--no-undefined ./src/unzip.o ./src/data.o ./src/scr_xrick.o ./src/scr_pause.o ./src/scr_imain.o ./src/scr_imap.o ./src/scr_gameover.o ./src/scr_getname.o ./src/dat_picsPC.o ./src/dat_picsST.o ./src/dat_screens.o ./src/dat_tilesPC.o ./src/dat_tilesST.o ./src/dat_maps.o ./src/dat_ents.o ./src/dat_spritesST.o ./src/dat_spritesPC.o ./src/ents.o ./src/e_bullet.o ./src/e_bomb.o ./src/e_rick.o ./src/e_sbonus.o ./src/e_them.o ./src/e_bonus.o ./src/e_box.o ./src/rects.o ./src/util.o ./src/game.o ./src/xrick.o ./src/draw.o ./src/maps.o ./src/sysvid.o ./src/syskbd.o ./src/control.o ./src/system.o ./src/scroller.o ./src/sysevt.o ./src/sysarg.o ./src/sysjoy.o ./src/dat_snd.o ./libretro/core/soundplay.o ./libretro/sdl_wrapp/sdl_primitives.o ./libretro/sdl_wrapp/bmp.o ./libretro/core/libretro-core.o ./libretro/core/core-mapper.o ./deps/libz/adler32.o ./deps/libz/crc32.o ./deps/libz/inflate.o ./deps/libz/inftrees.o ./deps/libz/inffast.o ./deps/libz/zutil.o -L/usr/home/menelkir/Development/ports/games/libretro-xrick/work -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9 -L/usr/local/lib/gcc9 -lm gmake[1]: Leaving directory '/usr/home/menelkir/Development/ports/games/libretro-xrick/work/xrick-libretro-5099ffa' ===> Staging for libretro-xrick-0.20200527 ===> libretro-xrick-0.20200527 depends on executable: gcc9 - found ===> Generating temporary packing list /bin/mkdir -p /usr/home/menelkir/Development/ports/games/libretro-xrick/work/stage//usr/local/lib/libretro; install -s -m 0644 /usr/home/menelkir/Development/ports/games/libretro-xrick/work/xrick-libretro-5099ffa/xrick_libretro.so /usr/home/menelkir/Development/ports/games/libretro-xrick/work/stage//usr/local/lib/libretro; ====> Compressing man pages (compress-man)
Created attachment 220692 [details] libretro-xrick-v2.diff Updated to last commit and removed the compiler from USES.
(In reply to Daniel Menelkir from comment #3) well, apparently you have gcc in your system, but it's not available in a clean environment. USES=compiler:gcc-c++11-lib pulls gcc9, but not gcc. Btw, are these libretro ports really need gcc to build or their Makefiles hardcode gcc as compiler?
(In reply to Max Brazhnikov from comment #5) It was necessary, it seems it compiles just fine without gcc now.
(In reply to Daniel Menelkir from comment #6) FreeBSD doesn't have gcc by default. System cc is clang and ports are supposed to respect CC and CXX, see for details: https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/dads-cc.html
(In reply to Max Brazhnikov from comment #7) --- Makefile.libretro.orig 2020-10-07 22:50:55 UTC +++ Makefile.libretro @@ -39,7 +39,7 @@ ifeq ($(platform), android) SHARED := -Wl,--fix-cortex-a8 -llog --shared -Wl,--version-script=$(CORE_DIR)/libretro/core/link.T -Wl,--no-undefined else ifeq ($(platform), unix) - CC = gcc + CC?= gcc TARGET := $(TARGET_NAME)_libretro.so fpic := -fPIC ifneq ($(findstring SunOS,$(shell uname -a)),) It compiles with default cc with this patch. Could you run-test it?
(In reply to Max Brazhnikov from comment #8) I think you missed my last patch.
(In reply to Daniel Menelkir from comment #9) I didn't, but it doesn't matter. The problem is that this project doesn't respect CC - see original Makefile.libretro from the sources and my patch. I suppose other libretro ports can be fixed in a similar way.
(In reply to Max Brazhnikov from comment #10) So if a port needs to use gcc, it's wrong? Then this information is inaccurate? https://www.freebsd.org/doc/en/books/porters-handbook/uses-compiler.html
Created attachment 220695 [details] libretro-xrick-v3.diff Patch included.
A commit references this bug: Author: makc Date: Fri Dec 18 12:16:24 UTC 2020 New revision: 558369 URL: https://svnweb.freebsd.org/changeset/ports/558369 Log: Add new port games/libretro-xrick: Libretro implementation of "Rick Dangerous". https://github.com/libretro/xrick-libretro PR: 246795 Submitted by: Daniel Menelkir Changes: head/games/Makefile head/games/libretro-xrick/ head/games/libretro-xrick/Makefile head/games/libretro-xrick/distinfo head/games/libretro-xrick/files/ head/games/libretro-xrick/files/patch-Makefile.libretro head/games/libretro-xrick/pkg-descr
(In reply to Daniel Menelkir from comment #11) Nothing is wrong with this info. The question is does this port really need gcc? It can't be built with clang or doesn't work as expected when it is built with clang? If it indeed relies on specific gcc features, so be it. But if upstream hardcoded gcc in Makefile for no reason, then it is a bug - it forces users to install one more compiler, when there is already one in the system.
(In reply to commit-hook from comment #13) Committed with minor tweaks: USE_LDCONFIG is not needed for this port, as it doesn't install shared libraries.