PostgreSQL La base de donnees la plus sophistiquee au monde.

Forums PostgreSQL.fr

Le forum officiel de la communauté francophone de PostgreSQL

Vous n'êtes pas identifié(e).

#1 13/04/2010 14:43:03

fadace
Membre

Compilation de Slony 2.0 sous Aix.

Bonjour,

Il est spécifié dans INSTALL, que sous Aix et Sun Solaris, l'option  --enable-thread-safety doit être settée.

Je tente une compilationd e Slony 2 sur un Postgres 8.4. J'ai bien pris note que seuls la 8.3 est supportée, mais le temps manque et je dois aller de l'avant, donc je tente le coup.

J'exécute donc

./configure  --with-pgconfigdir=/usr/local/pgsql/bin  --enable-thread-safety

En début d'output, je reçois un superbe

configure: WARNING: unrecognized options: --enable-thread-safety

... et en fin de script, un non moins superbe

checking PostgreSQL for enable-thread-safety as required on aix5.3.0.0... no
configure: error: PostgreSQL needs to be compiled with --enable-thread-safety on aix5.3.0.0

Que fais-je donc de faux ?

m.s.
fadace

Hors ligne

#2 13/04/2010 15:05:57

Marc Cousin
Membre

Re : Compilation de Slony 2.0 sous Aix.

De mémoire, enable-thread-safety est une option de compil de postgresql, pas de slony


Marc.

Hors ligne

#3 13/04/2010 15:56:46

fadace
Membre

Re : Compilation de Slony 2.0 sous Aix.

C'est pourtant dans le INSTALL de Slony que je le découvre

[postgres@test01] > pwd
/home/postgres/slony1-2.0.2

[postgres@test01] > ./configure  --with-pgconfigdir=/usr/local/pgsql/bin  --enable-thread-safety
configure: WARNING: unrecognized options: --enable-thread-safety
checking build system type... powerpc-ibm-aix5.3.0.0
checking host system type... powerpc-ibm-aix5.3.0.0
checking which template to use... aix
configure: using CFLAGS=
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for perl... /usr/bin/perl
checking for tar... /usr/bin/tar
checking for flex... no
checking for ,... no
checking for lex... lex
checking for bison... bison -y
checking for sed... sed
checking for the pthreads library -lpthreads... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... -D_THREAD_SAFE
checking for cc_r... gcc
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for inttypes.h... (cached) yes
checking for gettimeofday... yes
checking for dup2... yes
checking for alarm... yes
checking for memset... yes
checking for select... yes
checking for strdup... yes
checking for strerror... yes
checking for strtol... yes
checking for strtoul... yes
checking for int32_t... yes
checking for uint32_t... yes
checking for u_int32_t... yes
checking for int64_t... yes
checking for uint64_t... yes
checking for u_int64_t... yes
checking for ssize_t... yes
checking for POSIX signal interface... yes
checking if you have requested slony1-engine building... yes
checking for pg_config... /usr/local/pgsql/bin/pg_config
pg_config says pg_bindir is /usr/local/pgsql/bin/
pg_config says pg_libdir is /usr/local/pgsql/lib/
pg_config says pg_includedir is /usr/local/pgsql/include/
pg_config says pg_pkglibdir is /usr/local/pgsql/lib/
pg_config says pg_includeserverdir is /usr/local/pgsql/include/server/
checking for correct version of PostgreSQL... 8.4
8.4
pg_config says pg_sharedir is /usr/local/pgsql/share/
checking PostgreSQL for enable-thread-safety as required on aix5.3.0.0... no
configure: error: PostgreSQL needs to be compiled with --enable-thread-safety on aix5.3.0.0

Hors ligne

#4 13/04/2010 16:42:38

Marc Cousin
Membre

Re : Compilation de Slony 2.0 sous Aix.

configure: error: PostgreSQL needs to be compiled with --enable-thread-safety on aix5.3.0.0

PostgreSQL needs to be compiled ? donc PostgreSQL. C'est bien slony qui sort l'erreur, mais pour vous signaler que vous n'avez pas compilé PostgreSQL comme il faut.


Marc.

Hors ligne

#5 15/04/2010 09:13:50

fadace
Membre

Re : Compilation de Slony 2.0 sous Aix.

Saisi...

J'ai recompilé une nouvelle distrib.

J'ai relancé le configure depuis le source Slony, en pointant sur le bon pg_config.

ça avance un peu, jusqu'à un fatidique

gcc -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -D_THREAD_SAFE  -I../..  -I/opt/postgres/include/ -I/opt/postgres/include/server/  -c -o slony1_funcs.o slony1_funcs.c
slony1_funcs.c: In function 'slon_quote_literal':
slony1_funcs.c:1029: warning: pointer targets in passing argument 1 of 'pg_mblen' differ in signedness
../../makefiles/mkldexport.sh slony1_funcs.o > slony1_funcs.exp
/bin/sh: ../../makefiles/mkldexport.sh: 0403-006 Execute permission denied.
gmake[2]: *** [slony1_funcs.exp] Error 126
rm slony1_funcs.exp
gmake[2]: Leaving directory `/home/postgres/slony1-2.0.2/src/backend'
gmake[1]: *** [install] Error 2
gmake[1]: Leaving directory `/home/postgres/slony1-2.0.2/src'
gmake: *** [install] Error 2

Dans le Makefile.aix, je trouve bien un

MKLDEXPORT=$(slony_top_builddir)/makefiles/mkldexport.sh

... mais celui-ci n'a pas les bons droits. Je modifie donc et renvoie

ls -l mkldexport.sh
-rw-r--r--    1 postgres postgres       1404 Aug 19 2004  mkldexport.sh
chmod 744 mkldexport.sh
ls -l mkldexport.sh
xrw-r--r--    1 postgres postgres       1404 Aug 19 2004  mkldexport.sh
cd ..
gmake clean
gmake install

Là, ça avance un bout, puis ça plante sur

...
gmake[2]: Entering directory `/home/postgres/slony1-2.0.2/src/slony_logshipper'
gcc -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -D_THREAD_SAFE  -D_LARGE_FILES -I../.. -DPGSHARE="\"/opt/postgres/share/\""  -I/opt/postgres/include/ -I/opt/postgres/include/server/  -c -o slony_logshipper.o slony_logshipper.c
slony_logshipper.c: In function 'main':
slony_logshipper.c:476: warning: 'destfname.data' may be used uninitialized in this function
slony_logshipper.c:476: note: 'destfname.data' was declared here
gcc -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -D_THREAD_SAFE  -D_LARGE_FILES -I../.. -DPGSHARE="\"/opt/postgres/share/\""  -I/opt/postgres/include/ -I/opt/postgres/include/server/  -c -o dbutil.o dbutil.c
gcc -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -D_THREAD_SAFE  -D_LARGE_FILES -I../.. -DPGSHARE="\"/opt/postgres/share/\""  -I/opt/postgres/include/ -I/opt/postgres/include/server/  -c -o ipcutil.o ipcutil.c
bison -y -d  parser.y
gmake[2]: *** [parser.c] Broken pipe
gmake[2]: Leaving directory `/home/postgres/slony1-2.0.2/src/slony_logshipper'
gmake[1]: *** [install] Error 2
gmake[1]: Leaving directory `/home/postgres/slony1-2.0.2/src'
gmake: *** [install] Error 2

Une idée ? ça ressemble un peu à http://forums.postgresql.fr/viewtopic.p … 4552#p4552 , non ?

Fadace

Dernière modification par fadace (15/04/2010 09:22:06)

Hors ligne

Pied de page des forums