Bug 107428 - media-libs/urt fails to emerge on OS X while creating librle.a
|
Bug#:
107428
|
Product: Gentoo/Alt
|
Version: unspecified
|
Platform: PPC
|
|
OS/Version: OS X
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: ppc-macos@gentoo.org
|
Reported By: dirk.schoenberger@freenet.de
|
|
Component: Mac OSX
|
|
|
URL:
|
|
Summary: media-libs/urt fails to emerge on OS X while creating librle.a
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2005-09-27 11:48 0000
|
While trying to emerge urt-3.1b I ran into the following problem
gcc -O2 -pipe -I. -I../include -c -o vaxshort.o vaxshort.c
rm -f librle.a
ar rc librle.a
ar: no archive members specified
usage: ar -d [-TLsv] archive file ...
ar -m [-TLsv] archive file ...
ar -m [-abiTLsv] position archive file ...
ar -p [-TLsv] archive [file ...]
ar -q [-cTLsv] archive file ...
ar -r [-cuTLsv] archive file ...
ar -r [-abciuTLsv] position archive file ...
ar -t [-TLsv] archive [file ...]
ar -x [-ouTLsv] archive [file ...]
make[1]: *** [buildlib] Error 1
make default on tools
make[1]: warning: -jN forced in submake: disabling jobserver mode.
gcc -O2 -pipe -I. -I../include applymap.c ../lib/librle.a -lm -o applymap.new
gcc -O2 -pipe -I. -I../include avg4.c ../lib/librle.a -lm -o avg4.new
powerpc-apple-darwin8-gcc-4.0.0: ../lib/librle.a: No such file or directory
powerpc-apple-darwin8-gcc-4.0.0: ../lib/librle.a: No such file or directory
applymap.c: In function 'main':
applymap.c:69: warning: return type of 'main' is not 'int'
avg4.c: In function 'main':
avg4.c:44: warning: return type of 'main' is not 'int'
Looks like the wrong type of linker calls is used. Is it possible to do e.g a
gcc -O2 -pipe -I. -I../include avg4.c -L../lib -lrle -lm -o avg4.new
instead of a
gcc -O2 -pipe -I. -I../include avg4.c ../lib/librle.a -lm -o avg4.new
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 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
AFter a closer look, the problem seems twofold:
1) librle.a is not created (ar rc librle.a fails, because ar seem to expect a non-empty .o files list)
2) further down, rleClock.c cannot be compiled because a data type symbol is already defined elsewhere
for 1) I attach a patch against lib/makefile which removes the faulty call
for 2) I attach a patch which renames the problematic type definition and all references from stack_t to
stack2_t
The makes the package at least compile.
where is stack_t defined ? in otherwords, post the actual error message please
also, change the ar line to just this and see if it works:
ar rc $(LIBNAME) $(OBJS)
> also, change the ar line to just this and see if it works:
> ar rc $(LIBNAME) $(OBJS)
I uncommented the ar rc line, the ar -q line was lef uncommented.
It built fine.
> where is stack_t defined ? in otherwords, post the actual error message please
make[2]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
gcc -O2 -pipe -I. -I../../include -c -o rleClock.o rleClock.c
rleClock.c: In function 'main':
rleClock.c:188: warning: return type of 'main' is not 'int'
rleClock.c: At top level:
rleClock.c:912: error: conflicting types for 'stack_t'
/usr/include/sys/signal.h:364: error: previous declaration of 'stack_t' was here
should be fixed in cvs now
> should be fixed in cvs now
Could it please be keyworded ~ppc-macos?
it emerges fine with USE="gif tiff gs". There is some problem with USE="X".
Basically it tries to link with -lX11, but cannot find the proper library, possibly because of some missing
-L flags.
The message is
gcc -O2 -pipe -I. -I../../include -c -o XGetHClrs.o XGetHClrs.c
gcc -O2 -pipe -I. -I../../include getx11.o x11_stuff.o timer.o map_scan.o in_cmap.o XCopyImg.o
XGetHClrs.o ../../lib/librle.a -lX11 -lXext -lm -o getx11.new
/usr/bin/ld: can't locate file for: -lX11
collect2: ld returned 1 exit status
make[2]: *** [getx11.out] Error 1
make[1]: *** [subdirs] Error 2
make: *** [default] Error 2
If you add a -L/usr/X11R6/lib in get/getx11/makefile (variable X11LIBS), it at least compile fine.
No idea if this can be added more globally in some configure scripts....
I'm already looking into this... and it's weird. I don't have a X11.h file,
only X10.h and X.h
then it sounds like OS X is built off an older version of X, namely X10
Created an attachment (id=69869) [details]
ebuild patch
Nah, I was too quick. Linux has exactly the same files, and no X11.h too.
The stuff resides in a different dir for OSX. I got it compiling now.
Can you agree on the attached patch?
> The stuff resides in a different dir for OSX. I got it compiling now.
> Can you agree on the attached patch?
Looks good and emerges fine
... then we wait for a comment by Der Spankmeister.
Have you tried an ebuild that links again the library yet, Dirk?
> Have you tried an ebuild that links again the library yet, Dirk?
I tried to build netpbm, but there seem to be other problems to be solved, yet (#74101).
not fixed in cvs, because the ebuild is not yet keyworded ppc-macos
Cannot because I haven't been able to test the library by having another app
compiling/linking against it, hence I cannot guarantee it works. QA and stuff.
checked with giflib
as ~ppc-macos in portage