[MacPorts] #70267: libgpg-error @1.50 does not build: Undefined symbols: "_environ"

MacPorts noreply at macports.org
Fri Jun 21 03:17:34 UTC 2024


#70267: libgpg-error @1.50 does not build: Undefined symbols: "_environ"
--------------------------+--------------------------
 Reporter:  barracuda156  |      Owner:  Schamschula
     Type:  defect        |     Status:  assigned
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.9.3
 Keywords:                |       Port:  libgpg-error
--------------------------+--------------------------
 The patch used in https://github.com/macports/macports-
 ports/commit/72a1a9efe3711c6dcfeb8bedc96fe837ef0fe7dd fails to work:

 {{{
 Undefined symbols:
   "_environ", referenced from:
       _environ$non_lazy_ptr in libgpg_error_la-spawn-posix.o
 ld: symbol(s) not found
 }}}

 Unfortunately, replacing it with what is usually correct:

 {{{
 #ifdef __APPLE__
 # include <crt_externs.h>
 # define environ (*_NSGetEnviron())
 #else
   extern char **environ;
 #endif
 }}}

 does not work here:

 {{{
 libtool: compile:  /usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I..
 -DLOCALEDIR=\"/opt/local/share/locale\" -I/opt/local/include -pipe -Os
 -arch ppc -Wall -Wpointer-arith -MT libgpg_error_la-version.lo -MD -MP -MF
 .deps/libgpg_error_la-version.Tpo -c version.c  -fno-common -DPIC -o .libs
 /libgpg_error_la-version.o
 spawn-posix.c:72: error: field '_NSGetEnviron' declared as a function
 spawn-posix.c: In function 'my_exec':
 spawn-posix.c:350: error: expected identifier before '(' token
 spawn-posix.c:351: error: expected identifier before '(' token
 spawn-posix.c: In function '_gpgrt_spawn_actions_set_environ':
 spawn-posix.c:456: error: expected identifier before '(' token
 libtool: compile:  /usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I..
 -DLOCALEDIR=\"/opt/local/share/locale\" -I/opt/local/include -pipe -Os
 -arch ppc -Wall -Wpointer-arith -MT libgpg_error_la-init.lo -MD -MP -MF
 .deps/libgpg_error_la-init.Tpo -c init.c  -fno-common -DPIC -o .libs
 /libgpg_error_la-init.o
 make[3]: *** [libgpg_error_la-spawn-posix.lo] Error 1
 make[3]: *** Waiting for unfinished jobs....
 }}}

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


More information about the macports-tickets mailing list