Skip site navigation (1) Skip section navigation (2)

Re: Undefined symbols in pgsql libraries using Solaris 2.8/Sparc

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Oyvind Hallsteinsen <oyvindh(at)idb(dot)hist(dot)no>
Cc: <pgsql-ports(at)postgresql(dot)org>
Subject: Re: Undefined symbols in pgsql libraries using Solaris 2.8/Sparc
Date: 2001-07-14 23:27:56
Message-ID: Pine.LNX.4.30.0107150058330.818-100000@peter.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-ports
Oyvind Hallsteinsen writes:

> I've been trying to install PostgreSQL 7.1.2 on machine running Solaris
> 8 4/01 Sparc using GCC 3.95.3, GNU ld 2.11.2 and GNU make 3.79.1.

> Building pgsql 7.1.2 on the solaris/sparc computer:
> % export LD_LIBRARY_PATH=/usr/local/lib;


> % ./configure --prefix=/www/local/pgsql
> % make
> % make install

> However, when httpd tries to load it dies with the following
> error:
> -----------------------------------------
> bash-2.05# /www/bin/apachectl start
> Syntax error on line 205 of /www/conf/httpd.conf:
> Cannot load /www/libexec/ into server:
> /www/bin/httpd: fatal: relocation error: file /usr/lib/
> symbol main: referenced symbol not found
> /www/bin/apachectl start: httpd could not be started
> -----------------------------------------

Hard to know why libpq wants to have a main symbol.  Looks like a linker

> Even worse:
> -----------------------------------------
> bash-2.05# ldd -r /www/local/pgsql/lib/
> =>     /usr/lib/
> =>     /usr/lib/
> =>    /usr/lib/
>         /usr/platform/SUNW,Ultra-5_10/lib/
>         symbol not found: main
> (/www/local/pgsql/lib/
>         symbol not found: namein
> (/www/local/pgsql/lib/
>         symbol not found: textout
> (/www/local/pgsql/lib/

This is not surprising, those symbols are supposed to be resolved at run

> I also tried compiling PostgreSQL 7.0.3. I now had no trouble with
> libpq, and thus was able to load httpd.

In 7.0.3 you would have gotten your shared libraries linked by Sun's ld,
so the GNU linker would evidently be to blame here.  It could be that the
GCC installation doesn't pass the right flags, or that the linker is
simply broken on Solaris (wouldn't be the first time).

Try and see what GCC does (gcc -v, methinks) and/or try to invoke the
linker by hand.  Or install GCC to use Sun's linker.

Peter Eisentraut   peter_e(at)gmx(dot)net

In response to

pgsql-ports by date

Next:From: Kovács PéterDate: 2001-07-16 19:24:39
Subject: Unable to build on Solaris 2.6
Previous:From: Andre SchnabelDate: 2001-07-14 10:16:26
Subject: Re: Compilation on Solaris 2.8

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group