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

  • Mark Round at Feb 22, 2006 at 5:33 pm
    Do you have an older version of PostgreSQL installed ?
    On 2/22/06, Steve Waltner wrote:
    I have been unable to get PostreSQL 8.1.3 to compile on Solaris 9.
  • Steve Waltner at Feb 22, 2006 at 5:52 pm
    Not on this system.

    I successfully compiled version 7.2.1 on a different Solaris 9 system
    back in Nov 2004. I could always copy that installation across.

    I receive the same "main multiply-defined" error when trying to
    compile PostgreSQL 8.0.7 and 8.1.2 on this same system. I'm trying
    7.4.12 now and will also install readline to see if the "./configure
    --without-readline" option is giving me trouble.

    Steve
    On Feb 22, 2006, at 11:33 AM, Mark Round wrote:
    Do you have an older version of PostgreSQL installed ?
    On 2/22/06, Steve Waltner wrote:
    I have been unable to get PostreSQL 8.1.3 to compile on Solaris 9.
  • Steve Waltner at Feb 22, 2006 at 9:06 pm
    I tried the following:

    - Compile PgSQL versions 8.1.2, 8.0.7, 7.4.12 on this new system and
    another similar system
    - Install readline 5.1 and repeat the above
    - "gmake -j 4" on 8 CPU system
    - Compile PgSQL 8.1.3 on the original system I loaded PgSQL onto

    The first three failed, but the last completed successfully. Looking
    further into the failure, I noticed that the build that completed was
    running an old version of GNU make (3.79.1), while the failures
    occurred with GNU make 3.81beta2. We installed the GNU make 3.81beta2
    http://make.paulandlesley.org/make-3.81beta2.tar.bz2 to solve the
    problem of getting "interrupted system call" errors when running
    parallel builds with the source code stored on a NFS server. I
    haven't seen any other software packages fail to build when using
    this GNU make.

    There might be something screwy in the PostgreSQL makefiles though
    since I did notice the following behavior.

    GNU make 3.81beta2 initial build
    ==========================
    [snip]
    gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wendif-
    labels -fno-strict-aliasing -DFRONTEND -I../../../src/bin/pg_dump -
    I../../../src/bin/psql -I../../../src/interfaces/libpq -I../../../src/
    include -I/soft/gnu/readline/5.1/include -c -o createdb.o createdb.c
    [snip]
    gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wendif-
    labels -fno-strict-aliasing -DFRONTEND -I../../../src/bin/pg_dump -
    I../../../src/bin/psql -I../../../src/interfaces/libpq -I../../../src/
    include -I/soft/gnu/readline/5.1/include -L../../../src/port -Wl,-R/
    usr/local/postgresql-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/ccIwnYOH.o type=FUNC; file createdb.o type=FUNC);
    ld: fatal: File processing errors. No output written to createdb
    ==========================

    GNU make 3.81beta2 second build (ie: don't run "gmake clean")
    ==========================
    [snip]
    gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wendif-
    labels -fno-strict-aliasing createdb.o common.o dumputils.o ../../../
    src/backend/parser/keywords.o -L../../../src/port -lpgport -L../../../
    src/interfaces/libpq -lpq -L../../../src/port -Wl,-R/usr/local/
    postgresql-8.1.3/lib -lpgport -lz -lreadline -ltermcap -lrt -lresolv -
    lgen -lsocket -lnsl -ldl -lm -o createdb
    [snip]
    ==========================

    GNU make 3.80 initial build
    ==========================
    [snip]
    gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wendif-
    labels -fno-strict-aliasing -DFRONTEND -I../../../src/bin/pg_dump -
    I../../../src/bin/psql -I../../../src/interfaces/libpq -I../../../src/
    include -I/soft/gnu/readline/5.1/include -c -o createdb.o createdb.c
    [snip]
    gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wendif-
    labels -fno-strict-aliasing createdb.o common.o dumputils.o ../../../
    src/backend/parser/keywords.o -L../../../src/port -lpgport -L../../../
    src/interfaces/libpq -lpq -L../../../src/port -Wl,-R/usr/local/
    postgresql-8.1.3/lib -lpgport -lz -lreadline -ltermcap -lrt -lresolv -
    lgen -lsocket -lnsl -ldl -lm -o createdb
    [snip]
    ==========================

    This problem is not isolated to the createdb command. It happened on
    every single binary in .../src/bin/scripts/. I needed to run the
    build 10 times to make it through this directory when using the
    latest version of GNU make. Note that the initial build of the files
    in .../src/bin/scripts/ that fail all have greatly different syntax
    on the link command than the ones that link properly. When the make
    is run using the released version of GNU make or a when the link is
    reattempted with 3.81beta2, the link arguments are much different.

    I've gotten the software compile, but wanted to make sure people were
    aware of this issue.

    Steve
    On Feb 22, 2006, at 11:52 AM, Steve Waltner wrote:
    Not on this system.

    I successfully compiled version 7.2.1 on a different Solaris 9
    system back in Nov 2004. I could always copy that installation across.

    I receive the same "main multiply-defined" error when trying to
    compile PostgreSQL 8.0.7 and 8.1.2 on this same system. I'm trying
    7.4.12 now and will also install readline to see if the "./
    configure --without-readline" option is giving me trouble.

    Steve
    On Feb 22, 2006, at 11:33 AM, Mark Round wrote:
    Do you have an older version of PostgreSQL installed ?
    On 2/22/06, Steve Waltner wrote:
    I have been unable to get PostreSQL 8.1.3 to compile on Solaris 9.
  • Paul D. Smith at Feb 23, 2006 at 5:19 am
    The beta2 release is many, many months old. We got up to beta4, and are
    now testing rc1.

    Please try the latest pretest:

    ftp://alpha.gnu.org/gnu/make/make-3.81rc1.tar.gz

    If you still have problems NOW is the time to say something, since
    unless we discover show-stoppers I'm going to release 3.81 this coming
    weekend.

    --
    -------------------------------------------------------------------------------
    Paul D. Smith <[email protected]> Find some GNU make tips at:
    http://www.gnu.org http://make.paulandlesley.org
    "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
  • Steve Waltner at Feb 23, 2006 at 5:43 am
    Paul,

    Thanks for the link to the new make source code. I hadn't originally
    found the beta source code on alpha.gnu.org when I downloaded the
    3.81beta2 code back in September, so I didn't think to look there. I
    did check ftp.gnu.org and found out 3.80 was still the official release.

    Upgrading GNU make did the trick. I'm able to compile the PostgreSQL
    source code using a "make -j 8" command on our Sun V490. This
    compilation problem appears to have simply been a bug in GNU Make
    3.81beta2 that was fixed somewhere along the way to 3.81rc1. Thanks
    again for the help.

    Steve
    On Feb 22, 2006, at 11:01 PM, Paul D. Smith wrote:
    The beta2 release is many, many months old. We got up to beta4,
    and are
    now testing rc1.

    Please try the latest pretest:

    ftp://alpha.gnu.org/gnu/make/make-3.81rc1.tar.gz

    If you still have problems NOW is the time to say something, since
    unless we discover show-stoppers I'm going to release 3.81 this coming
    weekend.
  • Paul D. Smith at Feb 23, 2006 at 6:16 am
    %% Steve Waltner writes:

    sw> Thanks for the link to the new make source code. I hadn't
    sw> originally found the beta source code on alpha.gnu.org when I
    sw> downloaded the 3.81beta2 code back in September, so I didn't think
    sw> to look there.

    Yes; there was a problem with the secure uploads to the GNU ftp servers
    (both alpha and ftp) back then so I hosted that beta myself. That
    problem was later fixed, so beta3, beta4, and rc1 have all been hosted
    on alpha.

    sw> Upgrading GNU make did the trick. I'm able to compile the
    sw> PostgreSQL source code using a "make -j 8" command on our Sun
    sw> V490. This compilation problem appears to have simply been a bug
    sw> in GNU Make 3.81beta2 that was fixed somewhere along the way to
    sw> 3.81rc1.

    Good to know!

    Thanks for testing this.

    Cheers!

    --
    -------------------------------------------------------------------------------
    Paul D. Smith <[email protected]> Find some GNU make tips at:
    http://www.gnu.org http://make.paulandlesley.org
    "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
  • Peter Eisentraut at Feb 23, 2006 at 8:04 am

    Steve Waltner wrote:
    occurred with GNU make 3.81beta2. We installed the GNU make 3.81beta2
    http://make.paulandlesley.org/make-3.81beta2.tar.bz2 to solve the
    I can reproduce these failures with that make version, but considering
    that everything before and after that version works, there will be
    little interest in debugging this.

Related Discussions

Discussion Navigation
viewthread | post
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