[Pgcluster-general] pgcluster 1.7 link problem

David Nugent davidn at datalinktech.com.au
Sun Jun 3 23:32:32 UTC 2007


David Nugent wrote:
> On FreeBSD 6.2-STABLE i386 I am seeing a link problem as shown below 
> with the pgcluster distribution tarball with the following configure 
> options:
>   
This was 1.7rc7. Sorry, I had intended to mention this in the subject 
line but noticed it was missing.

> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline 
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing 
> -DUSE_REPLICATION -DPRINT_DEBUG -L../../src/port 
> -Wl,-R'/usr/local/pgsql/lib' -Wl,-export-dynamic access/SUBSYS.o 
> bootstrap/SUBSYS.o catalog/SUBSYS.o parser/SUBSYS.o commands/SUBSYS.o 
> executor/SUBSYS.o lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o 
> nodes/SUBSYS.o optimizer/SUBSYS.o port/SUBSYS.o postmaster/SUBSYS.o 
> regex/SUBSYS.o rewrite/SUBSYS.o storage/SUBSYS.o tcop/SUBSYS.o 
> utils/SUBSYS.o ../../src/timezone/SUBSYS.o 
> ../../src/port/libpgport_srv.a ../../src/interfaces/libpq/libpq.a -lssl 
> -lcrypto -lcrypt -lm -lc_r -o postgres
> libpq/SUBSYS.o(.text+0xe325): In function `set_recovery_packet':
> : undefined reference to `cuserid'
>   

cuserid is resolved by adding -lcompat to the link.

> Also, I notice -lc_r in the link (not -pthread or -lthr). Is this 
> intentional? I understand that libc_r is pretty much obsolete and only 
> required for compatibility in some cases.
>   

I'm still wondering about this. Everything links successfully with -lthr 
and will be testing with that today.


Regards,
/d


More information about the Pgcluster-general mailing list