Subject: Re: Linker problems
To: None <flo@cfdisk.org>
From: None <flo@cfdisk.org>
List: netbsd-help
Date: 05/12/2004 22:43:52
Quoting flo@cfdisk.org:

> Quoting Jan Schaumann <jschauma@netmeister.org>:
>
> > flo@cfdisk.org wrote:
> > > Quoting Jan Schaumann <jschauma@netmeister.org>:
> > >
> > > > flo@cfdisk.org wrote:
> > > >
> > > > > I use gcc3.3 from freeware.sgi.com
> > > >
> > > > What version is your pkgsrc/mk/compiler/gcc.mk?  If it's not 1.64,
> > > > update it, it includes a fix for gcc to use the ABI if set.
> >
> > > It's
> > >
> > > # $NetBSD: gcc.mk,v 1.64 2004/05/05 03:05:41 jschauma Exp $
> >
> > Hmmm.  Try editing that file and in line 139, add
> >
> > LDFLAGS+=	-mabi=${ABI:C/^32$/n&/}
> >
> > Also, what version is your linker?
> >
> > -Jan
> >
> > --
> > I always said there was something fundamentally wrong with the universe.
> >
>
>
> Ok, now i did a..
>
> cd /usr/pkgsrc/bootstrap/
> ./cleanup
> cd ..; bmake clean
> mv packages/* /backup/
> cd ..; cvs login
> cvs checkout -P pkgsrc
> rm /etc/mk.conf
> rm -rf /usr/pkg
> rm -rf /var/db/pgk
> cd bootstrap/
> ./bootstrap
> cp /work/mk.conf.example /etc/mk.conf (edited for 64-bit)
>
> - new csh console -
>
> cd /usr/pkgsrc/archivers/bzip2/; bmake package
>
> After a while...
>
> 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
>
> My OS:
> IRIX64 octane 6.5 04091957 IP30 (6.5.20)
>
> My env:
> HOME=/
>
PATH=/usr/sbin:/usr/bsd:/sbin:/usr/bin:/etc:/usr/etc:/usr/bin/X11:/usr/pkg/bin:/usr/pkg/sbin:/usr/local/bin:/usr/local/sbin:/usr/freeware/bin:/usr/freeware/sbin
> LOGNAME=root
> HZ=
> TZ=CET-1CEST-2,M3.5.0/2,M10.5.0/3
> USER=root
> MAIL=/usr/mail/root
> TERM=iris-ansi
> SHELL=/bin/csh
> LANG=C
> PWD=/usr/pkgsrc/archivers/bzip2
> MSGVERB=text:action
> NOMSGLABEL=1
> NOMSGSEVERITY=1
> CC=/usr/freeware/bin/gcc
>
MANPATH=/usr/share/catman:/usr/share/man:/usr/catman:/usr/man:/usr/pkg/man:/usr/local/catman:/usr/freeware/catman
> DISPLAY=:0
>
> My mashine:
> Location: /hw/node
>       PM10300MHZ Board: barcode JKR376     part 030-1355-001 rev  M
> Location: /hw/node/xtalk/15
>             IP30 Board: barcode JPC441     part 030-1467-001 rev  C
> Location: /hw/node/xtalk/15/pci/2
>              FP1 Board: barcode KAK029     part 030-0891-003 rev  E
>     PWR.SPPLY.ER Board: barcode AAE9370168 part 060-0035-002 rev  A
> Location: /hw/node/xtalk/12
>            MOT10 Board: barcode JKS531     part 030-1241-002 rev  H
> 1 300 MHZ IP30 Processor
> Heart ASIC: Revision F
> CPU: MIPS R12000 Processor Chip Revision: 2.3
> FPU: MIPS R12010 Floating Point Chip Revision: 0.0
> Main memory size: 1024 Mbytes
> Xbow ASIC: Revision 1.3
> Instruction cache size: 32 Kbytes
> Data cache size: 32 Kbytes
> Secondary unified instruction/data cache size: 2 Mbytes
> Integral SCSI controller 0: Version QL1040B (rev. 2), single ended
>   Disk drive: unit 1 on SCSI controller 0 (unit 1)
>   Disk drive: unit 2 on SCSI controller 0 (unit 2)
> Integral SCSI controller 1: Version QL1040B (rev. 2), single ended
>   CDROM: unit 1 on SCSI controller 1
> IOC3/IOC4 serial port: tty1
> IOC3/IOC4 serial port: tty2
> IOC3 parallel port: plp1
> Graphics board: ESI
> Integral Fast Ethernet: ef0, version 1, pci 2
> Iris Audio Processor: version RAD revision 12.0, number 1
>   PCI Adapter ID (vendor 0x10a9, device 0x0003) PCI slot 2
>   PCI Adapter ID (vendor 0x1077, device 0x1020) PCI slot 0
>   PCI Adapter ID (vendor 0x1077, device 0x1020) PCI slot 1
>   PCI Adapter ID (vendor 0x10a9, device 0x0005) PCI slot 3
>
> The setup:
> Nearly all cd´s, for testing.
>
> keep *
> install standard
>


Ohh, sorry.. I forgot.

adding LDFLAGS+=        -mabi=${ABI:C/^32$/n&/} to the gcc.mk worked for bzip2
:-)

I will try it for OpenSSL now :)