Solaris 9 and PgSQL 8.1.3 - createdb Link Fails

Поиск
Список
Период
Сортировка
От Steve Waltner
Тема Solaris 9 and PgSQL 8.1.3 - createdb Link Fails
Дата
Msg-id ABCBEC54-6018-4FCE-9618-087D7F11D6C8@engenio.com
обсуждение исходный текст
Ответы Re: Solaris 9 and PgSQL 8.1.3 - createdb Link Fails  ("Mark Round" <mark.round@gmail.com>)
Список pgsql-ports
I have been unable to get PostreSQL 8.1.3 to compile on Solaris 9.
Thinking this might be a problem with the compile, I have tried GCC
3.3, GCC 3.4.3, and Sun Workshop Compiler 5.0. All three error while
trying to link the createdb binary. I'm configuring GCC builds using:

    ./configure --prefix=/usr/local/postgres-8.1.3 --without-readline

and Sun Workshop builds using:

    ./configure CC=/opt/SUNWspro/bin/cc --prefix=/usr/local/
postgres-8.1.3 --without-readline

A GCC build yields the following errors....

==========
gmake[4]: Entering directory `/home/swaltner/postgresql-8.1.3/src/
backend/parser'
gmake[4]: `keywords.o' is up to date.
gmake[4]: Leaving directory `/home/swaltner/postgresql-8.1.3/src/
backend/parser'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -
Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -
DFRONTEND -I../../../src/bin/pg_dump -I../../../src/bin/psql -
I../../../src/interfaces/libpq -I../../../src/include   -c -o
createdb.o createdb.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -
Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -
DFRONTEND -I../../../src/bin/pg_dump -I../../../src/bin/psql -
I../../../src/interfaces/libpq -I../../../src/include   -c -o
common.o common.c
rm -f dumputils.c && ln -s ../../../src/bin/pg_dump/dumputils.c .
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -
Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -
DFRONTEND -I../../../src/bin/pg_dump -I../../../src/bin/psql -
I../../../src/interfaces/libpq -I../../../src/include   -c -o
dumputils.o dumputils.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -
Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -
DFRONTEND -I../../../src/bin/pg_dump -I../../../src/bin/psql -
I../../../src/interfaces/libpq -I../../../src/include  -L../../../src/
port  -Wl,-R/usr/local/postgres-8.1.3/lib  createdb.c createdb.o
common.o dumputils.o ../../../src/backend/parser/keywords.o   -o
createdb
ld: fatal: symbol `main' is multiply-defined:
         (file /tmp/ccZR65J8.o type=FUNC; file createdb.o type=FUNC);
ld: fatal: File processing errors. No output written to createdb
collect2: ld returned 1 exit status
gmake[3]: *** [createdb] Error 1
gmake[3]: Leaving directory `/home/swaltner/postgresql-8.1.3/src/bin/
scripts'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/swaltner/postgresql-8.1.3/src/bin'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/home/swaltner/postgresql-8.1.3/src'
gmake: *** [all] Error 2
hyperion:~/postgresql-8.1.3>
==========

Sun Workshop builds yield the following:

==========
gmake[4]: Entering directory `/home/swaltner/postgresql-8.1.3/src/
backend/parser'
gmake[4]: `keywords.o' is up to date.
gmake[4]: Leaving directory `/home/swaltner/postgresql-8.1.3/src/
backend/parser'
/opt/SUNWspro/bin/cc -Xa -v -DSUNOS4_CC -O -DFRONTEND -I../../../src/
bin/pg_dump -I../../../src/bin/psql -I../../../src/interfaces/libpq -
I../../../src/include   -c -o createdb.o createdb.c
"createdb.c", line 212: warning: Function has no return statement : main
/opt/SUNWspro/bin/cc -Xa -v -DSUNOS4_CC -O -DFRONTEND -I../../../src/
bin/pg_dump -I../../../src/bin/psql -I../../../src/interfaces/libpq -
I../../../src/include   -c -o common.o common.c
rm -f dumputils.c && ln -s ../../../src/bin/pg_dump/dumputils.c .
/opt/SUNWspro/bin/cc -Xa -v -DSUNOS4_CC -O -DFRONTEND -I../../../src/
bin/pg_dump -I../../../src/bin/psql -I../../../src/interfaces/libpq -
I../../../src/include   -c -o dumputils.o dumputils.c
/opt/SUNWspro/bin/cc -Xa -v -DSUNOS4_CC -O -DFRONTEND -I../../../src/
bin/pg_dump -I../../../src/bin/psql -I../../../src/interfaces/libpq -
I../../../src/include  -L../../../src/port  -Wl,-R/usr/local/
postgres-8.1.3/lib  createdb.c createdb.o common.o
dumputils.o ../../../src/backend/parser/keywords.o   -o createdb
"createdb.c", line 212: warning: Function has no return statement : main
Undefined                       first referenced
symbol                             in file
appendPQExpBuffer                   createdb.o
PQresultStatus                      createdb.o
PQerrorMessage                      createdb.o
initPQExpBuffer                     createdb.o
destroyPQExpBuffer                  dumputils.o
PQexec                              createdb.o
PQclear                             createdb.o
pg_char_to_encoding                 createdb.o
appendPQExpBufferChar               dumputils.o
PQfinish                            createdb.o
resetPQExpBuffer                    dumputils.o
getopt_long                         createdb.o
PQstatus                            common.o
set_pglocale_pgservice              createdb.o
simple_prompt                       common.o
createPQExpBuffer                   dumputils.o
printfPQExpBuffer                   createdb.o
appendPQExpBufferStr                dumputils.o
PQsetdbLogin                        common.o
get_progname                        createdb.o
ld: fatal: Symbol referencing errors. No output written to createdb
gmake[3]: *** [createdb] Error 1
gmake[3]: Leaving directory `/home/swaltner/postgresql-8.1.3/src/bin/
scripts'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/swaltner/postgresql-8.1.3/src/bin'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/home/swaltner/postgresql-8.1.3/src'
gmake: *** [all] Error 2
252.93u 44.02s 6:09.17 80.4%
hyperion:~/postgresql-8.1.3>
==========

I've done several searches to try and find info about this, but the
only hits on createdb that I find are related to using it, not
getting it to build. I'll try downloading an older release of
PostgreSQL to see if that changes the behavior. Any suggestions would
be greatly appreciated.

В списке pgsql-ports по дате отправления:

Предыдущее
От: Poul Jensen
Дата:
Сообщение: Re: Failed install - libgen.so doesn't exist
Следующее
От: Steve Waltner
Дата:
Сообщение: Re: Solaris 9 and PgSQL 8.1.3 - createdb Link Fails