Subject: Re: Linker problems
To: None <flo@cfdisk.org>
From: None <flo@cfdisk.org>
List: netbsd-help
Date: 05/12/2004 19:41:30
Quoting Flo <flo@cfdisk.org>:

> Jan Schaumann wrote:
>
> >Flo <flo@cfdisk.org> wrote:
> >
> >
> >
> >>I?m using pkgsrc on IRIX 6.5.20 and have problems to build 64-bit software.
> >>The system tries to link to 64-bit objects with the 32-bit linker.
> >>
> >>For example, the linker returns things like this:
> >>ld32: FATAL 12: Expecting 32-bit objects: libcrypto.a is 64-bit.
> >>
> >>
> >
> >Which package does this occur with?  I've seen the problem only when
> >linking X11 libraries on IRIX64, and I'm currently testing a fix for
> >this, which I hope to be able to commit by the end of the week.
> >
> >-Jan
> >
> >
> >
> It was OpenSSL, bzip2, btw. all stuff that creates his own libraries and
> tries to link them during the build (on my mashine)
> My *.mk files and /etc/mk.conf. are untouched.
> I still use this pkgsrc package:
> bootstrap-pkgsrc-IRIX64-6.5-mips-20031126.tar.gz
>
> I will try to change the LD variable in sys.mk to point to the 64-bit
> linker.
>
> Flo
>


Ok, it doesn't work for me to play with variables in sys.mk :(

This happens when i try to build a 64-bit bzip2:

===> Building for bzip2-1.0.2nb1
rm -f libbz2.la
libtool  --mode=link gcc  -Wl,-rpath,/usr/pkg/lib -o libbz2.la blocksort.lo  
huffman.lo     crctable.lo    randtable.lo   compress.lo    decompress.lo 
bzlib.lo -version-info 0:0   -rpath /usr/pkg/lib
gcc -shared  .libs/blocksort.o .libs/huffman.o .libs/crctable.o
.libs/randtable.o .libs/compress.o .libs/decompress.o .libs/bzlib.o 
-L/usr/pkgsrc/archivers/bzip2/work/.buildlink/lib -lc  -Wl,-rpath
-Wl,/usr/pkg/lib -Wl,-soname -Wl,libbz2.so.0 `test -n "" && echo
-Wl,-set_version -Wl,` -Wl,-update_registry -Wl,.libs/so_locations -o
.libs/libbz2.so.0.0
ld32: FATAL 12: Expecting n32 objects: .libs/blocksort.o is 64-bit.
collect2: ld returned 4 exit status
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/archivers/bzip2/work/bzip2-1.0.2
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/archivers/bzip2
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/archivers/bzip2


I tried to add the LDFLAG -64 in sys.mk and libtool ist set to ld -64.
Doesn't matter what i do, it still fails to link.


Regards
Flo