From owner-freebsd-bugs Thu Mar 30 06:00:03 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id GAA27511 for bugs-outgoing; Thu, 30 Mar 1995 06:00:03 -0800 Received: (from gnats@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id GAA27504; Thu, 30 Mar 1995 06:00:02 -0800 Date: Thu, 30 Mar 1995 06:00:02 -0800 Message-Id: <199503301400.GAA27504@freefall.cdrom.com> From: Alan Judge Reply-To: Alan Judge To: freebsd-bugs Subject: gnu/285: ld.so problem with -lg++ in 2.0-950322-SNAP In-Reply-To: Your message of Thu, 30 Mar 1995 14:55:14 +0100 <199503301355.OAA07281@hogthrob.dsg.cs.tcd.ie> Sender: bugs-owner@FreeBSD.org Precedence: bulk >Number: 285 >Category: gnu >Synopsis: ld.so problem with -lg++ >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs (FreeBSD bugs mailing list) >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 30 06:00:01 1995 >Originator: Alan Judge >Organization: Trinity College Dublin >Release: FreeBSD 2.1.0-Development i386 (2.0-950322-SNAP) >Environment: >Description: It doesn't appear possible to dynamically link any program with -lg++. This is new in 950322. Everything works fine in 950210. >How-To-Repeat: Given a small C++ program like: extern "C" { extern int getpid(); extern int printf(...); } main() { int i = getpid(); printf("%d\n", i); } $ gcc test.cc $ ldd a.out a.out: -lc.2 => /usr/lib/libc.so.2.0 (0x801a000) $ a.out 7087 $ gcc test.cc -lg++ $ ldd a.out a.out: -lg++.2 => /usr/lib/libg++.so.2.0 (0x801a000) -lc.2 => /usr/lib/libc.so.2.0 (0x807d000) -lcurses.2 => /usr/lib/libcurses.so.2.0 (0x80e1000) -ltermcap.2 => /usr/lib/libtermcap.so.2.0 (0x80ed000) $ a.out ld.so failed The program works fine with -static. In fact, any C or C++ program would appear to provoke the problem. Given: main() {} You get the same problem: $ gcc test.c $ a.out $ gcc test.c -lg++ $ a.out ld.so failed Copying libg++.so and libcompat.so from a 950210 machine doesn't help, so I guess it must be some new problem in the linker/runtime loader. >Fix: Unknown. >Audit-Trail: >Unformatted: