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.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 8 | next ›
Discussion Overview
grouppgsql-ports @
categoriespostgresql
postedFeb 22, '06 at 5:25p
activeFeb 23, '06 at 8:04a
posts8
users5
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2023 Grokbase