libretro / flycast

Flycast is a multiplatform Sega Dreamcast emulator. NOTE: No longer actively developed, use upstream repo for libretro from now on - https://github.com/flyinghead/flycast
http://reicast.com
GNU General Public License v2.0
155 stars 77 forks source link

[libzip] build failure with GCC14 : error: implicit declaration of function ‘getpid’ [-Wimplicit-function-declaration] #1194

Closed jeandestouches closed 4 months ago

jeandestouches commented 4 months ago

Hello, I cannot compile flycast with gcc14 (gcc12 compile without issue) on my gentoo system.

x86_64-pc-linux-gnu-gcc -DTARGET_LINUX_x64 -DHOST_CPU=0x20000004 -DPICO_SUPPORT_UDP -DPICO_SUPPORT_DHCPD -fopenmp -DLIBRETRO -DHAVE_GLSYM_PRIVATE -DNO_VERIFY -fno-builtin-sqrtf -DENABLE_MODEM -DMINIUPNP_STATICLIB -DNDEBUG -DHAVE_GL3 -funroll-loops -DCORE -DHAVE_TEXUPSCALE -DHAVE_OPENGL -DHAVE_VULKAN -DHAVE_STDINT_H -DHAVE_STDLIB_H -DHAVE_SYS_PARAM_H -D_7ZIP_ST -DUSE_FLAC -DUSE_LZMA -O3 -c -fno-strict-aliasing -fomit-frame-pointer -fPIC -I./core/libretro -I./core/ -I./core/deps -I./core/deps/libchdr/include -I./core/deps/lzma/C -I./core/libretro-common/include -I./core/deps/vixl -I./core/deps/stb -I./core/deps/picotcp/include -I./core/deps/picotcp/modules -I./core/deps/miniupnpc -I./core/deps/khronos -I./core/deps/glslang -I./core/deps/flac/include -DTARGET_LINUX_x64 -DHOST_CPU=0x20000004 -DPICO_SUPPORT_UDP -DPICO_SUPPORT_DHCPD -fopenmp -DLIBRETRO -DHAVE_GLSYM_PRIVATE -DNO_VERIFY -fno-builtin-sqrtf -DENABLE_MODEM -DMINIUPNP_STATICLIB -DNDEBUG -DHAVE_GL3 -funroll-loops -DCORE -DHAVE_TEXUPSCALE -DHAVE_OPENGL -DHAVE_VULKAN -DHAVE_STDINT_H -DHAVE_STDLIB_H -DHAVE_SYS_PARAM_H -D_7ZIP_ST -DUSE_FLAC -DUSE_LZMA -O3 -c -fno-strict-aliasing -fomit-frame-pointer -fPIC core/deps/libzip/mkstemp.c -o core/deps/libzip/mkstemp.o core/deps/libzip/mkstemp.c: In function ‘_zip_mkstemp’: core/deps/libzip/mkstemp.c:70:15: error: implicit declaration of function ‘getpid’ [-Wimplicit-function-declaration] 70 | pid = getpid(); | ^~ make: [Makefile:1183: core/deps/libzip/mkstemp.o] Error 1 make: Waiting for unfinished jobs....

Maybe libzip needs a more recent version ? There is a pull request to update some deps here (unfortunately libzip is not in it) : https://github.com/libretro/flycast/pull/952

Thanks for reading.

flyinghead commented 4 months ago

This repository is no longer used or maintained. Use https://github.com/flyinghead/flycast instead.

jeandestouches commented 4 months ago

Thanks flyinghead, I didn't realize there was a flycast_libretro project in CMakeLists.txt in your repo ! I'll adjust my gentoo ebuild and try that. (edit: It compiles fine with gcc14 now :D )