Skip to content

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

@jeandestouches

Description

@jeandestouches

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 -D__LIBRETRO__ -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 -D__LIBRETRO__ -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....

  • ERROR: games-emulation/libretro-flycast-9999::localrepo failed (compile phase):
  • emake failed

Maybe libzip needs a more recent version ?
There is a pull request to update some deps here (unfortunately libzip is not in it) : #952

Thanks for reading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions