Thread: HP-UX 11 + GCC + --with-CXX = pain
Hello, I'm trying to build PostgreSQL 7.1.1 on HP-UX 11 (HPPA2) and I'm having a miserable time. Plan A: use HP's C++ compiler and GNU Make For some reason, I can't seem to find the STL header for the string class. I'm not sure it's installed correctly so I will check with HP in the morning... Plan B: Use GCC from the HP-UX porting archive (hpux.ee.ualberta.ca). No luck. The configure script goes into the weeds when it tries to discover how to invoke the C++ preprocessor (it does c++ -E) but some name collisions seem to confuse it (see below). Any hints? Thanks --Louis -- Louis Bertrand Datawire Communication Networks Inc. http://www.datawire.net/ (416) 989-7250 Cell (416) 798-2226 x 165 (Office) louis.bertrand@datawire.net Fragment from config.log: ------------------------- configure:2423: checking how to run the C++ preprocessor configure:2441: c++ -E conftest.C >/dev/null 2>conftest.out In file included from /usr/include/pwd.h:99, from /opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdlib.h:352, from configure:2437: /opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdio.h:30: warning: `__va__list' redefined /usr/include/pwd.h:27: warning: this is the location of the previous definition In file included from /opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdlib.h:356, from configure:2437: /usr/include/errno.h:26: warning: `__va__list' redefined /opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdio.h:30: warning: this is the location of the previous definition configure: failed program was: #line 2436 "configure" #include "confdefs.h" #include <stdlib.h> configure:2476: checking for string configure:2486: /lib/cpp conftest.C >/dev/null 2>conftest.out cpp: "configure", line 2482: error 4036: Can't open include file 'string'. configure: failed program was: #line 2481 "configure" #include "confdefs.h" #include <string> configure:2513: checking for class string in <string.h> configure:2528: c++ -c -O2 conftest.C 1>&5 In file included from configure:2520: /opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdlib.h:28: warning: `__va__list' redefined /opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdio.h:30: warning: this is the location of the previous definition configure: In function `int main()':
"Louis Bertrand" <louis.bertrand@datawire.net> writes: > For some reason, I can't seem to find the STL header for the > string class. I'm not sure it's installed correctly so I will > check with HP in the morning... Looks to me like gcc can't find it either. On my HPUX 10.20 installation of gcc 2.95.3, <string> is installed as /usr/local/include/g++-3/string and this directory is searched automatically by g++. However, I built and installed gcc from source. My guess is that something is bollixed up in your gcc installation. The Porting Archive folks tend to like to rearrange the directory setup of packages they port (they want everything under /opt instead of /usr/local), and I suspect they missed a needed change somewhere in the gcc 2.95.3 distribution. regards, tom lane
Tom, Easier said than done. Building GCC from the GNU distribution on HP-UX 11.00 errors out with a weird message. I suspect GCC on HP-UX 11.00 isn't quite stable yet. I will try again with the official HP ANSI C++ compiler, as soon as I can get a hold of my HP rep. cc -c -DIN_GCC -g -I. -I.. -I/usr/ports/gcc-2.95.3/gcc/ch -I/usr/port s/gcc-2.95.3/gcc/ch/.. -I/usr/ports/gcc-2.95.3/gcc/ch/../config -I/usr/ports /gcc-2.95.3/gcc/ch/../../include /usr/ports/gcc-2.95.3/gcc/ch/decl.c cc: "/usr/ports/gcc-2.95.3/gcc/ch/decl.c", line 1808: warning 604: Pointers are not assignment-compatible. cc: "/usr/ports/gcc-2.95.3/gcc/ch/decl.c", line 1808: warning 563: Argument #4 is not the correct type. cc: "/usr/ports/gcc-2.95.3/gcc/ch/decl.c", line 4447: error 1711: Inconsistent parameter list declaration for "start_struct". gmake[2]: *** [decl.o] Error 1 gmake[2]: Leaving directory `/usr/ports/gcc-2.95.3/obj/gcc/ch' gmake[1]: *** [cc1chill] Error 2 gmake[1]: Leaving directory `/usr/ports/gcc-2.95.3/obj/gcc' gmake: *** [all-gcc] Error 2 Thanks --Louis -- Louis Bertrand Datawire Communication Networks Inc. http://www.datawire.net/ (416) 989-7250 Cell (416) 798-2226 x 165 (Office) louis.bertrand@datawire.net -----Original Message----- From: pgsql-ports-owner@postgresql.org [mailto:pgsql-ports-owner@postgresql.org]On Behalf Of Tom Lane Sent: Friday, May 11, 2001 11:40 AM To: Louis Bertrand Cc: pgsql-ports@postgresql.org Subject: Re: [PORTS] HP-UX 11 + GCC + --with-CXX = pain "Louis Bertrand" <louis.bertrand@datawire.net> writes: > For some reason, I can't seem to find the STL header for the > string class. I'm not sure it's installed correctly so I will > check with HP in the morning... Looks to me like gcc can't find it either. On my HPUX 10.20 installation of gcc 2.95.3, <string> is installed as /usr/local/include/g++-3/string and this directory is searched automatically by g++. However, I built and installed gcc from source. My guess is that something is bollixed up in your gcc installation. The Porting Archive folks tend to like to rearrange the directory setup of packages they port (they want everything under /opt instead of /usr/local), and I suspect they missed a needed change somewhere in the gcc 2.95.3 distribution. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
Tom, Easier said than done. Building GCC from the GNU distribution on HP-UX 11.00 errors out with a weird message. I suspect GCC on HP-UX 11.00 isn't quite stable yet. I will try again with the official HP ANSI C++ compiler, as soon as I can get a hold of my HP rep. cc -c -DIN_GCC -g -I. -I.. -I/usr/ports/gcc-2.95.3/gcc/ch -I/usr/port s/gcc-2.95.3/gcc/ch/.. -I/usr/ports/gcc-2.95.3/gcc/ch/../config -I/usr/ports /gcc-2.95.3/gcc/ch/../../include /usr/ports/gcc-2.95.3/gcc/ch/decl.c cc: "/usr/ports/gcc-2.95.3/gcc/ch/decl.c", line 1808: warning 604: Pointers are not assignment-compatible. cc: "/usr/ports/gcc-2.95.3/gcc/ch/decl.c", line 1808: warning 563: Argument #4 is not the correct type. cc: "/usr/ports/gcc-2.95.3/gcc/ch/decl.c", line 4447: error 1711: Inconsistent parameter list declaration for "start_struct". gmake[2]: *** [decl.o] Error 1 gmake[2]: Leaving directory `/usr/ports/gcc-2.95.3/obj/gcc/ch' gmake[1]: *** [cc1chill] Error 2 gmake[1]: Leaving directory `/usr/ports/gcc-2.95.3/obj/gcc' gmake: *** [all-gcc] Error 2 Thanks --Louis -- Louis Bertrand Datawire Communication Networks Inc. http://www.datawire.net/ (416) 989-7250 Cell (416) 798-2226 x 165 (Office) louis.bertrand@datawire.net -----Original Message----- From: pgsql-ports-owner@postgresql.org [mailto:pgsql-ports-owner@postgresql.org]On Behalf Of Tom Lane Sent: Friday, May 11, 2001 11:40 AM To: Louis Bertrand Cc: pgsql-ports@postgresql.org Subject: Re: [PORTS] HP-UX 11 + GCC + --with-CXX = pain "Louis Bertrand" <louis.bertrand@datawire.net> writes: > For some reason, I can't seem to find the STL header for the > string class. I'm not sure it's installed correctly so I will > check with HP in the morning... Looks to me like gcc can't find it either. On my HPUX 10.20 installation of gcc 2.95.3, <string> is installed as /usr/local/include/g++-3/string and this directory is searched automatically by g++. However, I built and installed gcc from source. My guess is that something is bollixed up in your gcc installation. The Porting Archive folks tend to like to rearrange the directory setup of packages they port (they want everything under /opt instead of /usr/local), and I suspect they missed a needed change somewhere in the gcc 2.95.3 distribution. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)