Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 107428 - media-libs/urt fails to emerge on OS X while creating librle.a
Summary: media-libs/urt fails to emerge on OS X while creating librle.a
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-27 11:48 UTC by Dirk Schoenberger
Modified: 2006-04-12 10:53 UTC (History)
0 users

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


Attachments
properly create the needed library (lib_makefile.patch,356 bytes, patch)
2005-10-02 04:26 UTC, Dirk Schoenberger
Details | Diff
rename the ambigous data type (tools_clock_rleClock.patch,1.04 KB, patch)
2005-10-02 04:27 UTC, Dirk Schoenberger
Details | Diff
ebuild patch (ebuild.patch,793 bytes, patch)
2005-10-04 11:56 UTC, Fabian Groffen
Details | Diff
urt-X11R6-dir.patch (urt-X11R6-dir.patch,395 bytes, patch)
2005-10-04 16:03 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schoenberger 2005-09-27 11:48:12 UTC
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
Comment 1 Dirk Schoenberger 2005-10-02 04:25:47 UTC
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.
Comment 2 Dirk Schoenberger 2005-10-02 04:26:48 UTC
Created attachment 69706 [details, diff]
properly create the needed library
Comment 3 Dirk Schoenberger 2005-10-02 04:27:35 UTC
Created attachment 69707 [details, diff]
rename the ambigous data type
Comment 4 SpanKY gentoo-dev 2005-10-02 12:48:15 UTC
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)
Comment 5 Dirk Schoenberger 2005-10-02 15:06:49 UTC
> 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

Comment 6 SpanKY gentoo-dev 2005-10-03 17:36:13 UTC
should be fixed in cvs now
Comment 7 Dirk Schoenberger 2005-10-04 11:01:35 UTC
> 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....

 
Comment 8 Fabian Groffen gentoo-dev 2005-10-04 11:03:55 UTC
I'm already looking into this... and it's weird.  I don't have a X11.h file,
only X10.h and X.h
Comment 9 SpanKY gentoo-dev 2005-10-04 11:46:59 UTC
then it sounds like OS X is built off an older version of X, namely X10
Comment 10 Fabian Groffen gentoo-dev 2005-10-04 11:56:34 UTC
Created attachment 69869 [details, diff]
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?
Comment 11 Dirk Schoenberger 2005-10-04 12:09:09 UTC
> 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
Comment 12 Fabian Groffen gentoo-dev 2005-10-04 12:12:57 UTC
... then we wait for a comment by Der Spankmeister.

Have you tried an ebuild that links again the library yet, Dirk?
Comment 13 Dirk Schoenberger 2005-10-04 12:17:39 UTC
> 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).
Comment 14 SpanKY gentoo-dev 2005-10-04 16:03:03 UTC
Created attachment 69887 [details, diff]
urt-X11R6-dir.patch

try this instead
Comment 15 Fabian Groffen gentoo-dev 2005-10-05 07:35:58 UTC
patch works fine.
Comment 16 SpanKY gentoo-dev 2005-10-05 18:51:05 UTC
fixed in cvs then
Comment 17 Fabian Groffen gentoo-dev 2005-10-05 22:29:31 UTC
not fixed in cvs, because the ebuild is not yet keyworded ppc-macos
Comment 18 SpanKY gentoo-dev 2005-10-05 22:30:39 UTC
then KEYWORD it :P
Comment 19 Fabian Groffen gentoo-dev 2005-10-05 22:34:47 UTC
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.
Comment 20 Fabian Groffen gentoo-dev 2005-10-05 23:41:18 UTC
checked with giflib

as ~ppc-macos in portage