SCM

[#1010427] On Solaris8 make pgcluster-1[1].5.0rc21.tar report error!

View Trackers | Bugs | Download .csv | Monitor

Date:
2008-07-09 11:54
Priority:
3
State:
Open
Submitted by:
betty sun (sunbetty2008)
Assigned to:
Nobody (None)
Category:
Group:
Resolution:
None
 
Summary:
On Solaris8 make pgcluster-1[1].5.0rc21.tar report error!

Detailed description
PGCluster team:

OS: Solaris 5.8

PGCluster version : pgcluster-1[1].5.0rc20.tar

or pgcluster-1[1].5.0rc21.tar

after exec:

./configure --prefix=/u2/postgres/postgre \
--with-pgport=6543 --without-readline \
--without-zlib --enable-thread-safety



make

report follow error:

/usr/include/sys/feature_tests.h:96:1: warning: this is the location of the previous definition
/usr/ccs/bin/ld -r -o SUBSYS.o dllist.o sem.o show.o signal.o
make[3]: Leaving directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src/pgcluster/libpgc'
make[3]: Entering directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src/pgcluster/pgrp'
/usr/local/bin/gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -DUSE_REPLICATION -DPRINT_DEBUG -DPRINT_DEBUG -I../../../src/interfaces/libpq -I../../../src/include -DBINDIR=\"/u2/postgres/postgre/bin\" -c -o pqformat.o pqformat.c
/usr/local/bin/gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -DUSE_REPLICATION -DPRINT_DEBUG -DPRINT_DEBUG -I../../../src/interfaces/libpq -I../../../src/include -DBINDIR=\"/u2/postgres/postgre/bin\" -c -o cascade.o cascade.c
/usr/local/bin/gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -DUSE_REPLICATION -DPRINT_DEBUG -DPRINT_DEBUG -I../../../src/interfaces/libpq -I../../../src/include -DBINDIR=\"/u2/postgres/postgre/bin\" -c -o conf.o conf.c
conf.c: In function `PGRget_Conf_Data':
conf.c:412: warning: subscript has type `char'
conf.c:412: warning: subscript has type `char'
/usr/local/bin/gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -DUSE_REPLICATION -DPRINT_DEBUG -DPRINT_DEBUG -I../../../src/interfaces/libpq -I../../../src/include -DBINDIR=\"/u2/postgres/postgre/bin\" -c -o main.o main.c
main.c: In function `write_pid_file':
main.c:618: warning: int format, pid_t arg (arg 4)
/usr/local/bin/gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -DUSE_REPLICATION -DPRINT_DEBUG -DPRINT_DEBUG -I../../../src/interfaces/libpq -I../../../src/include -DBINDIR=\"/u2/postgres/postgre/bin\" -c -o recovery.o recovery.c
/usr/local/bin/gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -DUSE_REPLICATION -DPRINT_DEBUG -DPRINT_DEBUG -I../../../src/interfaces/libpq -I../../../src/include -DBINDIR=\"/u2/postgres/postgre/bin\" -c -o replicate.o replicate.c
replicate.c: In function `PGRreplicate_exit':
replicate.c:865: warning: passing arg 1 of `shmdt' from incompatible pointer type
replicate.c:874: warning: passing arg 1 of `shmdt' from incompatible pointer type
replicate.c: In function `check_copy_command':
replicate.c:2023: warning: subscript has type `char'
replicate.c:2024: warning: subscript has type `char'
replicate.c: In function `thread_send_cluster':
replicate.c:2916: warning: control reaches end of non-void function
/usr/local/bin/gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -DUSE_REPLICATION -DPRINT_DEBUG -DPRINT_DEBUG -I../../../src/interfaces/libpq -I../../../src/include -DBINDIR=\"/u2/postgres/postgre/bin\" -c -o rlog.o rlog.c
rlog.c: In function `reconfirm_commit':
rlog.c:440: warning: unused variable `func'
rlog.c: In function `do_rlog':
rlog.c:799: warning: unused variable `func'
/usr/local/bin/gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -DUSE_REPLICATION -DPRINT_DEBUG -DPRINT_DEBUG -I../../../src/interfaces/libpq -I../../../src/include -DBINDIR=\"/u2/postgres/postgre/bin\" -c -o lifecheck.o lifecheck.c
/usr/local/bin/gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -DUSE_REPLICATION -DPRINT_DEBUG -DPRINT_DEBUG pqformat.o cascade.o conf.o main.o recovery.o replicate.o rlog.o lifecheck.o ../../../src/backend/libpq/replicate_com.o ../libpgc/SUBSYS.o -L../../../src/interfaces/libpq -lpq ../../../src/interfaces/libpq/libpq.a -L../../../src/port -Wl,-R'/u2/postgres/postgre/lib' -lpgport -lnsl -lrt -lsocket -ldl -lm -lpthread -o pgreplicate
make[3]: Leaving directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src/pgcluster/pgrp'
make[3]: Entering directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src/pgcluster/pglb'
/usr/local/bin/gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -DUSE_REPLICATION -DPRINT_DEBUG -DPRINT_DEBUG -I../../../src/interfaces/libpq -I../../../src/include -DBINDIR=\"/u2/postgres/postgre/bin\" -c -o child.o child.c
In file included from ../../../src/include/c.h:53,
from ../../../src/include/replicate_com.h:23,
from child.c:44:
../../../src/include/pg_config.h:662:1: warning: "_FILE_OFFSET_BITS" redefined
In file included from /usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.6/include/sys/types.h:28,
from child.c:28:
/usr/include/sys/feature_tests.h:96:1: warning: this is the location of the previous definition
In file included from pglb.h:19,
from child.c:45:
pool_ip.h:54: error: conflicting types for 'gai_strerror'
/usr/include/netdb.h:307: error: previous declaration of 'gai_strerror' was here
pool_ip.h:54: error: conflicting types for 'gai_strerror'
/usr/include/netdb.h:307: error: previous declaration of 'gai_strerror' was here
make[3]: *** [child.o] Error 1
make[3]: Leaving directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src/pgcluster/pglb'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src/pgcluster'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src'
make: *** [all] Error 2
$



then I try compile pgcluster-1.9.0rc5.tar

pgcluster-1[1].7.0rc12.tar



all version has this make error.



What's wrong with it? Hope everyone here can help you work it out!

Thanks very much!


------------------------------------------------------------------------------
attache:
if make report error:
/usr/ccs/bin/ld -r -o SUBSYS.o fmgrtab.o adt/SUBSYS.o cache/SUBSYS.o error/SUBSYS.o fmgr/SUBSYS.o hash/SUBSYS.o init/SUBSYS.o mb/SUBSYS.o misc/SUBSYS.o mmgr/SUBSYS.o resowner/SUBSYS.o sort/SUBSYS.o time/SUBSYS.o
make[3]: Leaving directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src/backend/utils'
make -C ../../src/timezone all
make[3]: Entering directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src/timezone'
make -C ../../src/port all
make[4]: Entering directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src/port'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src/port'
make[3]: Leaving directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src/timezone'
/usr/local/bin/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'/u2/postgres/postgre/lib' 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 -lrt -lsocket -ldl -lm -lpthread -o postgres
Undefined first referenced
symbol in file
gethostbyname libpq/SUBSYS.o (symbol belongs to implicit dependency /lib/libnsl.so.1)
ld: fatal: Symbol referencing errors. No output written to postgres
collect2: ld returned 1 exit status
make[2]: *** [postgres] Error 1
make[2]: Leaving directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src/backend'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src'
make: *** [all] Error 2
$

resolve:
vi src/Makefile.global
from
LIBS = -lrt -lsocket -ldl -lm
modify to:
LIBS = -lnsl -lrt -lsocket -ldl -lm

then exec make command, all version report :
pool_ip.h:54: error: conflicting types for 'gai_strerror'
/usr/include/netdb.h:307: error: previous declaration of 'gai_strerror' was here
pool_ip.h:54: error: conflicting types for 'gai_strerror'
/usr/include/netdb.h:307: error: previous declaration of 'gai_strerror' was here
make[3]: *** [child.o] Error 1
make[3]: Leaving directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src/pgcluster/pglb'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src/pgcluster'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/u2/postgres/pgcluster/pgcluster-1.7.0rc12/src'
make: *** [all] Error 2

and I don't know how to work it out. Hope can help me work it out!
I have tried it many times.

Followup

No Followups Have Been Posted

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge