[MacPorts] #67916: Error with gcc on 10.6: ao_coreaudio_utils.c: error: implicit declaration of function 'getpid'

MacPorts noreply at macports.org
Sun Aug 6 03:48:51 UTC 2023


#67916: Error with gcc on 10.6: ao_coreaudio_utils.c: error: implicit declaration
of function 'getpid'
--------------------------+------------------------
 Reporter:  barracuda156  |      Owner:  i0ntempest
     Type:  defect        |     Status:  assigned
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.8.1
 Keywords:  powerpc       |       Port:  mpv
--------------------------+------------------------
 {{{
 ../audio/out/ao_coreaudio_utils.c: In function 'ca_lock_device':
 ../audio/out/ao_coreaudio_utils.c:355:12: error: implicit declaration of
 function 'getpid' [-Werror=implicit-function-declaration]
   355 |     *pid = getpid();
       |            ^~~~~~
 ../audio/out/ao_coreaudio_utils.c: In function
 'ca_change_physical_format_sync':
 ../audio/out/ao_coreaudio_utils.c:493:42: warning: passing argument 3 of
 'AudioObjectAddPropertyListener' from incompatible pointer type
 [-Wincompatible-pointer-types]
   493 |
 ca_change_format_listener,
       |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~
       |                                          |
       |                                          OSStatus
 (*)(AudioObjectID,  uint32_t,  const AudioObjectPropertyAddress *, void *)
 {aka long int (*)(long unsigned int,  unsigned int,  const
 AudioObjectPropertyAddress *, void *)}
 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:537:69:
 note: expected 'AudioObjectPropertyListenerProc' {aka 'long int (*)(long
 unsigned int,  long unsigned int,  const AudioObjectPropertyAddress *,
 void *)'} but argument is of type 'OSStatus (*)(AudioObjectID,  uint32_t,
 const AudioObjectPropertyAddress *, void *)' {aka 'long int (*)(long
 unsigned int,  unsigned int,  const AudioObjectPropertyAddress *, void
 *)'}
   537 |                                 AudioObjectPropertyListenerProc
 inListener,
       |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
 ../audio/out/ao_coreaudio_utils.c:531:45: warning: passing argument 3 of
 'AudioObjectRemovePropertyListener' from incompatible pointer type
 [-Wincompatible-pointer-types]
   531 |
 ca_change_format_listener,
       |
 ^~~~~~~~~~~~~~~~~~~~~~~~~
       |                                             |
       |                                             OSStatus
 (*)(AudioObjectID,  uint32_t,  const AudioObjectPropertyAddress *, void *)
 {aka long int (*)(long unsigned int,  unsigned int,  const
 AudioObjectPropertyAddress *, void *)}
 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:560:73:
 note: expected 'AudioObjectPropertyListenerProc' {aka 'long int (*)(long
 unsigned int,  long unsigned int,  const AudioObjectPropertyAddress *,
 void *)'} but argument is of type 'OSStatus (*)(AudioObjectID,  uint32_t,
 const AudioObjectPropertyAddress *, void *)' {aka 'long int (*)(long
 unsigned int,  unsigned int,  const AudioObjectPropertyAddress *, void
 *)'}
   560 |
 AudioObjectPropertyListenerProc     inListener,
       |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
 cc1: some warnings being treated as errors

 Waf: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/work/mpv-0.36.0/build'
   File
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/work/mpv-0.36.0/./waf",
 line 168, in <module>
     Scripting.waf_entry_point(cwd, VERSION, wafdir)
   File
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/work/mpv-0.36.0/.waf3-2.0.23-7dbdd0b348178777c338c9a31f6218a5/waflib/Scripting.py",
 line 119, in waf_entry_point
     run_commands()
   File
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/work/mpv-0.36.0/.waf3-2.0.23-7dbdd0b348178777c338c9a31f6218a5/waflib/Scripting.py",
 line 182, in run_commands
     ctx=run_command(cmd_name)
   File
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/work/mpv-0.36.0/.waf3-2.0.23-7dbdd0b348178777c338c9a31f6218a5/waflib/Scripting.py",
 line 173, in run_command
     ctx.execute()
   File
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/work/mpv-0.36.0/.waf3-2.0.23-7dbdd0b348178777c338c9a31f6218a5/waflib/Scripting.py",
 line 375, in execute
     return execute_method(self)
   File
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/work/mpv-0.36.0/.waf3-2.0.23-7dbdd0b348178777c338c9a31f6218a5/waflib/Build.py",
 line 93, in execute
     self.execute_build()
   File
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/work/mpv-0.36.0/.waf3-2.0.23-7dbdd0b348178777c338c9a31f6218a5/waflib/Build.py",
 line 100, in execute_build
     self.compile()
   File
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/work/mpv-0.36.0/.waf3-2.0.23-7dbdd0b348178777c338c9a31f6218a5/waflib/Tools/errcheck.py",
 line 140, in check_compile
     ret=self.orig_compile()
   File
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/work/mpv-0.36.0/.waf3-2.0.23-7dbdd0b348178777c338c9a31f6218a5/waflib/Build.py",
 line 176, in compile
     raise Errors.BuildError(self.producer.error)
   File
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/work/mpv-0.36.0/.waf3-2.0.23-7dbdd0b348178777c338c9a31f6218a5/waflib/Errors.py",
 line 26, in __init__
     WafError.__init__(self,self.format_error())

 Build failed
  -> task in 'objects' failed with exit status 1:
         {task 42357400: c ao_coreaudio_utils.c ->
 ao_coreaudio_utils.c.21.o}
 ['/opt/local/bin/gcc-mp-12', '-pipe', '-Os',
 '-isysroot/Developer/SDKs/MacOSX10.6.sdk', '-arch', 'ppc',
 '-D_ISOC99_SOURCE', '-D_GNU_SOURCE', '-D_FILE_OFFSET_BITS=64', '-Wall',
 '-std=c11', '-O2', '-Werror=implicit-function-declaration', '-Wno-error
 =deprecated-declarations', '-Wno-error=unused-function', '-Wempty-body',
 '-Wdisabled-optimization', '-Wstrict-prototypes', '-Wno-format-zero-
 length', '-Werror=format-security', '-Wno-redundant-decls', '-Wvla',
 '-Wno-format-truncation', '-Wimplicit-fallthrough', '-fno-math-errno',
 '-Wall', '-Wundef', '-Wmissing-prototypes', '-Wshadow', '-Wno-switch',
 '-Wparentheses', '-Wpointer-arith', '-Wno-pointer-sign', '-Wno-unused-
 result', '-pthread', '-I.', '-I..', '-I../../../../../../../../include',
 '-I../../../../../../../../include/harfbuzz',
 '-I../../../../../../../../include/glib-2.0',
 '-I../../../../../../../../lib/glib-2.0/include',
 '-I../../../../../../../../include/fribidi',
 '-I../../../../../../../../include/freetype2',
 '-I../../../../../../../../include/libpng16',
 '-I../../../../../../../../include/libxml2',
 '-I../../../../../../../../include/lua5.2',
 '../audio/out/ao_coreaudio_utils.c', '-c',
 '-o/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/work/mpv-0.36.0/build/audio/out/ao_coreaudio_utils.c.21.o',
 '-isystem/opt/local/include/LegacySupport', '-isystem/opt/local/include',
 '-isysroot/Developer/SDKs/MacOSX10.6.sdk']
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mpv/mpv/work/mpv-0.36.0"
 && /opt/local/bin/python3.11 ./waf build -v --verbose
 Exit code: 1
 Error: Failed to build mpv: command execution failed
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/67916>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list