Thread: Bug #490: Can't compile PostgreSQL 7.1.3 with Solaris 2.6

Bug #490: Can't compile PostgreSQL 7.1.3 with Solaris 2.6

From
pgsql-bugs@postgresql.org
Date:
Holger Mittewald (hrmitter@lsd.franken.de) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
Can't compile PostgreSQL 7.1.3 with Solaris 2.6

Long Description
Trying to compile postgresql under solaris 2.6 configure stops claiming about an unknown symbol "optreset". I wasn't
ableto fix the problem. 

Sample Code
The last lines of config.log:

[..]
configure:7459: checking for optreset
configure:7471: gcc -o conftest      conftest.c -lposix4 -lz -lresolv -lgen -lns
l -lsocket -ldl -lm -lreadline -ltermcap  1>&5
Undefined                       first referenced
 symbol                             in file
optreset                            /var/tmp/ccSZ2P6u.o
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 7464 "configure"
#include "confdefs.h"
#include <unistd.h>
int main() {
extern int optreset; optreset = 1;
; return 0; }
configure:7497: checking test program
configure:7506: gcc -o conftest      conftest.c -lposix4 -lz -lresolv -lgen -lns
l -lsocket -ldl -lm -lreadline -ltermcap  1>&5
configure: failed program was:
#line 7502 "configure"
#include "confdefs.h"
int main() { return 0; }


No file was uploaded with this report

Re: Bug #490: Can't compile PostgreSQL 7.1.3 with Solaris 2.6

From
Tom Lane
Date:
pgsql-bugs@postgresql.org writes:
> Trying to compile postgresql under solaris 2.6 configure stops
> claiming about an unknown symbol "optreset". I wasn't able to fix the
> problem.

You misread it: the log shows that it's the test after the optreset one
that is failing.  That test is just trying to compile and run a trivial
test program.  The only reason I can think of for it to fail is if you
have a problem with the libraries that it's linking.

Without seeing the error message it's impossible to guess more than
that...

            regards, tom lane

Re: Bug #490: Can't compile PostgreSQL 7.1.3 with Solaris 2.6

From
Tom Lane
Date:
"Holger Mitterwald" <hrmitter@lsd.franken.de> writes:
> Ok, next try. I set LD_LIBRARY_PATH to /usr/local/lib.
> Then the configure run clean.

> Funny thing about that is that it DID find the related librarys
> (libreadline etc.) earlier but failed on the test.

Not a big surprise: ld doesn't pay attention to LD_LIBRARY_PATH (on
most platforms), but the dynamic loader does.

> Now I can compile postgresql, but this behavior still confuses me. With 7.0
> I still can configure and compile postgresql without setting
> LD_LIBRARY_PATH.

Hmm.  It sounds like we formerly set rpath in the executables on your
platform, and don't anymore.  Could you compare the makefiles between
7.0 and 7.1 and see what's changed?

            regards, tom lane