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--