Re: PostgreSQL 9.0alpha4: openSolaris 10 x86 snv_134: configure issues: C compiler cannot create executables - Mailing list pgsql-testers

From Lou Picciano
Subject Re: PostgreSQL 9.0alpha4: openSolaris 10 x86 snv_134: configure issues: C compiler cannot create executables
Date
Msg-id 925541093.6517701269632468920.JavaMail.root@sz0093a.westchester.pa.mail.comcast.net
Whole thread Raw
Responses Re: PostgreSQL 9.0alpha4: openSolaris 10 x86 snv_134: configure issues: C compiler cannot create executables
List pgsql-testers
Josh,

Many thanks for getting back.  Some new information to add to the mix:

Imagine, if you will, that our openSolaris 10 x86 snv_134 is a very 'standard' install of the OS.

On top of it, we've added key packages from Steve Christensen's SunFreeware - into /usr/local - 
and then favored those applications/libraries within the environment with:

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin

This brought us to my last email: C compiler cannot create executables.

Stubbornly (and granted, academically at this point), we've been trying to find what tools may be missing, and have installed a few which may be needed - to achieve the build without SunStudio.  All the usual suspects are there in /usr/local/bin: grep, ar, awk, gcc, sed, readline, perl - and ld.  What other(s) may we be missing?

Still, could not get a successful compile.

 - I did install SunStudio12u1 and, (you know where this is headed!)

PostgreSQL configures and builds beautifully!  So, is it safe to assume configure is 'finding' one or more tools outside of /usr/local?  Probably...?

...strangely, though, configure still reports it's using Solaris ld, even though --with-gnu-ld has been specified:

checking for ld used by GCC... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no

- - - - But now, to make things a bit more complicated: The real point to the whole exercise:

Is to build and run PostgreSQL inside an open Solaris ipkg-branded zone.  To effect this test, a simple zone has been set up with /usr/local as a loopback (lofs) device.  Of course, this zone doesn't 'see' anything in the /opt path.

As in the root zone, configure starts to fail at about line 3316:

configure:3316: gcc    conftest.c  >&5
ld: fatal: file values-Xa.o: open failed: No such file or directory
ld: fatal: file processing errors. No output written to a.out
collect2: ld returned 1 exit status

suggesting to me that I've got one or two utilities missing.  I'll have to develop my script reading skills to deconstruct this; meanwhile...  Hoping Zdenek or Bjorn will have an idea.  Wonder if there's a way to direct configure to gnu-ld directly?

Yes, a very long email - but hopefully this will be useful to others moving down the same road...

Regards,  Lou Picciano

---
Subject: Re: [TESTERS] PostgreSQL 9.0alpha4: openSolaris 10 x86 snv_134: configure issues: C compiler cannot create executables

On 3/26/10 7:18 AM, Lou Picciano wrote:
> Or is using SunStudio a must on openSolaris?

In my experience?  Yes.

However, cc'ing Zdenek and Bjorn who have way more Solaris-compile-fu
than me.

                                  -- Josh Berkus
                                     PostgreSQL Experts Inc.
                                     http://www.pgexperts.com

pgsql-testers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: PostgreSQL 9.0alpha4: openSolaris 10 x86 snv_134: configure issues: C compiler cannot create executables
Next
From: Josh Berkus
Date:
Subject: [Fwd: Re: [Fwd: PostgreSQL 9.0alpha4: openSolaris 10 x86 snv_134: configure issues: C compiler cannot create executables]]