Thread: Re: PostgreSQL 9.0alpha4: openSolaris 10 x86 snv_134: configure issues: C compiler cannot create executables

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
There is my answer. I hope that it helps:

You use own tools in /usr/local like grep and so on. But all these tools
are already on the system in /usr/gnu/bin directory. Most of them are
patched for better integration with solaris. Use own compiled version is
risky and IIRC only gmake is what you really need for build. All other
original Solaris tools works fine.

I run buildfarm on Solaris snv and it works fine. You can see
configuration here:

http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=luna_moth&dt=2010-03-26%2022:06:00

    Zdenek


Lou Picciano píše v pá 26. 03. 2010 v 19:41 +0000:
> 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
>