Thread: postgresql 7.2b4 compile problems
I've been trying to compile the newest 7.2 beta for the past couple of days and its been throwing an odd error and I'm uncertain what exactly its looking for.
I'm compiling it on an e-smith gateway with the following options: ./configure --prefix=/usr --with-pam --enable-multibyte --enable-recode --enable-locale --with-maxbackends=64 --with-perl --enable-syslog
as well this is what postgres is outputing on error exit:
make[4]: Leaving directory `/usr/src/postgresql-7.2b4/src/interfaces/libpq'
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o pg_dump.o pg_dump.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o common.o common.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o pg_backup_archiver.o pg_backup_archiver.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o pg_backup_db.o pg_backup_db.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o pg_backup_custom.o pg_backup_custom.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o pg_backup_files.o pg_backup_files.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o pg_backup_null.o pg_backup_null.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o pg_backup_tar.o pg_backup_tar.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations pg_dump.o common.o pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o pg_backup_files.o pg_backup_null.o pg_backup_tar.o -L../../../src/interfaces/libpq -lpq -Wl,-rpath,/usr/lib -lpam -lcrypt -lresolv -lnsl -ldl -lm -lbsd -lhistory -o pg_dump
../../../src/interfaces/libpq/libpq.so: undefined reference to `atexit'
collect2: ld returned 1 exit status
make[3]: *** [pg_dump] Error 1
make[3]: Leaving directory `/usr/src/postgresql-7.2b4/src/bin/pg_dump'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/postgresql-7.2b4/src/bin'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/postgresql-7.2b4/src'
make: *** [all] Error 2
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o pg_dump.o pg_dump.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o common.o common.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o pg_backup_archiver.o pg_backup_archiver.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o pg_backup_db.o pg_backup_db.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o pg_backup_custom.o pg_backup_custom.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o pg_backup_files.o pg_backup_files.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o pg_backup_null.o pg_backup_null.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include -c -o pg_backup_tar.o pg_backup_tar.c
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations pg_dump.o common.o pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o pg_backup_files.o pg_backup_null.o pg_backup_tar.o -L../../../src/interfaces/libpq -lpq -Wl,-rpath,/usr/lib -lpam -lcrypt -lresolv -lnsl -ldl -lm -lbsd -lhistory -o pg_dump
../../../src/interfaces/libpq/libpq.so: undefined reference to `atexit'
collect2: ld returned 1 exit status
make[3]: *** [pg_dump] Error 1
make[3]: Leaving directory `/usr/src/postgresql-7.2b4/src/bin/pg_dump'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/postgresql-7.2b4/src/bin'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/postgresql-7.2b4/src'
make: *** [all] Error 2
is this a bug or am I missing something?
Mike
"mike" <matrix@vianet.ca> writes: > gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations pg_dump.o common.= > o pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o pg_backup_files.o = > pg_backup_null.o pg_backup_tar.o -L../../../src/interfaces/libpq -lpq -Wl,= > -rpath,/usr/lib -lpam -lcrypt -lresolv -lnsl -ldl -lm -lbsd -lhistory -o p= > g_dump > ../../../src/interfaces/libpq/libpq.so: undefined reference to `atexit' [scratches head...] As far as I can see, there's only one use of atexit() in the 7.2 sources, and that's in psql not pg_dump. More to the point, it won't get compiled unless configure found that atexit() is indeed available from your system's C library. Is HAVE_ATEXIT defined in your src/include/pg_config.h? regards, tom lane
this is how it apreas in my src/include/pg_config.h /* Define if you have atexit() */ /* #undef HAVE_ATEXIT */ I've uncommented this and, and even changed it to #define, but I still come up w/ the same error msg. ----- Original Message ----- From: "Tom Lane" <tgl@sss.pgh.pa.us> To: "mike" <matrix@vianet.ca> Cc: "PostgreSQL Mailing Lists-General" <pgsql-general@postgresql.org> Sent: Saturday, December 15, 2001 12:38 PM Subject: Re: [GENERAL] postgresql 7.2b4 compile problems > "mike" <matrix@vianet.ca> writes: > > gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations pg_dump.o common.= > > o pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o pg_backup_files.o = > > pg_backup_null.o g_backup_tar.o -L../../../src/interfaces/libpq -lpq -Wl,= > -rpath,/usr/lib -lpam -lcrypt -lresolv -lnsl -ldl -lm -lbsd -lhistory -o p= > > g_dump > > ../../../src/interfaces/libpq/libpq.so: undefined reference to `atexit' > > [scratches head...] As far as I can see, there's only one use of > atexit() in the 7.2 sources, and that's in psql not pg_dump. More > to the point, it won't get compiled unless configure found that atexit() > is indeed available from your system's C library. Is HAVE_ATEXIT > defined in your src/include/pg_config.h? > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster >
[2001-12-16 13:49] mike said: | this is how it apreas in my src/include/pg_config.h | | /* Define if you have atexit() */ | /* #undef HAVE_ATEXIT */ | | I've uncommented this and, and even changed it to #define, but I still come | up w/ the same error msg. After undef'ing the HAVE_ATEXIT, I'd recommend 'make clean && make' to ensure that you don't have any object files lying around that have been compiled with the atexit() symbol in them. hth. brent -- "Develop your talent, man, and leave the world something. Records are really gifts from people. To think that an artist would love you enough to share his music with anyone is a beautiful thing." -- Duane Allman