Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 107728 - Problem while emerge media-libs/jbigkit
Summary: Problem while emerge media-libs/jbigkit
Status: RESOLVED FIXED
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-30 11:30 UTC by Dirk Schoenberger
Modified: 2006-04-12 10:53 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schoenberger 2005-09-30 11:30:49 UTC
While trying to emerge jbigkit-1.6-r1 I ran into the following problem

Calculating dependencies ...done!
>>> emerge (1 of 1) media-libs/jbigkit-1.6-r1 to /
>>> md5 files   ;-) jbigkit-1.4.ebuild
>>> md5 files   ;-) jbigkit-1.6-r1.ebuild
>>> md5 files   ;-) jbigkit-1.6.ebuild
>>> md5 files   ;-) files/digest-jbigkit-1.4
>>> md5 files   ;-) files/digest-jbigkit-1.6
>>> md5 files   ;-) files/digest-jbigkit-1.6-r1
>>> md5 files   ;-) files/jbigkit-1.6-build.patch
>>> md5 files   ;-) files/jbigkit-1.6-shared-lib.patch
>>> md5 src_uri ;-) jbigkit-1.6.tar.gz
>>> Unpacking source...
>>> Unpacking jbigkit-1.6.tar.gz to /var/tmp/portage/jbigkit-1.6-r1/work
 * Applying jbigkit-1.6-build.patch ...                                   [ ok ]
 * Applying jbigkit-1.6-shared-lib.patch ...                              [ ok ]
>>> Source unpacked.
(cd libjbig;  make "CC=gcc" "CFLAGS=-O2 -pipe -I../libjbig")
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
gcc -O2 -pipe -I../libjbig   -c -o jbig.o jbig.c
gcc -O2 -pipe -I../libjbig   -c -o jbig_tab.o jbig_tab.c
rm -f libjbig.a
ar rc libjbig.a jbig.o jbig_tab.o
ranlib libjbig.a
gcc -O2 -pipe -I../libjbig -fPIC -c jbig.c -o jbig.lo
gcc -O2 -pipe -I../libjbig -fPIC -c jbig_tab.c -o jbig_tab.lo
gcc -shared  -o libjbig.so -Wl,-soname -Wl,libjbig.so jbig.lo jbig_tab.lo
powerpc-apple-darwin8-gcc-4.0.0: unrecognized option '-shared'
/usr/bin/ld: unknown flag: -soname
collect2: ld returned 1 exit status
make[1]: *** [libjbig.so] Error 1
make: *** [lib] Error 2


jbigkit is already marked ~ppc-macos

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.52-r1 (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 ~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 gdbm gif imagemagick nls png ppc-macos qt sdl slang tiff userland_Darwin 
kernel_Darwin elibc_Darwin"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Fabian Groffen gentoo-dev 2005-10-01 07:49:41 UTC
spanky's fault, he added a shared libs patch and omitted support for OSX, but
didn't drop the keyword :)

I committed a fix that creates a dylib on Darwin.  Don't know whether it is
useful, but at least it compiles again.
Comment 2 Dirk Schoenberger 2005-10-01 09:49:01 UTC
> spanky's fault, he added a shared libs patch and omitted support for OSX, but
> didn't drop the keyword :)

> I committed a fix that creates a dylib on Darwin.  Don't know whether it is
> useful, but at least it compiles again.

How easy was this fix? I have several open bugs (eg. 105578), which seem to have related problems...
Comment 3 Fabian Groffen gentoo-dev 2005-10-01 10:30:04 UTC
bug #105578 looks indeed to be a similar problem.

The thing is as follows:
- on linux shared libraries are called xyz.so[.version], while Darwin uses
xyz[.version].dylib
- building shared libraries is default on OSX (if I recall correctly) in
contrast to linux
- in practice you see a Makefile doing something like $(CC) -shared $@
-Wl,-soname -Wl,$@ -> this is where the error comes from.

In this case I applied the following patch (excerpts):
+ifeq ($(UNAME),Darwin)
+   SONAME = dylib
+else
+   SONAME = so
+endif
+
+all: libjbig.a libjbig.$(SONAME) tstcodec

+libjbig.so: $(SOBJS)
+   $(CC) -shared $(LDFLAGS) -o $@ -Wl,-soname -Wl,$@ $(SOBJS)
+libjbig.dylib: $(SOBJS)
+   $(CC) -dynamic $(LDFLAGS) -o $@ -dynamiclib -install_name $@ $(SOBJS)

which generated a dylib file `otool` could read somehow.