[pgpool-general: 90] AIX make problem pgpool 3.1.1

Carrington, Matthew (Produban) Matthew.Carrington at Produban.co.uk
Tue Dec 13 19:56:44 JST 2011


The following is a trace of my attempts to build pgpool 3.1.1 on AIX. Any help
resolving the problems I've encountered would be very much appreciated.

Started out with ...

export OBJECT_MODE=64
CC='gcc -maix64' ./configure --prefix=/opt/serviceMonitoring/pgpool
make

... make failed with ...

gcc -maix64 -DHAVE_CONFIG_H -DDEFAULT_CONFIGDIR=\"/opt/serviceMonitoring/pgpool/etc\" -I.  -D_GNU_SOURCE -I /ukmetmon/data/dataCollection/postgres/include   -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -MT recovery.o -MD -MP -MF .deps/recovery.Tpo -c -o recovery.o recovery.c
recovery.c: In function 'start_recovery':
recovery.c:157: error: variable 't' has initializer but incomplete type
recovery.c:157: warning: excess elements in struct initializer
recovery.c:157: warning: (near initialization for 't')
recovery.c:157: warning: excess elements in struct initializer
recovery.c:157: warning: (near initialization for 't')
recovery.c:157: error: storage size of 't' isn't known
recovery.c:159: warning: implicit declaration of function 'select'
recovery.c:157: warning: unused variable 't'
make[2]: *** [recovery.o] Error 1
make[2]: Leaving directory `/ukmetmon/data/dataCollection/build/pgpool-II-3.1.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/ukmetmon/data/dataCollection/build/pgpool-II-3.1.1'
make: *** [all] Error 2

... edited pool.h and added ...

#include <sys/time.h>

... make failed with ...

/bin/sh ./libtool --tag=CC   --mode=link gcc -maix64  -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -rpath /ukmetmon/data/dataCollection/postgres/lib -rpath /opt/serviceMonitoring/pgpool/lib  -o pgpool main.o child.o pool_auth.o pool_config.o pool_error.o pool_process_query.o pool_stream.o pool_connection_pool.o pool_params.o pool_signal.o pcp_child.o md5.o pool_shmem.o pool_sema.o pool_system.o pool_rewrite_query.o pool_rewrite_outfuncs.o pool_query_cache.o pool_hba.o pool_path.o pool_ip.o ps_status.o strlcpy.o recovery.o pool_relcache.o pool_process_reporting.o pool_ssl.o pool_timestamp.o pool_proto2.o pool_proto_modules.o pool_lobj.o pool_process_context.o pool_session_context.o pool_query_context.o pool_worker_child.o pool_passwd.o pool_globals.o pool_select_walker.o getopt_long.o -L/ukmetmon/data/dataCollection/postgres/lib -lpq parser/libsql-parser.a pcp/libpcp.la parser/nodes.o -lcrypt -lPW -lnsl -lm 
libtool: link: gcc -maix64 -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -o pgpool main.o child.o pool_auth.o pool_config.o pool_error.o pool_process_query.o pool_stream.o pool_connection_pool.o pool_params.o pool_signal.o pcp_child.o md5.o pool_shmem.o pool_sema.o pool_system.o pool_rewrite_query.o pool_rewrite_outfuncs.o pool_query_cache.o pool_hba.o pool_path.o pool_ip.o ps_status.o strlcpy.o recovery.o pool_relcache.o pool_process_reporting.o pool_ssl.o pool_timestamp.o pool_proto2.o pool_proto_modules.o pool_lobj.o pool_process_context.o pool_session_context.o pool_query_context.o pool_worker_child.o pool_passwd.o pool_globals.o pool_select_walker.o getopt_long.o parser/nodes.o  -L/ukmetmon/data/dataCollection/postgres/lib -lpq parser/libsql-parser.a pcp/.libs/libpcp.a -lcrypt -lPW -lnsl -lm
ld: 0711-224 WARNING: Duplicate symbol: .pg_utf_mblen
ld: 0711-224 WARNING: Duplicate symbol: .unicode_to_utf8
ld: 0711-224 WARNING: Duplicate symbol: .pg_mule_mblen
ld: 0711-224 WARNING: Duplicate symbol: .pg_utf8_islegal
ld: 0711-224 WARNING: Duplicate symbol: .pg_mic_mblen
ld: 0711-224 WARNING: Duplicate symbol: .pg_encoding_mblen
ld: 0711-224 WARNING: Duplicate symbol: .pg_encoding_dsplen
ld: 0711-224 WARNING: Duplicate symbol: .pg_encoding_verifymb
ld: 0711-224 WARNING: Duplicate symbol: .pg_encoding_max_length
ld: 0711-224 WARNING: Duplicate symbol: pg_wchar_table
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
ld: 0711-317 ERROR: Undefined symbol: .vsyslog
collect2: ld returned 8 exit status
make[2]: *** [pgpool] Error 1
make[2]: Leaving directory `/ukmetmon/data/dataCollection/build/pgpool-II-3.1.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/ukmetmon/data/dataCollection/build/pgpool-II-3.1.1'
make: *** [all] Error 2

... tried adding the following at the end of pool_error.c ...

void vsyslog (int facility_priority, const char *format, va_list arglist)
{
	char *msg = NULL;
	vasprintf(&msg, format, arglist);
	if (!msg)
		return;
	syslog(facility_priority, "%s", msg);
	SAFE_FREE(msg);
}

... make failed with ...

libtool: link: gcc -maix64 -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -o pgpool main.o child.o pool_auth.o pool_config.o pool_error.o pool_process_query.o pool_stream.o pool_connection_pool.o pool_params.o pool_signal.o pcp_child.o md5.o pool_shmem.o pool_sema.o pool_system.o pool_rewrite_query.o pool_rewrite_outfuncs.o pool_query_cache.o pool_hba.o pool_path.o pool_ip.o ps_status.o strlcpy.o recovery.o pool_relcache.o pool_process_reporting.o pool_ssl.o pool_timestamp.o pool_proto2.o pool_proto_modules.o pool_lobj.o pool_process_context.o pool_session_context.o pool_query_context.o pool_worker_child.o pool_passwd.o pool_globals.o pool_select_walker.o getopt_long.o parser/nodes.o  -L/ukmetmon/data/dataCollection/postgres/lib -lpq parser/libsql-parser.a pcp/.libs/libpcp.a -lcrypt -lPW -lnsl -lm
ld: 0711-224 WARNING: Duplicate symbol: .pg_utf_mblen
ld: 0711-224 WARNING: Duplicate symbol: .unicode_to_utf8
ld: 0711-224 WARNING: Duplicate symbol: .pg_mule_mblen
ld: 0711-224 WARNING: Duplicate symbol: .pg_utf8_islegal
ld: 0711-224 WARNING: Duplicate symbol: .pg_mic_mblen
ld: 0711-224 WARNING: Duplicate symbol: .pg_encoding_mblen
ld: 0711-224 WARNING: Duplicate symbol: .pg_encoding_dsplen
ld: 0711-224 WARNING: Duplicate symbol: .pg_encoding_verifymb
ld: 0711-224 WARNING: Duplicate symbol: .pg_encoding_max_length
ld: 0711-224 WARNING: Duplicate symbol: pg_wchar_table
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
ld: 0711-317 ERROR: Undefined symbol: .vasprintf
ld: 0711-317 ERROR: Undefined symbol: .SAFE_FREE
collect2: ld returned 8 exit status
make[2]: *** [pgpool] Error 1
make[2]: Leaving directory `/ukmetmon/data/dataCollection/build/pgpool-II-3.1.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/ukmetmon/data/dataCollection/build/pgpool-II-3.1.1'
make: *** [all] Error 2

... tried disabling syslog functionality by replacing vsyslog in pool_error.c with ...

void vsyslog (int facility_priority, const char *format, va_list arglist)
{
     char *msg = NULL;
     return;
}

... make failed with ...

gcc -maix64 -DHAVE_CONFIG_H -DDEFAULT_CONFIGDIR=\"/opt/serviceMonitoring/pgpool/etc\" -I.  -D_GNU_SOURCE -I /ukmetmon/data/dataCollection/postgres/include   -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -MT pool_config_md5.o -MD -MP -MF .deps/pool_config_md5.Tpo -c -o pool_config_md5.o pool_config_md5.c
mv -f .deps/pool_config_md5.Tpo .deps/pool_config_md5.Po
/bin/sh ./libtool --tag=CC   --mode=link gcc -maix64  -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations   -o pg_md5 pg_md5.o md5.o pool_config_md5.o pool_error.o pool_signal.o pool_passwd.o pool_globals.o strlcpy.o  -lcrypt -lPW -lnsl -lm 
libtool: link: gcc -maix64 -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -o pg_md5 pg_md5.o md5.o pool_config_md5.o pool_error.o pool_signal.o pool_passwd.o pool_globals.o strlcpy.o  -lcrypt -lPW -lnsl -lm
ld: 0711-317 ERROR: Undefined symbol: .getopt_long
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
make[2]: *** [pg_md5] Error 1
make[2]: Leaving directory `/ukmetmon/data/dataCollection/build/pgpool-II-3.1.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/ukmetmon/data/dataCollection/build/pgpool-II-3.1.1'
make: *** [all] Error 2

... there is a getopt_long.o but it doesn't look like the make is picking it up.

Does anyone have any suggestions ?

Matthew


Emails aren't always secure, and they may be intercepted or changed
after they've been sent. Produban doesn't accept liability if this
happens. If you think someone may have interfered with this email,
please get in touch with the sender another way. This message and any
documents attached to it do not create or change any contract unless
otherwise specifically stated. Any views or opinions contained in this
message are solely those of the author, and do not necessarily represent
those of Produban, unless otherwise specifically stated and the sender
is authorised to do so. Produban doesn't accept responsibility for
damage caused by any viruses contained in this email or its attachments.
Emails may be monitored. If you've received this email by mistake,
please let the sender know at once that it's gone to the wrong person
and then destroy it without copying, using, or telling anyone about its
contents. Produban Servicios Informaticos Generales, S.L. (UK Branch).
Registered office: Shenley Wood House, Chalkdell Drive, Shenley Wood,
Milton Keynes MK5 6LA. Branch registration number BR 008486.
Ref:[PDB#014]



More information about the pgpool-general mailing list