NetBSD Problem Report #10846

Received: (qmail 13363 invoked from network); 16 Aug 2000 21:54:06 -0000
Message-Id: <200008162154.OAA23026@nbwww.isc.org>
Date: Wed, 16 Aug 2000 14:54:06 -0700 (PDT)
From: dlganger@earthlink.net
Reply-To: dlganger@earthlink.net
To: gnats-bugs@gnats.netbsd.org
Subject: Cannot make many packages in pkgsrc due to ld giving "illegal reloc type mix" errors
X-Send-Pr-Version: www-1.0

>Number:         10846
>Category:       port-sparc
>Synopsis:       Cannot make many packages in pkgsrc due to ld giving "illegal reloc type mix" errors
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    skrll
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 16 21:55:01 +0000 2000
>Closed-Date:    Sat Dec 09 17:36:52 +0000 2000
>Last-Modified:  Thu Mar 22 23:40:01 +0000 2001
>Originator:     Devin L. Ganger
>Release:        1.4.2
>Organization:
>Environment:
NetBSD bofh 1.4.2 NetBSD 1.4.2 (GENERIC) #2: Thu Mar 16 00:08:53 PST 2000     toddpw@threepio.toddpw.net:/usr/src/sys/arch/sparc/compile/GENERIC sparc
>Description:
I was trying to install slrn-0.9.6.2 on my shiny new NetBSD 1.4.2
install via pkgsrc (downloaded on 11 Aug 2000, 0558 PST), and ran into
problems compiling some of the dependencies (slrn 0.9.6.2 depends on
slang-1.4.1, and slang depends on libtool-1.3.5).

Specifically, libtool-1.3.5 is bombing out on the following:

updating cache .././config.cache
creating ./config.status
/bin/sh ./libtool --mode=compile
cc -DHAVE_CONFIG_H -I. -I. -I.     -O2 -c ltdl.c
mkdir .libs
cc -DHAVE_CONFIG_H -I. -I. -I. -O2 -c ltdl.c  -fPIC -DPIC -o
.libs/ltdl.lo
cc -DHAVE_CONFIG_H -I. -I. -I. -O2 -c ltdl.c -o ltdl.o >/dev/null 2>&1
mv -f .libs/ltdl.lo ltdl.lo
/bin/sh ./libtool --mode=link
cc  -O2 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/
lib -o libltdl.la -rpath /usr/pkg/lib -version-info 1:2:1 ltdl.lo
rm -fr .libs/libltdl.la .libs/libltdl.* .libs/libltdl.*
cc -shared -o .libs/libltdl.so.1.2
 ltdl.lo   -Wl,-R/usr/pkg/lib -Wl,-R/usr/pkg/lib
ld: ltdl.lo: illegal reloc type mix
collect2: ld returned 1 exit status
*** Error code 1

Downloading the binary version of libtool only caused the error message to repeat in the build of libslang.
>How-To-Repeat:


>Fix:


>Release-Note:
>Audit-Trail:

From: mcmahill@mtl.mit.edu
To: dlganger@earthlink.net
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-sparc/10846: Cannot make many packages in pkgsrc due to ld giving "illegal reloc type mix" errors
Date: Wed, 16 Aug 2000 18:13:12 -0400 (EDT)

 If this is truely a stock 1.4.2 sparc, please try replacing
 /usr/lib/c++rt0.o with the PIC version found at

 ftp://ftp.netbsd.org/pub/NetBSD/arch/sparc/c++rt0/c++rt0.o.PIC

 -Dan

 On Wed, 16 Aug 2000 dlganger@earthlink.net wrote:

 > 
 > >Number:         10846
 > >Category:       port-sparc
 > >Synopsis:       Cannot make many packages in pkgsrc due to ld giving "illegal reloc type mix" errors
 > >Confidential:   no
 > >Severity:       critical
 > >Priority:       high
 > >Responsible:    port-sparc-maintainer
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Wed Aug 16 14:55:01 PDT 2000
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Devin L. Ganger
 > >Release:        1.4.2
 > >Organization:
 > >Environment:
 > NetBSD bofh 1.4.2 NetBSD 1.4.2 (GENERIC) #2: Thu Mar 16 00:08:53 PST 2000     toddpw@threepio.toddpw.net:/usr/src/sys/arch/sparc/compile/GENERIC sparc
 > >Description:
 > I was trying to install slrn-0.9.6.2 on my shiny new NetBSD 1.4.2
 > install via pkgsrc (downloaded on 11 Aug 2000, 0558 PST), and ran into
 > problems compiling some of the dependencies (slrn 0.9.6.2 depends on
 > slang-1.4.1, and slang depends on libtool-1.3.5).
 > 
 > Specifically, libtool-1.3.5 is bombing out on the following:
 > 
 > updating cache .././config.cache
 > creating ./config.status
 > /bin/sh ./libtool --mode=compile
 > cc -DHAVE_CONFIG_H -I. -I. -I.     -O2 -c ltdl.c
 > mkdir .libs
 > cc -DHAVE_CONFIG_H -I. -I. -I. -O2 -c ltdl.c  -fPIC -DPIC -o
 > .libs/ltdl.lo
 > cc -DHAVE_CONFIG_H -I. -I. -I. -O2 -c ltdl.c -o ltdl.o >/dev/null 2>&1
 > mv -f .libs/ltdl.lo ltdl.lo
 > /bin/sh ./libtool --mode=link
 > cc  -O2 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/
 > lib -o libltdl.la -rpath /usr/pkg/lib -version-info 1:2:1 ltdl.lo
 > rm -fr .libs/libltdl.la .libs/libltdl.* .libs/libltdl.*
 > cc -shared -o .libs/libltdl.so.1.2
 >  ltdl.lo   -Wl,-R/usr/pkg/lib -Wl,-R/usr/pkg/lib
 > ld: ltdl.lo: illegal reloc type mix
 > collect2: ld returned 1 exit status
 > *** Error code 1
 > 
 > Downloading the binary version of libtool only caused the error message to repeat in the build of libslang.
 > >How-To-Repeat:
 > 
 > 
 > >Fix:
 > 
 > 
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:
 > 


From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
To: dlganger@earthlink.net
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-sparc/10846: Cannot make many packages in pkgsrc due to ld
 giving "illegal reloc type mix" errors
Date: Thu, 17 Aug 2000 01:30:58 +0200 (MET DST)

 On Wed, 16 Aug 2000 dlganger@earthlink.net wrote:
 > cc -DHAVE_CONFIG_H -I. -I. -I. -O2 -c ltdl.c  -fPIC -DPIC -o
 > .libs/ltdl.lo
 ...
 > ld: ltdl.lo: illegal reloc type mix
 > collect2: ld returned 1 exit status
 > *** Error code 1

 The problem is that some system libs are compiled with -fpic, and now you
 compile with -fPIC, and these two can't be mixed. This is fixed in the
 upcoming 1.5 release (I don't know about the upcoming 1.4.3 release,
 please ask he@netbsd.org or dmcmahill@netbsd.org). 

 As a workaround, you could locate the libtool script and exchange the
 -fPIC in it by -fpic.


  - Hubert

 -- 
 NetBSD - because Unix isn't just #include <linux.h>, i386, ILP32, ELF, ...!


From: "Devin L. Ganger" <dlganger@earthlink.net>
To: <mcmahill@mtl.mit.edu>
Cc: <gnats-bugs@gnats.netbsd.org>, <feyrer@rfhs8012.fh-regensburg.de>
Subject: Re: port-sparc/10846: Cannot make many packages in pkgsrc due to ld giving "illegal reloc type mix" errors
Date: Wed, 16 Aug 2000 18:12:09 -0700

 The "replace c++rt0" idea fixed it; I didn't try replacing -fPIC in
 libtool with -fpic, since I'd rather have the PIC option.

 Thanks, all!

 --
 Devin L. Ganger
 ----- Original Message -----
 From: <mcmahill@mtl.mit.edu>
 To: <dlganger@earthlink.net>
 Cc: <gnats-bugs@gnats.netbsd.org>
 Sent: Wednesday, August 16, 2000 3:13 PM
 Subject: Re: port-sparc/10846: Cannot make many packages in pkgsrc due
 to ld giving "illegal reloc type mix" errors


 >
 > If this is truely a stock 1.4.2 sparc, please try replacing
 > /usr/lib/c++rt0.o with the PIC version found at
 >
 > ftp://ftp.netbsd.org/pub/NetBSD/arch/sparc/c++rt0/c++rt0.o.PIC
 >
 > -Dan
 >
 > On Wed, 16 Aug 2000 dlganger@earthlink.net wrote:
 >
 > >
 > > >Number:         10846
 > > >Category:       port-sparc
 > > >Synopsis:       Cannot make many packages in pkgsrc due to ld
 giving "illegal reloc type mix" errors
 > > >Confidential:   no
 > > >Severity:       critical
 > > >Priority:       high
 > > >Responsible:    port-sparc-maintainer
 > > >State:          open
 > > >Class:          sw-bug
 > > >Submitter-Id:   net
 > > >Arrival-Date:   Wed Aug 16 14:55:01 PDT 2000
 > > >Closed-Date:
 > > >Last-Modified:
 > > >Originator:     Devin L. Ganger
 > > >Release:        1.4.2
 > > >Organization:
 > > >Environment:
 > > NetBSD bofh 1.4.2 NetBSD 1.4.2 (GENERIC) #2: Thu Mar 16 00:08:53 PST
 2000
 toddpw@threepio.toddpw.net:/usr/src/sys/arch/sparc/compile/GENERIC sparc
 > > >Description:
 > > I was trying to install slrn-0.9.6.2 on my shiny new NetBSD 1.4.2
 > > install via pkgsrc (downloaded on 11 Aug 2000, 0558 PST), and ran
 into
 > > problems compiling some of the dependencies (slrn 0.9.6.2 depends on
 > > slang-1.4.1, and slang depends on libtool-1.3.5).
 > >
 > > Specifically, libtool-1.3.5 is bombing out on the following:
 > >
 > > updating cache .././config.cache
 > > creating ./config.status
 > > /bin/sh ./libtool --mode=compile
 > > cc -DHAVE_CONFIG_H -I. -I. -I.     -O2 -c ltdl.c
 > > mkdir .libs
 > > cc -DHAVE_CONFIG_H -I. -I. -I. -O2 -c ltdl.c  -fPIC -DPIC -o
 > > .libs/ltdl.lo
 > > cc -DHAVE_CONFIG_H -I. -I. -I. -O2 -c ltdl.c -o ltdl.o >/dev/null
 2>&1
 > > mv -f .libs/ltdl.lo ltdl.lo
 > > /bin/sh ./libtool --mode=link
 > >
 cc  -O2 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/
 > > lib -o libltdl.la -rpath /usr/pkg/lib -version-info 1:2:1 ltdl.lo
 > > rm -fr .libs/libltdl.la .libs/libltdl.* .libs/libltdl.*
 > > cc -shared -o .libs/libltdl.so.1.2
 > >  ltdl.lo   -Wl,-R/usr/pkg/lib -Wl,-R/usr/pkg/lib
 > > ld: ltdl.lo: illegal reloc type mix
 > > collect2: ld returned 1 exit status
 > > *** Error code 1
 > >
 > > Downloading the binary version of libtool only caused the error
 message to repeat in the build of libslang.
 > > >How-To-Repeat:
 > >
 > >
 > > >Fix:
 > >
 > >
 > > >Release-Note:
 > > >Audit-Trail:
 > > >Unformatted:
 > >
 >
 >

Responsible-Changed-From-To: port-sparc-maintainer->skrll 
Responsible-Changed-By: skrll 
Responsible-Changed-When: Mon Oct 9 08:00:37 PDT 2000 
Responsible-Changed-Why:  
I'll look after this one. 
State-Changed-From-To: open->analyzed 
State-Changed-By: skrll 
State-Changed-When: Wed Oct 11 14:11:24 PDT 2000 
State-Changed-Why:  
The fix is to make devel/libtool depend on and pick the c++rt0.o in  
sysutils/c++rt0. I've posted the fix for someone to test for me - no 
access to a sparc<1.4.3 :-( 
State-Changed-From-To: analyzed->feedback 
State-Changed-By: skrll 
State-Changed-When: Thu Nov 2 09:01:49 PST 2000 
State-Changed-Why:  
pkgsrc has been updated to cope with <1.4.3 sparc a.out platforms. 
State-Changed-From-To: feedback->closed 
State-Changed-By: skrll 
State-Changed-When: Sat Dec 9 09:35:18 PST 2000 
State-Changed-Why:  
This should have fixed and time out on response. 

From: "Devin L. Ganger" <dlganger@earthlink.net> (by way of Erik E. Fair)
To: NetBSD GNATS Problem Report Tracking System <gnats-bugs@gnats.netbsd.org>
Cc:  
Subject: Re: port-sparc/10846
Date: Thu, 22 Mar 2001 16:42:34 -0600

 Cannot test the update since the machine I reported the error on is
 about to be re-installed with Solaris.

 -- 
 Devin L. Ganger <dlganger@earthlink.net>
 N ethernet interfaces on the wall, N ethernet interfaces
 Take one down ERROR: No route to host
 * If replying, please either send an email OR post it here, not both. *
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.