From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29274 invoked by alias); 14 Nov 2003 21:11:23 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 29267 invoked by uid 48); 14 Nov 2003 21:11:23 -0000 Date: Fri, 14 Nov 2003 21:11:00 -0000 Message-ID: <20031114211123.29266.qmail@sources.redhat.com> From: "croze at nsisoftware dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20030930150333.12462.bs@okyz.com> References: <20030930150333.12462.bs@okyz.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug bootstrap/12462] gcc-3.3.1 can't build shared library with libstdc++.a X-Bugzilla-Reason: CC X-SW-Source: 2003-11/txt/msg01284.txt.bz2 List-Id: ------- Additional Comments From croze at nsisoftware dot com 2003-11-14 21:11 ------- I have also seen this issue on RedHat 9. Here is the build output: g++ -v -g -fPIC -shared -static-libgcc -L../../Common/lib/Linux/debug \ -o lib/Linux/debug/libRSResource.so \ src/obj/Linux/debug/ComputerSystemInfo.o src/obj/Linux/debug/RSResource.o src/obj/Linux/debug/OemNone.o \ -Wl,-static -lpthread -ldl -lCommon Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux Thread model: posix gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/collect2 --eh-frame-hdr -m elf_i386 -shared -o lib/Linux/debug/libRSResource.so /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crti.o /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/crtbeginS.o -L../../../Common_3party/ObjectSpace.Solaris/lib/Linux -L../../Common/lib/Linux/debug -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2 -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../.. src/obj/Linux/debug/ComputerSystemInfo.o src/obj/Linux/debug/RSResource.o src/obj/Linux/debug/OemNone.o -static -lpthread -ldl -lospace -lCommon -lstdc++ -lm -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/crtendS.o /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crtn.o /usr/bin/ld: lib/Linux/debug/libRSResource.so: undefined versioned symbol name std::time_put_w@@GLIBCPP_3.2 /usr/bin/ld: failed to set dynamic section sizes: Bad value (In reply to comment #0) > gcc -shared doesn't work > i want to make a shared library, and i link with the static library libstdc++.a > ld answer me that libstdc++.a isn't position independant code (PIC). > I built gcc.3.3.1 passing with-pic and disable-shared to configure, but the HP > linker still doesn't want to link with libstdc++.a, which isn't a PIC library > for him. (try to compile with +Z) > i have installed the latest ld linker HP patch. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12462