<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>107428</bug_id>
          
          <creation_ts>2005-09-27 11:48 0000</creation_ts>
          <short_desc>media-libs/urt fails to emerge on OS X while creating librle.a</short_desc>
          <delta_ts>2006-04-12 10:53:31 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo/Alt</product>
          <component>Mac OSX</component>
          <version>unspecified</version>
          <rep_platform>PPC</rep_platform>
          <op_sys>OS X</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>dirk.schoenberger@freenet.de</reporter>
          <assigned_to>ppc-macos@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>dirk.schoenberger@freenet.de</who>
            <bug_when>2005-09-27 11:48:12 0000</bug_when>
            <thetext>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 &apos;main&apos;:
applymap.c:69: warning: return type of &apos;main&apos; is not &apos;int&apos;
avg4.c: In function &apos;main&apos;:
avg4.c:44: warning: return type of &apos;main&apos; is not &apos;int&apos;


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=&quot;ppc-macos ~ppc-macos&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;powerpc-apple-darwin&quot;
CFLAGS=&quot;-O2 -pipe&quot;
CHOST=&quot;powerpc-apple-darwin&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/
qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/env.d&quot;
CXXFLAGS=&quot;-O2 -pipe&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig collision-protect distlocks sfperms strict&quot;
GENTOO_MIRRORS=&quot;http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/
gentoo&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;ppc emboss gif imagemagick nls png ppc-macos qt sdl slang tiff userland_Darwin kernel_Darwin 
elibc_Darwin&quot;
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dirk.schoenberger@freenet.de</who>
            <bug_when>2005-10-02 04:25:47 0000</bug_when>
            <thetext>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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dirk.schoenberger@freenet.de</who>
            <bug_when>2005-10-02 04:26:48 0000</bug_when>
            <thetext>Created an attachment (id=69706)
properly create the needed library
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dirk.schoenberger@freenet.de</who>
            <bug_when>2005-10-02 04:27:35 0000</bug_when>
            <thetext>Created an attachment (id=69707)
rename the ambigous data type
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2005-10-02 12:48:15 0000</bug_when>
            <thetext>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)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dirk.schoenberger@freenet.de</who>
            <bug_when>2005-10-02 15:06:49 0000</bug_when>
            <thetext>&gt; also, change the ar line to just this and see if it works:
&gt; ar rc $(LIBNAME) $(OBJS)
I uncommented the ar rc line, the ar -q line was lef uncommented.
It built fine.

&gt; where is stack_t defined ?  in otherwords, post the actual error message please

make[2]: warning: jobserver unavailable: using -j1.  Add `+&apos; to parent make rule.
gcc   -O2 -pipe -I. -I../../include     -c -o rleClock.o rleClock.c
rleClock.c: In function &apos;main&apos;:
rleClock.c:188: warning: return type of &apos;main&apos; is not &apos;int&apos;
rleClock.c: At top level:
rleClock.c:912: error: conflicting types for &apos;stack_t&apos;
/usr/include/sys/signal.h:364: error: previous declaration of &apos;stack_t&apos; was here

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2005-10-03 17:36:13 0000</bug_when>
            <thetext>should be fixed in cvs now</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dirk.schoenberger@freenet.de</who>
            <bug_when>2005-10-04 11:01:35 0000</bug_when>
            <thetext>&gt; should be fixed in cvs now
Could it please be keyworded ~ppc-macos?

it emerges fine with USE=&quot;gif tiff gs&quot;. There is some problem with USE=&quot;X&quot;.
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&apos;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....

 </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2005-10-04 11:03:55 0000</bug_when>
            <thetext>I&apos;m already looking into this... and it&apos;s weird.  I don&apos;t have a X11.h file,
only X10.h and X.h</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2005-10-04 11:46:59 0000</bug_when>
            <thetext>then it sounds like OS X is built off an older version of X, namely X10</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2005-10-04 11:56:34 0000</bug_when>
            <thetext>Created an attachment (id=69869)
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?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dirk.schoenberger@freenet.de</who>
            <bug_when>2005-10-04 12:09:09 0000</bug_when>
            <thetext>&gt; The stuff resides in a different dir for OSX.  I got it compiling now.

&gt; Can you agree on the attached patch?

Looks good and emerges fine</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2005-10-04 12:12:57 0000</bug_when>
            <thetext>... then we wait for a comment by Der Spankmeister.

Have you tried an ebuild that links again the library yet, Dirk?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dirk.schoenberger@freenet.de</who>
            <bug_when>2005-10-04 12:17:39 0000</bug_when>
            <thetext>&gt; 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).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2005-10-04 16:03:03 0000</bug_when>
            <thetext>Created an attachment (id=69887)
urt-X11R6-dir.patch

try this instead</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2005-10-05 07:35:58 0000</bug_when>
            <thetext>patch works fine.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2005-10-05 18:51:05 0000</bug_when>
            <thetext>fixed in cvs then</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2005-10-05 22:29:31 0000</bug_when>
            <thetext>not fixed in cvs, because the ebuild is not yet keyworded ppc-macos</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2005-10-05 22:30:39 0000</bug_when>
            <thetext>then KEYWORD it :P</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2005-10-05 22:34:47 0000</bug_when>
            <thetext>Cannot because I haven&apos;t been able to test the library by having another app
compiling/linking against it, hence I cannot guarantee it works.  QA and stuff.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>grobian@gentoo.org</who>
            <bug_when>2005-10-05 23:41:18 0000</bug_when>
            <thetext>checked with giflib

as ~ppc-macos in portage</thetext>
          </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>69706</attachid>
            <date>2005-10-02 04:26 0000</date>
            <desc>properly create the needed library</desc>
            <filename>lib_makefile.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGxpYi9tYWtlZmlsZS5vcmlnCTIwMDUtMTAtMDIgMTI6NTQ6NTkuMDAwMDAwMDAwICswMjAw
CisrKyBsaWIvbWFrZWZpbGUJMjAwNS0xMC0wMiAxMjo1NTo1MC4wMDAwMDAwMDAgKzAyMDAKQEAg
LTE4MSw4ICsxODEsOCBAQAogIyBSZWJ1aWxkIHRoZSBsaWJyYXJ5IGZyb20gYWxsIHRoZSAubyBm
aWxlcy4KIGJ1aWxkbGliOiAkKE9CSlMpCiAJLXJtIC1mICQoTElCTkFNRSkKLQlhciByYyAkKExJ
Qk5BTUUpCi0JYXIgcSAkKExJQk5BTUUpICQoT0JKUykKKyMJYXIgLXJjICQoTElCTkFNRSkKKwlh
ciAtcSAkKExJQk5BTUUpICQoT0JKUykKICNpZm5kZWYgTk9fUkFOTElCCiAJcmFubGliICQoTElC
TkFNRSkKICNlbmRpZgo=
</data>        

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>69707</attachid>
            <date>2005-10-02 04:27 0000</date>
            <desc>rename the ambigous data type</desc>
            <filename>tools_clock_rleClock.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIHRvb2xzL2Nsb2NrL3JsZUNsb2NrLmMub3JpZwkyMDA1LTEwLTAyIDEzOjE1OjE2LjAwMDAw
MDAwMCArMDIwMAorKysgdG9vbHMvY2xvY2svcmxlQ2xvY2suYwkyMDA1LTEwLTAyIDEzOjAxOjU3
LjAwMDAwMDAwMCArMDIwMApAQCAtOTA5LDE0ICs5MDksMTQgQEAKIHR5cGVkZWYgc3RydWN0IHsK
ICAgICBzaG9ydCB4LCB5OwogICAgIGludCBkaXI7Ci19IHN0YWNrX3Q7IAorfSBzdGFjazJfdDsg
CiAKICNkZWZpbmUgTk9SVEggMAogI2RlZmluZSBXRVNUIDEKICNkZWZpbmUgU09VVEggMgogI2Rl
ZmluZSBFQVNUIDMKIHN0cnVjdCB7Ci0Jc3RhY2tfdCAqczsKKwlzdGFjazJfdCAqczsKIAlpbnQJ
dG9wOwogCWludCBhbGxvY2tlZDsKIH0gU3RhY2s7CkBAIC05MjksOSArOTI5LDkgQEAKIGludCBm
aXJzdFgsIGZpcnN0WTsKIGludCBtYXNrLCBtYXRjaCwgdmFsdWU7CiB7Ci0gICAgcmVnaXN0ZXIg
c3RhY2tfdCAqc3A7CisgICAgcmVnaXN0ZXIgc3RhY2syX3QgKnNwOwogCi0gICAgU3RhY2sucyA9
IChzdGFja190ICopIGNhbGxvYygyNTYsIHNpemVvZihzdGFja190KSk7CisgICAgU3RhY2sucyA9
IChzdGFjazJfdCAqKSBjYWxsb2MoMjU2LCBzaXplb2Yoc3RhY2syX3QpKTsKICAgICBTdGFjay5h
bGxvY2tlZCA9IDI1NjsKICAgICBTdGFjay50b3AgPSAtMTsKICAgICBzdGFja1B1c2goZmlyc3RY
LCBmaXJzdFksIE5PUlRIKTsKQEAgLTk2NCw3ICs5NjQsNyBAQAogewogICAgIGlmICgrK1N0YWNr
LnRvcCA+PSBTdGFjay5hbGxvY2tlZCkgewogCSAgICBTdGFjay5hbGxvY2tlZCArPSAyNTY7Ci0J
ICAgIFN0YWNrLnMgPSAoc3RhY2tfdCAqKSByZWFsbG9jKFN0YWNrLnMsIFN0YWNrLmFsbG9ja2Vk
ICogc2l6ZW9mKHN0YWNrX3QpKTsKKwkgICAgU3RhY2sucyA9IChzdGFjazJfdCAqKSByZWFsbG9j
KFN0YWNrLnMsIFN0YWNrLmFsbG9ja2VkICogc2l6ZW9mKHN0YWNrMl90KSk7CiBpZihEZWJ1Zylm
cHJpbnRmKHN0ZGVyciwgIlN0YWNrIGdyb3dpbmcgdG8gJWRcbiIsIFN0YWNrLmFsbG9ja2VkKTsK
ICAgICB9CiAJU3RhY2suc1tTdGFjay50b3BdLnggPSB4Owo=
</data>        

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>69869</attachid>
            <date>2005-10-04 11:56 0000</date>
            <desc>ebuild patch</desc>
            <filename>ebuild.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">SW5kZXg6IHVydC0zLjFiLXIxLmVidWlsZAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvdmFyL2N2c3Jv
b3QvZ2VudG9vLXg4Ni9tZWRpYS1saWJzL3VydC91cnQtMy4xYi1yMS5lYnVpbGQsdgpyZXRyaWV2
aW5nIHJldmlzaW9uIDEuNApkaWZmIC11IC1yMS40IHVydC0zLjFiLXIxLmVidWlsZAotLS0gdXJ0
LTMuMWItcjEuZWJ1aWxkCTQgT2N0IDIwMDUgMDA6MzY6MTUgLTAwMDAJMS40CisrKyB1cnQtMy4x
Yi1yMS5lYnVpbGQJNCBPY3QgMjAwNSAxODo1NTo1MiAtMDAwMApAQCAtMTAsNyArMTAsNyBAQAog
CiBMSUNFTlNFPSJhcy1pcyIKIFNMT1Q9IjAiCi1LRVlXT1JEUz0ifmFtZDY0IH5hcm0gfmhwcGEg
fmlhNjQgfm02OGsgfnMzOTAgfnNoIH5zcGFyYyB+eDg2IgorS0VZV09SRFM9In5hbWQ2NCB+YXJt
IH5ocHBhIH5pYTY0IH5tNjhrIH5wcGMtbWFjb3MgfnMzOTAgfnNoIH5zcGFyYyB+eDg2IgogSVVT
RT0iZ2lmIGdzIHRpZmYgWCIKIAogREVQRU5EPSJYPyAoIHZpcnR1YWwveDExICkKQEAgLTQ3LDYg
KzQ3LDkgQEAKIAlFeHRyYUNGTEFHUyA9ICR7Q0ZMQUdTfQogCU1GTEFHUyA9ICR7TUFLRU9QVFN9
CiAJRU9GCisJIyBvbiBPU1ggWDExIHJlc2lkZXMgaW4gL3Vzci9YMTFSNi8uLi4KKwl1c2UgcHBj
LW1hY29zICYmIHNlZCAtaSBcCisJCS1lICJzfF5MSUJYMTEuKiR8TElCWDExID0gLUwvdXNyL1gx
MVI2L2xpYiAtbFgxMXwiIGNvbmZpZy9nZW50b28KIH0KIAogc3JjX2NvbXBpbGUoKSB7Cg==
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>69887</attachid>
            <date>2005-10-04 16:03 0000</date>
            <desc>urt-X11R6-dir.patch</desc>
            <filename>urt-X11R6-dir.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGZpbGVzL2dlbnRvby1jb25maWcKKysrIGZpbGVzL2dlbnRvby1jb25maWcKQEAgLTQxLDMg
KzQxLDEyIEBAIElOQ1RJRkYgPSAKIExJQlRJRkYgPSAtbHRpZmYKIElOQ1gxMSA9CiBMSUJYMTEg
PSAtbFgxMQorCisjIE1vc3QgcGVvcGxlIGhhdmUgbWlncmF0ZWQgbGliWDExIHRvIC91c3IvbGli
LCBidXQganVzdCBpbiBjYXNlIC4uLgorY2hlY2tfeDExPSQoc2hlbGwgXAorCWVjaG8gJ2ludCBt
YWluKCl7fScgPiB0ZXN0LmMgOyBcCisJaWYgISAkKENDKSB0ZXN0LmMgLWxYMTEgLW8gL2Rldi9u
dWxsIDI+L2Rldi9udWxsIDsgdGhlbiBcCisJCWVjaG8gIi1ML3Vzci9YMTFSNi9saWIiIDsgXAor
CWZpIDsgXAorCXJtIC1mIHRlc3QuYykKK0xJQlgxMSArPSAkKGNhbGwgY2hlY2tfeDExKQo=
</data>        

          </attachment>
    </bug>

</bugzilla>