[MacPorts] #68300: premake5 @5.0.0-beta2: error: call to undeclared function 'getpid'; ISO C99 and later do not support implicit function declarations (was: premake5 archive for Darwin 23 is not present on mirrors)

MacPorts noreply at macports.org
Sat Sep 30 01:18:32 UTC 2023


#68300: premake5 @5.0.0-beta2: error: call to undeclared function 'getpid'; ISO C99
and later do not support implicit function declarations
-----------------------+----------------------
  Reporter:  Iritscen  |      Owner:  amake
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:  sonoma
      Port:  premake5  |
-----------------------+----------------------

Comment (by ryandesign):

 Thanks, the log shows the error is:

 {{{
 ../../contrib/libzip/mkstemp.c:76:8: error: call to undeclared function
 'getpid'; ISO C99 and later do not support implicit function declarations
 [-Wimplicit-function-declaration]
         pid = getpid();
               ^
 1 error generated.
 make[1]: *** [obj/Release/zip-lib/mkstemp.o] Error 1
 make: *** [zip-lib] Error 2
 make: *** Waiting for unfinished jobs....
 }}}

 This appears to be WimplicitFunctionDeclaration although it's interesting
 because usually we see this problem on any system with Xcode 12 and later
 (Catalina and later) yet for premake5 we have successful builds on our
 build system on every system up to Ventura. Maybe on older Xcodes some
 other system header automatically included unistd.h (where `getpid` is
 declared) and maybe that's no longer the case in Xcode 15.

 Also, I see that the error is in a file in a directory called libzip. If
 this is the same [https://ports.macports.org/port/libzip libzip] that we
 have available as a separate port in MacPorts, maybe premake5 could be
 changed to use that libzip instead of making its own.

-- 
Ticket URL: <https://trac.macports.org/ticket/68300#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list