pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedFreeBSD -pthread -lpq problem...
4+ messages / 2 participants
[nested] [flat]
* FreeBSD -pthread -lpq problem...
@ 2002-08-19 19:56 Frédéric Boucher <ed@jetumele.com>
0 siblings, 1 reply; 4+ messages in thread
From: Frédéric Boucher @ 2002-08-19 19:56 UTC (permalink / raw)
To: pgsql-interfaces
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: FreeBSD -pthread -lpq problem...
@ 2002-08-27 18:24 Peter Eisentraut <peter_e@gmx.net>
parent: Frédéric Boucher <ed@jetumele.com>
0 siblings, 1 reply; 4+ messages in thread
From: Peter Eisentraut @ 2002-08-27 18:24 UTC (permalink / raw)
To: Frédéric Boucher <ed@jetumele.com>; +Cc: pgsql-interfaces
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: FreeBSD -pthread -lpq problem...
@ 2002-08-27 18:27 Frédéric Boucher <ed@jetumele.com>
parent: Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 4+ messages in thread
From: Frédéric Boucher @ 2002-08-27 18:27 UTC (permalink / raw)
To: 'Peter Eisentraut' <peter_e@gmx.net>; +Cc: pgsql-interfaces
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
>
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: FreeBSD -pthread -lpq problem...
@ 2002-08-27 20:18 Peter Eisentraut <peter_e@gmx.net>
parent: Frédéric Boucher <ed@jetumele.com>
0 siblings, 0 replies; 4+ messages in thread
From: Peter Eisentraut @ 2002-08-27 20:18 UTC (permalink / raw)
To: Frédéric Boucher <ed@jetumele.com>; +Cc: pgsql-interfaces
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
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2002-08-27 20:18 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-19 19:56 FreeBSD -pthread -lpq problem... Frédéric Boucher <ed@jetumele.com>
2002-08-27 18:24 ` Peter Eisentraut <peter_e@gmx.net>
2002-08-27 18:27 ` Frédéric Boucher <ed@jetumele.com>
2002-08-27 20:18 ` Peter Eisentraut <peter_e@gmx.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox