Subject: pkg/25093: gcc-2.95.3 broken under -current
To: None <>
From: None <>
List: pkgsrc-bugs
Date: 04/07/2004 12:07:05
>Number:         25093
>Category:       pkg
>Synopsis:       lang/gcc is broken under -current
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 07 16:08:00 UTC 2004
>Originator:     Jan Schaumann
>Release:        NetBSD 1.6ZK
System: NetBSD 1.6ZK NetBSD 1.6ZK (BOCK.current) #0: Tue Mar 9 11:41:58 EST 2004 i386
Architecture: i386
Machine: i386

Running NetBSD-current we have the default compiler gcc version 3.3.3.
If you install lang/gcc from pkgsrc (ie gcc 2.95.3), the resulting compiler
will be able to compile programs, but it will link them against the
systems libraries (libc, libstdc++ etc.), so that running these binaries
will result in the following error:

Undefined symbol "cerr" referenced from COPY relocation in ./a.out

A statically linked program does not show that behaviour.


	Install NetBSD-current.

	Install lang/gcc from pkgsrc.

	Write a simple C program and compile with /usr/pkg/gcc-2.95.3/bin/gcc.

	Execute that program.


Unknown.  Some suggestions have been made in the thread starting with

Somewhat related may be the thread starting with

FWIW, I've had no luck installing binutils into /usr/pkg/gcc-2.95.3 with
a --with-lib-path=/usr/pkg/gcc-2.95.3/lib:/lib:/usr/lib and
telling gcc to use the ld from /usr/pkg/gcc-2.95.3/bin/ld