libretro / REminiscence

Flashback engine reimplementation
15 stars 15 forks source link

Build issue : compat/posix_string.h: No such file or directory #1

Closed kwyxz closed 6 years ago

kwyxz commented 6 years ago

I am getting the following error both on Haiku and Debian GNU/Linux stable:

gcc -c -o 3rdparty/libretro-common/file/file_path.o 3rdparty/libretro-common/file/file_path.c  -DUSE_MODPLUG -DHAVE_SINF -DMODPLUG_BASIC_SUPPORT -DHAVE_SETENV -O2 -DNDEBUG -funroll-loops -fPIC  -I./3rdparty -I./3rdparty/libco -I./3rdparty/libretro-common/include -I./src -I./3rdparty/libmodplug/src -I./3rdparty/libmodplug/src/libmodplug   -Wall -Wno-sign-compare -Wno-unused-variable -Wno-unused-function -Wno-uninitialized  -Wno-strict-aliasing  -DSTDC_HEADERS -D__STDC_LIMIT_MACROS -D__LIBRETRO__  
3rdparty/libretro-common/file/file_path.c:44:10: fatal error: compat/posix_string.h: No such file or directory
 #include <compat/posix_string.h>
          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:496: recipe for target '3rdparty/libretro-common/file/file_path.o' failed
make: *** [3rdparty/libretro-common/file/file_path.o] Error 1
make: *** Waiting for unfinished jobs....

Thanks!

kwyxz commented 6 years ago

Thought I'd try borrowing this file from another core. I got compat/posix_string.h from the tyrquake core, and tried to build again. Welp, it looks even worse now, it fails during linking:

g++ -o reminiscence_libretro.so src/collision.o src/cutscene.o src/file.o src/fs.o src/game.o src/graphics.o src/libretro.o src/menu.o src/mixer.o src/mod_player.o src/piege.o src/resource.o src/resource_aba.o src/seq_player.o src/sfx_player.o src/staticres.o src/video.o 3rdparty/libmodplug/src/sndmix.o 3rdparty/libmodplug/src/sndfile.o 3rdparty/libmodplug/src/snd_fx.o 3rdparty/libmodplug/src/snd_flt.o 3rdparty/libmodplug/src/snd_dsp.o 3rdparty/libmodplug/src/fastmix.o 3rdparty/libmodplug/src/mmcmp.o 3rdparty/libmodplug/src/load_xm.o 3rdparty/libmodplug/src/load_wav.o 3rdparty/libmodplug/src/load_s3m.o 3rdparty/libmodplug/src/load_mod.o 3rdparty/libmodplug/src/load_it.o 3rdparty/libmodplug/src/modplug.o 3rdparty/libco/libco.o src/util.o src/unpack.o 3rdparty/libretro-common/file/file_path.o 3rdparty/libretro-common/string/stdstring.o 3rdparty/libretro-common/compat/compat_strcasestr.o 3rdparty/libretro-common/encodings/encoding_utf.o -lrt -fPIC -shared -Wl,--no-undefined -Wl,--version-script=link.T 
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_noext':
file_path.c:(.text+0x111): undefined reference to `strlcpy_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_slash':
file_path.c:(.text+0x1f3): undefined reference to `strlcpy_retro__'
file_path.c:(.text+0x201): undefined reference to `strlcat_retro__'
file_path.c:(.text+0x21e): undefined reference to `strlcat_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_parent_dir_name':
file_path.c:(.text+0x27a): undefined reference to `strlcpy_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_dated_filename':
file_path.c:(.text+0x2e6): undefined reference to `strlcat_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_basedir':
file_path.c:(.text+0x35a): undefined reference to `strlcpy_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_parent_dir':
file_path.c:(.text+0x4ca): undefined reference to `strlcpy_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname':
file_path.c:(.text+0x666): undefined reference to `strlcpy_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_dir':
file_path.c:(.text+0x6e0): undefined reference to `strlcat_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_join':
file_path.c:(.text+0x826): undefined reference to `strlcpy_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_join_special_ext':
file_path.c:(.text+0x888): undefined reference to `strlcat_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_join_delim':
file_path.c:(.text+0x9ca): undefined reference to `strlcpy_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_short_pathname_representation':
file_path.c:(.text+0xa5e): undefined reference to `strlcpy_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_noext':
file_path.c:(.text+0x123): undefined reference to `strlcat_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_dir':
file_path.c:(.text+0x6f8): undefined reference to `strlcat_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_base':
file_path.c:(.text+0x72a): undefined reference to `strlcpy_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_base_ext':
file_path.c:(.text+0x773): undefined reference to `strlcat_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_resolve_relative':
file_path.c:(.text+0x7e4): undefined reference to `strlcat_retro__'
file_path.c:(.text+0x801): undefined reference to `strlcpy_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_join':
file_path.c:(.text+0x848): undefined reference to `strlcat_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_join_special_ext':
file_path.c:(.text+0x8a0): undefined reference to `strlcat_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_join_concat_noext':
file_path.c:(.text+0x8d3): undefined reference to `strlcat_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_join_concat':
file_path.c:(.text+0x983): undefined reference to `strlcat_retro__'
3rdparty/libretro-common/file/file_path.o: In function `fill_pathname_join_delim':
file_path.c:(.text+0x9eb): undefined reference to `strlcat_retro__'
3rdparty/libretro-common/file/file_path.o:file_path.c:(.text+0xa16): more undefined references to `strlcat_retro__' follow
3rdparty/libretro-common/encodings/encoding_utf.o: In function `utf16_to_char_string':
encoding_utf.c:(.text+0x5c4): undefined reference to `strlcpy_retro__'
collect2: error: ld returned 1 exit status
Makefile:489: recipe for target 'reminiscence_libretro.so' failed
make: *** [reminiscence_libretro.so] Error 1

It's a bit disconcerting because TyrQuake builds fine with very similar code. I'm still looking into this.

kwyxz commented 6 years ago

Fixed by https://github.com/libretro/REminiscence/commit/57e2e2cbe40e5d8c2cdbfa6b2657e2ebdf03ac90