From ed@jetumele.com Mon Aug 19 19:56:30 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 354004760AC for ; Mon, 19 Aug 2002 15:56:30 -0400 (EDT) Received: from tomts25-srv.bellnexxia.net (tomts25.bellnexxia.net [209.226.175.188]) by postgresql.org (Postfix) with ESMTP id CF689475BB2 for ; Mon, 19 Aug 2002 15:55:59 -0400 (EDT) Received: from fred ([204.101.206.194]) by tomts25-srv.bellnexxia.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP id <20020819195454.RFZU1462.tomts25-srv.bellnexxia.net@fred> for ; Mon, 19 Aug 2002 15:54:54 -0400 From: =?iso-8859-1?Q?Fr=E9d=E9ric_Boucher?= To: Subject: FreeBSD -pthread -lpq problem... Date: Mon, 19 Aug 2002 15:56:12 -0400 Message-ID: <00d101c247ba$7b050190$c2ce65cc@fred> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00D2_01C24798.F3F36190" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/67 X-Sequence-Number: 3029 This is a multi-part message in MIME format. ------=_NextPart_000_00D2_01C24798.F3F36190 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, I'm trying to compile a very simply program on FreeBSD that uses the C libpq interface... when I do like this : g++ -o test test.cpp -lpq it works perfectly. But since I've made a Multi-thread version of this program, I must now include the -pthread library. As soon as I try to compile using this : g++ -o test test.cpp -lpq -pthread I receive errors : /usr/lib/libc.so.4: WARNING! setkey(3) not present in the system! /usr/lib/libc.so.4: warning: this program uses gets(), which is unsafe. /usr/lib/libc.so.4: warning: mktemp() possibly used unsafely; consider using mkstemp() /usr/lib/libc.so.4: WARNING! des_setkey(3) not present in the system! /usr/lib/libc.so.4: WARNING! encrypt(3) not present in the system! /usr/lib/libc.so.4: warning: tmpnam() possibly used unsafely; consider using mkstemp() /usr/lib/libc.so.4: warning: this program uses f_prealloc(), which is stupid. /usr/lib/libc.so.4: WARNING! des_cipher(3) not present in the system! /usr/lib/libc.so.4: warning: tempnam() possibly used unsafely; consider using mkstemp() The errors occurs only when I mix "-lpq" with "-pthread"... if I use either one or the other, it works... Well I need to have multi-threading capability and POSTGRES access at the same time... :( Is this possible? How? thanks for your hint Fred ------=_NextPart_000_00D2_01C24798.F3F36190 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message
Hi,
 
I'm tryin= g to=20 compile a very simply program on FreeBSD that uses the C libpq=20 interface...  when I do like this :
 
g++ -o te= st test.cpp=20 -lpq
 
it works= =20 perfectly.  But since I've made a Multi-thread version of this program= , I=20 must now include the -pthread library.  As soon as I try to compile us= ing=20 this :
 
g++ = -o test=20 test.cpp  -lpq -pthread
 
I receive= errors :=20
 
/usr/lib/= libc.so.4:=20 WARNING!  setkey(3) not present in the system!
/usr/lib/libc.so.4:= =20 warning: this program uses gets(), which is unsafe.
/usr/lib/libc.so.4:= =20 warning: mktemp() possibly used unsafely; consider using=20 mkstemp()
/usr/lib/libc.so.4: WARNING!  des_setkey(3) not present i= n the=20 system!
/usr/lib/libc.so.4: WARNING!  encrypt(3) not present in the= =20 system!
/usr/lib/libc.so.4: warning: tmpnam() possibly used unsafely;=20 consider using mkstemp()
/usr/lib/libc.so.4: warning: this program uses= =20 f_prealloc(), which is stupid.
/usr/lib/libc.so.4: WARNING! =20 des_cipher(3) not present in the system!
/usr/lib/libc.so.4: warning:=20 tempnam() possibly used unsafely; consider using=20 mkstemp()
The error= s occurs=20 only when I mix "-lpq" with "-pthread"...  if I use either one or the= =20 other, it works...  Well I need to have multi-threading capability and= =20 POSTGRES access at the same time... :(  Is this possible? =20 How?
 
thanks fo= r your=20 hint
 
Fred
------=_NextPart_000_00D2_01C24798.F3F36190-- From peter_e@gmx.net Tue Aug 27 18:20:45 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 03BF3475956 for ; Tue, 27 Aug 2002 14:20:45 -0400 (EDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id DCB4B475843 for ; Tue, 27 Aug 2002 14:20:43 -0400 (EDT) Received: (qmail 6793 invoked by uid 0); 27 Aug 2002 18:20:33 -0000 Received: from pd902f0fa.dip0.t-ipconnect.de (217.2.240.250) by mail.gmx.net (mp009-rz3) with SMTP; 27 Aug 2002 18:20:33 -0000 Date: Tue, 27 Aug 2002 20:24:23 +0200 (CEST) From: Peter Eisentraut X-X-Sender: peter@localhost.localdomain To: =?iso-8859-1?Q?Fr=E9d=E9ric_Boucher?= Cc: pgsql-interfaces@postgresql.org Subject: Re: FreeBSD -pthread -lpq problem... In-Reply-To: <00d101c247ba$7b050190$c2ce65cc@fred> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/81 X-Sequence-Number: 3043 Frédéric Boucher writes: > The errors occurs only when I mix "-lpq" with "-pthread"... if I use > either one or the other, it works... Well I need to have > multi-threading capability and POSTGRES access at the same time... :( > Is this possible? How? Which PostgreSQL version? Which FreeBSD version? -- Peter Eisentraut peter_e@gmx.net From ed@jetumele.com Tue Aug 27 18:27:38 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 353B3475CFF for ; Tue, 27 Aug 2002 14:27:38 -0400 (EDT) Received: from tomts15-srv.bellnexxia.net (tomts15.bellnexxia.net [209.226.175.3]) by postgresql.org (Postfix) with ESMTP id 59C97475BE2 for ; Tue, 27 Aug 2002 14:27:33 -0400 (EDT) Received: from fred ([204.101.206.194]) by tomts15-srv.bellnexxia.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP id <20020827182721.JARF18984.tomts15-srv.bellnexxia.net@fred>; Tue, 27 Aug 2002 14:27:21 -0400 From: =?iso-8859-1?Q?Fr=E9d=E9ric_Boucher?= To: "'Peter Eisentraut'" Cc: Subject: Re: FreeBSD -pthread -lpq problem... Date: Tue, 27 Aug 2002 14:27:45 -0400 Message-ID: <005d01c24df7$73b974f0$c2ce65cc@fred> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/15 X-Sequence-Number: 3076 Postgresql v 7.1.3 FreeBSD v 4.2-Release /fb > -----Original Message----- > From: Peter Eisentraut [mailto:peter_e@gmx.net]=20 > Sent: 27 ao=FBt, 2002 14:24 > To: Fr=E9d=E9ric Boucher > Cc: pgsql-interfaces@postgresql.org > Subject: Re: [INTERFACES] FreeBSD -pthread -lpq problem... >=20 >=20 > Fr=E9d=E9ric Boucher writes: >=20 > > The errors occurs only when I mix "-lpq" with "-pthread"...=20 > if I use=20 > > either one or the other, it works... Well I need to have=20 > > multi-threading capability and POSTGRES access at the same=20 > time... :(=20 > > Is this possible? How? >=20 > Which PostgreSQL version? Which FreeBSD version? >=20 > --=20 > Peter Eisentraut peter_e@gmx.net >=20 >=20 >=20 From peter_e@gmx.net Tue Aug 27 20:14:21 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 7930A4762B5 for ; Tue, 27 Aug 2002 16:14:21 -0400 (EDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id 6A12B476243 for ; Tue, 27 Aug 2002 16:14:20 -0400 (EDT) Received: (qmail 12732 invoked by uid 0); 27 Aug 2002 20:14:20 -0000 Received: from pd902f0d7.dip0.t-ipconnect.de (217.2.240.215) by mail.gmx.net (mp013-rz3) with SMTP; 27 Aug 2002 20:14:20 -0000 Date: Tue, 27 Aug 2002 22:18:19 +0200 (CEST) From: Peter Eisentraut X-X-Sender: peter@localhost.localdomain To: =?iso-8859-1?Q?Fr=E9d=E9ric_Boucher?= Cc: pgsql-interfaces@postgresql.org Subject: Re: FreeBSD -pthread -lpq problem... In-Reply-To: <005d01c24df7$73b974f0$c2ce65cc@fred> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/84 X-Sequence-Number: 3046 In src/Makefile.shlib, near ifeq ($(PORTNAME), freebsd) remove the line SHLIB_LINK += -lc and rebuild libpq. Or update to a more recent release, where this is already done. Frédéric Boucher writes: > Postgresql v 7.1.3 > FreeBSD v 4.2-Release > > /fb > > > -----Original Message----- > > From: Peter Eisentraut [mailto:peter_e@gmx.net] > > Sent: 27 août, 2002 14:24 > > To: Frédéric Boucher > > Cc: pgsql-interfaces@postgresql.org > > Subject: Re: [INTERFACES] FreeBSD -pthread -lpq problem... > > > > > > Frédéric Boucher writes: > > > > > The errors occurs only when I mix "-lpq" with "-pthread"... > > if I use > > > either one or the other, it works... Well I need to have > > > multi-threading capability and POSTGRES access at the same > > time... :( > > > Is this possible? How? > > > > Which PostgreSQL version? Which FreeBSD version? > > > > -- > > Peter Eisentraut peter_e@gmx.net > > > > > > > > -- Peter Eisentraut peter_e@gmx.net