From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert A Nesius To: gcc-help@gcc.gnu.org Subject: Fun with shared libs on HPUX - Request for help Date: Sun, 26 Mar 2000 15:30:00 -0000 Message-id: X-SW-Source: 2000-03/msg00095.html Howdy all, I managed to get a nice build of gcc 2.95.1 built by following (roughly) the following steps. On: HPUX 10.20 Build binuntils 2.9.1 - install bin utils into area where gcc will be installed. Configure gcc 2.95.1 like so: setenv CC gcc ../gcc-2.95.1/configure --prefix=/usr/intel/pkgs/gcc/2.95.1 --enable-shared --enable-threads --without-gnu-ld --with-gnu-as --with-as=/usr/intel/pkgs/gcc/2.95.1/hppa1.1-hp-hpux10.20/bin/as And that seemed to work great! But the problem I'm running into is that my libstdc++ lib is apparantly not really a shared library, even though -fPIC is getting set by the configure. When I try to create a shared library that needs to pull in routines from libstdc++, I get errors indicating I need to build libstdc++ with +z or +Z. eg: [pdxhp204]-> ~ 55> /usr/intel/pkgs/gcc/2.95.1/bin/g++ -shared -fpic -o libworld. sl my_helloworld.o /usr/ccs/bin/ld: DP relative code in file /usr/intel/pkgs/gcc/2.95.1/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.1/libstdc++.a(iostream.o) - shared library must be position independent. Use +z or +Z to recompile. collect2: ld returned 1 exit status I'm having trouble bottoming out on what the best way to fix this is. Build libstdc++ by itself separately after the main build and reinstall it, using aCC and +Z? Working around the build issues for HPUX has caused me to get into a slightly confused state as to how fix this. Could some HPUX savvy people offer some insights? Thanks much! -Rob -- #include ------------------------------------------------------------------ Robert Nesius rnesius@ichips.intel.com 503.264.2830 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert A Nesius To: gcc-help@gcc.gnu.org Subject: Fun with shared libs on HPUX - Request for help Date: Sat, 01 Apr 2000 00:00:00 -0000 Message-ID: X-SW-Source: 2000-q1/msg00405.html Message-ID: <20000401000000.4vQFRddd2ubQQ5dfcY7RyNpnNlfNHfijHs5naXSj_WM@z> Howdy all, I managed to get a nice build of gcc 2.95.1 built by following (roughly) the following steps. On: HPUX 10.20 Build binuntils 2.9.1 - install bin utils into area where gcc will be installed. Configure gcc 2.95.1 like so: setenv CC gcc ../gcc-2.95.1/configure --prefix=/usr/intel/pkgs/gcc/2.95.1 --enable-shared --enable-threads --without-gnu-ld --with-gnu-as --with-as=/usr/intel/pkgs/gcc/2.95.1/hppa1.1-hp-hpux10.20/bin/as And that seemed to work great! But the problem I'm running into is that my libstdc++ lib is apparantly not really a shared library, even though -fPIC is getting set by the configure. When I try to create a shared library that needs to pull in routines from libstdc++, I get errors indicating I need to build libstdc++ with +z or +Z. eg: [pdxhp204]-> ~ 55> /usr/intel/pkgs/gcc/2.95.1/bin/g++ -shared -fpic -o libworld. sl my_helloworld.o /usr/ccs/bin/ld: DP relative code in file /usr/intel/pkgs/gcc/2.95.1/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.1/libstdc++.a(iostream.o) - shared library must be position independent. Use +z or +Z to recompile. collect2: ld returned 1 exit status I'm having trouble bottoming out on what the best way to fix this is. Build libstdc++ by itself separately after the main build and reinstall it, using aCC and +Z? Working around the build issues for HPUX has caused me to get into a slightly confused state as to how fix this. Could some HPUX savvy people offer some insights? Thanks much! -Rob -- #include ------------------------------------------------------------------ Robert Nesius rnesius@ichips.intel.com 503.264.2830