while emerging ghostscript-afpl-8.15 / ghostscript-gnu-8.16 I ran into the following error gcc -DHAVE_MKSTEMP -DHAVE_HYPOT -O2 -fPIC -Wall -Wstrict-prototypes -Wmissing-declarations - Wmissing-prototypes -Wcast-qual -Wwrite-strings -fno-builtin -fno-common -DHAVE_STDINT_H - DGX_COLOR_INDEX_TYPE="unsigned long long" -O2 -pipe -I./src -I./obj/../soobj -I./obj/../soobj -I./ src -o ./obj/../soobj/iconfig.o -c ./obj/../soobj/iconfig.c gcc -DHAVE_MKSTEMP -DHAVE_HYPOT -O2 -fPIC -Wall -Wstrict-prototypes -Wmissing-declarations - Wmissing-prototypes -Wcast-qual -Wwrite-strings -fno-builtin -fno-common -DHAVE_STDINT_H - DGX_COLOR_INDEX_TYPE="unsigned long long" -O2 -pipe -I./src -I./obj/../soobj -I./obj/../soobj -I./ src -o ./obj/../soobj/iccinit0.o -c ./src/iccinit0.c ./obj/../soobj/echogs -w ./obj/../soobj/ldt.tr -n - gcc -fPIC -shared -Wl,-soname=libgs.so.8 -o ./ bin/../sobin/libgs.so.8.15 ./obj/../soobj/echogs -a ./obj/../soobj/ldt.tr -n -s ./obj/../soobj/gs.o -s cat ./obj/../soobj/ld.tr >>./obj/../soobj/ldt.tr ./obj/../soobj/echogs -a ./obj/../soobj/ldt.tr -s - -lm if [ x != x ]; then LD_RUN_PATH=; export LD_RUN_PATH; fi; \ XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \ FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \ DEVICE_DEVS4= DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \ DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \ DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= DEVICE_DEVS16= \ DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= DEVICE_DEVS20= \ /bin/sh <./obj/../soobj/ldt.tr powerpc-apple-darwin8-gcc-4.0.0: unrecognized option `-shared' /usr/bin/ld: unknown flag: -soname=libgs.so.8 collect2: ld returned 1 exit status make[1]: *** [bin/../sobin/libgs.so.8.15] Error 1 make: *** [so] Error 2 !!! ERROR: app-text/ghostscript-afpl-8.15 failed. !!! Function src_compile, Line 85, Exitcode 2 !!! make so failed !!! If you need support, post the topmost build error, NOT this status message. Reproducible: Always Steps to Reproduce: 1. 2. 3. !!! Relying on the shell to locate gcc, this may break !!! DISTCC, installing gcc-config and setting your current gcc !!! profile will fix this Portage 2.0.51.22-r2 (default-darwin/macos/10.4, gcc-4.0.0, libsystem-7.1-r0, 8.2.0 Power Macintosh) =============================================================== == System uname: 8.2.0 Power Macintosh powerpc macos-20041118 distcc 2.0.1-zeroconf powerpc-apple-darwin7.0 (protocol 1) (default port 3632) [disabled] dev-lang/python: [Not Present] sys-apps/sandbox: [Not Present] sys-devel/autoconf: [Not Present] sys-devel/automake: [Not Present] sys-devel/binutils: [Not Present] sys-devel/libtool: [Not Present] virtual/os-headers: 7.1 ACCEPT_KEYWORDS="ppc-macos" AUTOCLEAN="yes" CBUILD="powerpc-apple-darwin" CFLAGS="-O2 -pipe" CHOST="powerpc-apple-darwin" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/ qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig collision-protect distlocks sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/ gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="ppc emboss imagemagick png ppc-macos sdl userland_Darwin kernel_Darwin elibc_Darwin" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
the problematic part is the "make so" in the ebuild. This task calls $WORKDIR/work/ghostscript-8.15/soobj/ldt.tr The offending line is gcc -fPIC -shared -Wl,-soname=libgs.so.8 -o ./bin/../sobin/libgs.so.8.15 ./obj/../soobj/gs.o ./obj/../ soobj/gp_getnv.o \ instead possibly something like the following should be called (if ppc-macos) gcc -fPIC -dynamic -dynamiclib -install_name libgs.dylib.8 -o ./bin/../sobin/libgs.dylib.8.15 ./obj/../ soobj/gs.o ./obj/../soobj/gp_getnv.o \
(In reply to comment #1) > instead possibly something like the following should be called (if ppc-macos) > > gcc -fPIC -dynamic -dynamiclib -install_name libgs.dylib.8 -o ./bin/../sobin/libgs.dylib.8.15 ./obj/../ > soobj/gs.o ./obj/../soobj/gp_getnv.o \ dylibs have the version first, e.g. libgs.8.dylib Have you tried whether this works yourself yet?
> Have you tried whether this works yourself yet? No. I don't yet understand how to build patches which integrate into the ebuild system, so I stopped after finding the possible error cause.
> the problematic part is the "make so" in the ebuild. > This task calls $WORKDIR/work/ghostscript-8.15/soobj/ldt.tr > The offending line is It seems to be even uglier. ldt.tr is a generated file. The real problem seems to be that "make so" somehow builds a.so file using the src/unix-dll.mak Instead, it should possibly be called a macos specific "make dylib", which should be defined in src/ macos-dll.mak
Created attachment 69657 [details, diff] possible patch to create MacOS dylibs instead of Linux so's
> The real problem seems to be that "make so" somehow builds a.so file using the src/unix-dll.mak > Instead, it should possibly be called a macos specific "make dylib", which should be defined in src/ > macos-dll.mak The attached patch makes "make so" compile, but the naming conventions are possibly wrong.
the problem persists in ghostscript-gnu and ghostscript-gpl.
we have ghostscript-esp in the tree, so I close this bug for later when someone feels like cooking a patch.