Re: compilation of pg_config fails - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: compilation of pg_config fails
Date
Msg-id 45CAFA12.1010803@enterprisedb.com
Whole thread Raw
In response to compilation of pg_config fails  (Markus Schiltknecht <markus@bluegap.ch>)
List pgsql-hackers
Markus Schiltknecht wrote:
> Hi,
> 
> since str(n?)cat got replaced with strlcat, I fail to build PostgreSQL 
> (current CVS HEAD). HAVING_DECL_STRLCAT is not set, so AFAIK, the 
> strlcat() function from src/port should be used. However, I've read the 
> README there, but still don't quite know what's wrong.
> 
> The linker throws:
> 
> gcc -O1 -Wall -pg -Wall -Wmissing-prototypes -Wpointer-arith -Winline 
> -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -g 
> pg_config.o  -L../../../src/port  -Wl,-rpath,'/usr/local/pgsql/lib' 
> -lpgport -lz -lreadline -lcrypt -ldl -lm  -o pg_config
> pg_config.o: In function `show_pgxs':
> /home/markus/projects/pgsql/sources/trunk/src/bin/pg_config/pg_config.c:216: 
> 
> undefined reference to `strlcat'
> 
> Even if objdump confirms that strlcat.o is compiled in 
> ../../../src/port/libpgport.o:
> 
> In archive ../../../src/port/libpgport.a:
> 
> strlcpy.o:     file format elf32-i386
> 
> SYMBOL TABLE:
> 00000000 l    df *ABS*  00000000 strlcpy.c
> 00000000 l    d  .text  00000000 .text
> 00000000 l    d  .data  00000000 .data
> 00000000 l    d  .bss   00000000 .bss
> 00000000 l    d  .debug_abbrev  00000000 .debug_abbrev
> 00000000 l    d  .debug_info    00000000 .debug_info
> 00000000 l    d  .debug_line    00000000 .debug_line
> 00000000 l    d  .debug_frame   00000000 .debug_frame
> 00000000 l    d  .debug_loc     00000000 .debug_loc
> 00000000 l    d  .debug_pubnames        00000000 .debug_pubnames
> 00000000 l    d  .debug_aranges 00000000 .debug_aranges
> 00000000 l    d  .debug_str     00000000 .debug_str
> 00000000 l    d  .note.GNU-stack        00000000 .note.GNU-stack
> 00000000 l    d  .comment       00000000 .comment
> 00000000 g     F .text  00000045 strlcpy
> 00000000         *UND*  00000000 mcount

That dump shows strl*cpy*, not strlcat.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Markus Schiltknecht
Date:
Subject: compilation of pg_config fails
Next
From: Peter Eisentraut
Date:
Subject: Re: compilation of pg_config fails