Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 39F481337B51 for ; Sat, 18 Dec 2010 08:34:45 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 75610-07 for ; Sat, 18 Dec 2010 12:34:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp-vbr10.xs4all.nl (smtp-vbr10.xs4all.nl [194.109.24.30]) by mail.postgresql.org (Postfix) with ESMTP id CCFC51337B43 for ; Sat, 18 Dec 2010 08:34:36 -0400 (AST) Received: from pc09.procura.nl (procura.xs4all.nl [82.95.216.29]) (authenticated bits=0) by smtp-vbr10.xs4all.nl (8.13.8/8.13.8) with ESMTP id oBICYOhn067553 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 18 Dec 2010 13:34:29 +0100 (CET) (envelope-from h.m.brand@xs4all.nl) Date: Sat, 18 Dec 2010 13:34:23 +0100 From: "H.Merijn Brand" To: Tom Lane Cc: Simon Riggs , pgsql-bugs@postgresql.org Subject: Re: [Fwd: DBD::Pg on HP-UX 11.31 64bit] Message-ID: <20101218133423.2ce7fa6a@pc09.procura.nl> In-Reply-To: <23792.1292522172@sss.pgh.pa.us> References: <1292355427.2737.4589.camel@ebony> <18189.1292357796@sss.pgh.pa.us> <20101216174803.20b2b6db@pc09.procura.nl> <23253.1292520241@sss.pgh.pa.us> <23387.1292520681@sss.pgh.pa.us> <20101216184257.2d19fa5a@pc09.procura.nl> <23792.1292522172@sss.pgh.pa.us> X-Mailer: Claws Mail 3.7.8cvs1 (GTK+ 2.18.6; x86_64-unknown-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwEAIAAACI8LKTAAAACXBIWXMAAABIAAAASABGyWs+AAAC JElEQVRo3u2aMY4CMQxFczZ6RItEzRm4DBINDbRUSPRInIRbsNK6+dJfezN4kokn48IaCSjysL8d e9Knoj2fr9f9/gllqQ6U9/vxWK3EdwdIEGjRIVCu18NhuxUfK46SH81+fzrdbuKPx/P5ctHQdAdI TKAgpvV6s9ntBEfXEYSGgMQzIHnuFBBjkshCNJ2KtJZ04hHNAugP8bZr3NIHhbcF0AKoK0CoaHXU LUWBIs1n+jV+Fl8CVqOApEXAwyMO/DSR4XVntoAYDR7eBjQupuYAYTMph8Rj21D4m7MChN02tpqs NSnb/KqU2oHCXu5xDCgflj/RAgBiKBIXnICzAsSjWBsTz5K4/HeXYvb8yK5lY3VGEwPi2aONKT+5 AlcxrTPOwcTiraGRChgMEKJh0bVVifGVTq6qgBiNVl8QE29EsK6VE+YJAOG2wz5AvsqUS6uqgHCA n4NGvBYpnJ64Jgg27sCtxtBk1CJIA4S/GhdWKh07QxUB48jWGhZ4jKamRRr/T8/M0AaEyctry6YB 4dTGj9iWZNs3DahES5kPCJOu0RQbF/fQOBprsB9gaO9JtPDzII9U5ySXX7AnuIt91y54AAW7rPpT LCe5gt3F+CLqr2UarGB3MXvMylWGq4+9RCx3TW1oJq1t3HPQlFs6N1fFNEB4s8dn7Ne7ACSm7TPQ I5quAWmw6qBpulHM33B0Csge4Nd8JTTYG2b1XyRe3lH8x34ABJ6aePuQ2N4AAAAASUVORK5CYII= Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by XS4ALL Virus Scanner 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, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/129 X-Sequence-Number: 28935 On Thu, 16 Dec 2010 12:56:12 -0500, Tom Lane wrote: > "H.Merijn Brand" writes: > > On Thu, 16 Dec 2010 12:31:21 -0500, Tom Lane wrote: > >> So what I'm thinking is happening is that libpq expects size_t as > >> the argument type, but it's getting linked against a libc that > >> expects int as the argument type, and whatever HP is doing under > >> the hood fails to cope with that case. You might try removing > >> -D_XOPEN_SOURCE_EXTENDED from the template file --- I don't know if > >> that will have any bad side-effects, but it's worth a try to build > >> libpq that way. > > > I'll try that first after cleaning up my environment. > > I looked in the git history and found that I added > -D_XOPEN_SOURCE_EXTENDED in a patch that made getaddrinfo work > correctly: > http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;h=1da6eb7fdaa79a93972c290174bd7136672a894f > So taking it out may indeed have unpleasant side-effects. I rebuilt perl from scratch with xnet as required lib and cpp option -D_XOPEN_SOURCE_EXTENDED predefined in the hint file All my other required modules passed, and DBD::Pg now connects! With localhost postgres t/01connect.t ....... 1/13 # # DBI Version 1.615 # DBD::Pg Version 2.17.1 # Perl Version 5.12.2 # OS hpux # PostgreSQL (compiled) 80405 # PostgreSQL (target) 80405 # PostgreSQL (reported) PostgreSQL 8.4.5 on ia64-hp-hpux11.31, compiled by cc -Ae, 64-bit # Default port 5432 # DBI_DSN dbi:Pg:db="postgres";port=5440;host=/dbdpg_test_database/data/socket # DBI_USER merijn # Test schema dbd_pg_testschema # LANG C # array_nulls on # backslash_quote safe_encoding # client_encoding UTF8 # server_encoding UTF8 # standard_conforming_strings off # Adjusted: initdb t/01connect.t ....... ok t/01constants.t ..... ok t/02attribs.t ....... ok t/03dbmethod.t ...... ok t/03smethod.t ....... ok t/04misc.t .......... ok t/06bytea.t ......... ok t/07copy.t .......... ok t/08async.t ......... ok t/09arrays.t ........ ok t/12placeholders.t .. ok t/20savepoints.t .... ok t/99cleanup.t ....... 1/1 Removing test database directory t/99cleanup.t ....... ok All tests successful. Files=15, Tests=1707, 29 wallclock secs ( 0.39 usr 0.09 sys + 4.35 cusr 1.32 csys = 6.15 CPU) Result: PASS With remote host postgres t/00-signature.t .... skipped: Set the environment variable TEST_SIGNATURE to enable this test t/00basic.t ......... ok t/01connect.t ....... 1/13 # # DBI Version 1.615 # DBD::Pg Version 2.17.1 # Perl Version 5.12.2 # OS hpux # PostgreSQL (compiled) 80405 # PostgreSQL (target) 80404 # PostgreSQL (reported) PostgreSQL 8.4.4 on x86_64-unknown-linux-gnu, compiled by GCC gcc (SUSE Linux) 4.4.1 [gcc-4_4-branch revision 150839], 64-bit # Default port 5432 # DBI_DSN dbi:Pg: # DBI_USER postgres # Test schema dbd_pg_testschema # PGDATABASE lep1699 # PGHOST 192.0.1.192 # array_nulls on # backslash_quote safe_encoding # client_encoding UTF8 # server_encoding UTF8 # standard_conforming_strings off t/01connect.t ....... ok t/01constants.t ..... ok t/02attribs.t ....... 231/249 # Failed test 'Failed ping returns a SQLSTATE code of 08000' # at t/02attribs.t line 1597. # got: '22000' # expected: '08000' # Looks like you failed 1 test of 249. t/02attribs.t ....... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/249 subtests (less 1 skipped subtest: 247 okay) t/03dbmethod.t ...... ok t/03smethod.t ....... ok t/04misc.t .......... ok t/06bytea.t ......... ok t/07copy.t .......... ok t/08async.t ......... ok t/09arrays.t ........ ok t/12placeholders.t .. ok t/20savepoints.t .... ok t/99cleanup.t ....... 1/1 Removing test database directory t/99cleanup.t ....... ok Test Summary Report ------------------- t/02attribs.t (Wstat: 256 Tests: 249 Failed: 1) Failed test: 244 Non-zero exit status: 1 Files=15, Tests=1707, 20 wallclock secs ( 0.38 usr 0.07 sys + 2.72 cusr 0.74 csys = 3.91 CPU) Result: FAIL Failed 1/15 test programs. 1/1707 subtests failed. make: *** [test_dynamic] Error 255 -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using 5.00307 through 5.12 and porting perl5.13.x on HP-UX 10.20, 11.00, 11.11, 11.23 and 11.31, OpenSuSE 10.1, 11.0 .. 11.3 and AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/