Opened 4 months ago
Last modified 4 months ago
#70267 closed defect
libgpg-error @1.50 does not build: Undefined symbols: "_environ" — at Initial Version
Reported by: | barracuda156 | Owned by: | Schamschula (Marius Schamschula) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.3 |
Keywords: | legacy-os tiger leopard snowleopard lion haspatch | Cc: | |
Port: | libgpg-error |
Description
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....
Note: See
TracTickets for help on using
tickets.