Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 25C2F1337B7D for ; Tue, 14 Dec 2010 16:16:47 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 97145-06 for ; Tue, 14 Dec 2010 20:16:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 1CD701337B77 for ; Tue, 14 Dec 2010 16:16:39 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id oBEKGaZG018190; Tue, 14 Dec 2010 15:16:36 -0500 (EST) To: Simon Riggs cc: pgsql-bugs@postgresql.org, "H.Merijn Brand" Subject: Re: [Fwd: DBD::Pg on HP-UX 11.31 64bit] In-reply-to: <1292355427.2737.4589.camel@ebony> References: <1292355427.2737.4589.camel@ebony> Comments: In-reply-to Simon Riggs message dated "Tue, 14 Dec 2010 19:37:07 +0000" Date: Tue, 14 Dec 2010 15:16:36 -0500 Message-ID: <18189.1292357796@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/92 X-Sequence-Number: 28898 Simon Riggs writes: > FW > From: H.Merijn Brand > I have postgres running on most my HP-UX varieties, ranging from HP-UX > 10.20/32bit through 11.31/64bit. It works fine everywhere, except on > HP-UX 11.31-ipf in 64bit mode. Note that this is Itanium architecture. > postgres' own test suite passes, but all connects fail with DBD::Pg. That's pretty odd. What seems to be failing here: > This is perl, v5.10.1 (*) built for IA64.ARCHREV_0-LP64 > getsockopt (3, SOL_SOCKET, SO_ERROR, 0x9fffffffffffdb84, 0x9fffffffffffdb98) ERR#22 EINVAL is this bit of code in libpq: int optval; ACCEPT_TYPE_ARG3 optlen = sizeof(optval); ... if (getsockopt(conn->sock, SOL_SOCKET, SO_ERROR, (char *) &optval, &optlen) == -1) { appendPQExpBuffer(&conn->errorMessage, libpq_gettext("could not get socket error status: %s\n"), SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf))); goto error_return; } It's not clear at all how that would fail in the Perl environment if it works standalone. I could believe getting EINVAL if we had determined the wrong datatype for ACCEPT_TYPE_ARG3, but that ought to fail standalone too, I should think. Anyway it would be worth checking what configure identified as ACCEPT_TYPE_ARG3 and comparing that to the docs for getsockopt. Meanwhile, this one: > This is perl 5, version 12, subversion 2 (v5.12.2) built for IA64.ARCHREV_0-LP64-ld > Received signal 4, SIGILL, in user mode, [SIG_DFL], partial siginfo > Siginfo: si_code: ILL_ILLOPC, faulting address: 0x60000000000ab620, si_errno: 0 > PC: 00000001000000a0.0 seems like it's just a flat-out library incompatibility --- it looks to me like it's probably failing immediately upon passing control to libpq. I'm wondering about issues like word width and endianness. IA64 can do either endianness IIRC, so maybe your toolchain is confused about which it should use? regards, tom lane