Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 105578 - error while emerging ghostscript 8.x
Summary: error while emerging ghostscript 8.x
Status: RESOLVED LATER
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Mac OSX (show other bugs)
Hardware: PPC OS X
: High normal (vote)
Assignee: Gentoo for Mac OS X
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-11 02:41 UTC by Dirk Schoenberger
Modified: 2008-02-07 19:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
possible patch to create MacOS dylibs instead of Linux so's (unix-dll.mak.patch,528 bytes, patch)
2005-10-01 14:04 UTC, Dirk Schoenberger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schoenberger 2005-09-11 02:41:54 UTC
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
Comment 1 Dirk Schoenberger 2005-10-01 13:19:29 UTC
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 \
Comment 2 Fabian Groffen gentoo-dev 2005-10-01 13:29:25 UTC
(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?
Comment 3 Dirk Schoenberger 2005-10-01 13:37:07 UTC
> 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.
Comment 4 Dirk Schoenberger 2005-10-01 13:57:39 UTC
> 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
Comment 5 Dirk Schoenberger 2005-10-01 14:04:35 UTC
Created attachment 69657 [details, diff]
possible patch to create MacOS dylibs instead of Linux so's
Comment 6 Dirk Schoenberger 2005-10-01 14:06:18 UTC
> 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.
Comment 7 Elias Pipping (RETIRED) gentoo-dev 2007-11-25 20:28:27 UTC
the problem persists in ghostscript-gnu and ghostscript-gpl.
Comment 8 Fabian Groffen gentoo-dev 2008-02-07 19:25:18 UTC
we have ghostscript-esp in the tree, so I close this bug for later when someone feels like cooking a patch.