irixxxx/picodrive

Compilation issue with fill_pathname_join on arm

Closed this issue · 3 comments

Compiling for platform="unix armv7 neon armv neon hardfloat" results on an undefined fill_pathname_join linking error:

/rk3128/host/bin/arm-buildroot-linux-gnueabihf-gcc -o picodrive_libretro.so platform/libretro/libretro.o platform/libretro/libretro-common/compat/compat_strcasestr.o platform/libretro/libretro-common/compat/compat_posix_string.o platform/libretro/libretro-common/compat/compat_strl.o platform/libretro/libretro-common/compat/fopen_utf8.o platform/libretro/libretro-common/memmap/memmap.o platform/libretro/libretro-common/encodings/encoding_utf.o platform/libretro/libretro-common/string/stdstring.o platform/libretro/libretro-common/streams/file_stream.o platform/libretro/libretro-common/streams/file_stream_transforms.o platform/libretro/libretro-common/vfs/vfs_implementation.o platform/common/mp3.o platform/common/mp3_sync.o platform/common/mp3_drmp3.o pico/cd/libchdr/src/libchdr_chd.o pico/cd/libchdr/src/libchdr_cdrom.o pico/cd/libchdr/src/libchdr_flac.o pico/cd/libchdr/src/libchdr_bitstream.o pico/cd/libchdr/src/libchdr_huffman.o pico/cd/libchdr/deps/lzma-19.00/src/CpuArch.o pico/cd/libchdr/deps/lzma-19.00/src/Alloc.o pico/cd/libchdr/deps/lzma-19.00/src/LzmaEnc.o pico/cd/libchdr/deps/lzma-19.00/src/Sort.o pico/cd/libchdr/deps/lzma-19.00/src/LzmaDec.o pico/cd/libchdr/deps/lzma-19.00/src/LzFind.o pico/cd/libchdr/deps/lzma-19.00/src/Delta.o zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o zlib/uncompr.o unzip/unzip.o pico/pico.o pico/cart.o pico/memory.o pico/state.o pico/sek.o pico/z80if.o pico/videoport.o pico/draw2.o pico/draw.o pico/mode4.o pico/misc.o pico/eeprom.o pico/patch.o pico/debug.o pico/media.o pico/sms.o pico/cd/mcd.o pico/cd/memory.o pico/cd/sek.o pico/cd/cdc.o pico/cd/cdd.o pico/cd/cd_image.o pico/cd/cd_parse.o pico/cd/gfx.o pico/cd/gfx_dma.o pico/cd/misc.o pico/cd/pcm.o pico/32x/32x.o pico/32x/memory.o pico/32x/draw.o pico/32x/sh2soc.o pico/32x/pwm.o pico/pico/pico.o pico/pico/memory.o pico/pico/xpcm.o pico/carthw/carthw.o pico/carthw/eeprom_spi.o pico/carthw/svp/svp.o pico/carthw/svp/memory.o pico/carthw/svp/ssp16.o pico/sound/sound.o pico/sound/resampler.o pico/sound/sn76496.o pico/sound/ym2612.o pico/sound/emu2413/emu2413.o pico/sound/mix.o cpu/fame/famec.o cpu/cz80/cz80.o cpu/drc/cmn.o cpu/sh2/sh2.o cpu/sh2/compiler.o cpu/sh2/mame/sh2pico.o  -Ipico/cd/libchdr/include  -Ipico/cd/libchdr/deps/lzma-19.00/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O3 -g0 -D_FORTIFY_SOURCE=1 -I platform/libretro/libretro-common/include -I platform/libretro/libretro-common/include/compat -I platform/libretro/libretro-common/include/encodings -I platform/libretro/libretro-common/include/streams -I platform/libretro/libretro-common/include/string -I platform/libretro/libretro-common/include/vfs -DGIT_VERSION=\"a987b67\" -marm -mfpu=neon -mfloat-abi=hard -DNO_ZLIB -D__LIBRETRO__ -DUSE_LIBRETRO_VFS -fPIC -O3 -DNDEBUG -I/rk3128/build/libretro-picodrive-a987b67801e39b3ad5d349253ef53070b7d3272b -falign-functions=2 -DUSE_LIBCHDR -Izlib -DEMU_F68K -D_USE_CZ80 -DDRC_SH2 -shared -Wl,--no-undefined,-Bsymbolic -fPIC -Wl,-Map=picodrive_libretro.so.map -lm
/rk3128/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.3.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: platform/libretro/libretro-common/vfs/vfs_implementation.o: in function `retro_vfs_dirent_is_dir_impl':
vfs_implementation.c:(.text+0x654): undefined reference to `fill_pathname_join'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:335: picodrive_libretro.so] Error 1
make[1]: Leaving directory '/rk3128/build/libretro-picodrive-a987b67801e39b3ad5d349253ef53070b7d3272b'

libretro-common/file/file_path.c where fill_pathname_join is declared seems to be missing.

Adding the missing file_path.c (and dependencies) from libretro-common fixes the compilation issue.

Patch is available as part of this patch

fixed with 47e73a9

There are include files missing, besides the problem has already been solved sometime ago on the libretro picodrive. So:

  • remove 2 commits from my repo by force-push (meh...)
  • merge my repo to libretro
  • merge back libretro to my repo

Going to do this for the next release (in planning stage). It will take some time though, since there are also some other changes I'd like to incorporate.

If you need a short term solution, use the libretro picodrive.

fixed with a5085db by merging changes from lr-picodrive