Solaris compiler setup ?

David Holmes david.holmes at oracle.com
Thu Aug 9 03:46:51 PDT 2012


On 9/08/2012 6:24 PM, Erik Joelsson wrote:
> I'm not managing to reproduce this even after removing access to all my
> gccs on the system.

And I just realized that I have a gcc available anyway!

> configure:10129: checking whether CC accepts -g
> configure:10149: CC -c -g conftest.cpp >&5
> configure:10149: $? = 0
> configure:10190: result: yes
> configure:10346: checking for gcc
> configure:10376: result: no
> configure:10346: checking for objcc
> configure:10376: result: no
> configure:10346: checking for objc
> configure:10376: result: no
>
> Exactly what version of the script are you running? (repo, change etc)

Repo is tagged at jdk8-b50. It's a jdk8 clone. No changes. But looking 
at the output again:

checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
`tty`: Ambiguous
checking for cl... no
checking for CC... CC
checking whether we are using the GNU C++ compiler... no
checking whether CC accepts -g... yes
`tty`: Ambiguous
configure: error: Could not find the needed compilers!

I'm suspicious about the

`tty`: Ambiguous

lines. I'm wondering if they are messing up the attempts to parse the 
command output?

How to debug this? I ran configure with sh -x, but it then execs bash 
without -x :(

Aside: on my solaris box configure runs horrendously slow too :(

Thanks,
David

> /Erik
>
> On 2012-08-09 09:58, Erik Joelsson wrote:
>> Comparing your log to mine, this is what happens:
>>
>> configure:10112: checking whether CC accepts -g
>> configure:10132: CC -c -g conftest.cpp >&5
>> configure:10132: $? = 0
>> configure:10173: result: yes
>> configure:10329: checking for gcc
>> configure:10345: found /usr/local/bin/gcc
>> configure:10356: result: gcc
>> configure:10381: checking for Objective C compiler version
>> configure:10390: gcc --version >&5
>> gcc (GCC) 3.4.6
>> Copyright (C) 2006 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions. There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>> PURPOSE.
>>
>>
>> So for some reason, autoconf wants to find gcc too and on my system it
>> happens to be there. I will look into it.
>>
>> /Erik
>>
>> On 2012-08-09 06:39, David Holmes wrote:
>>> When I run configure on Solaris it can't find the "needed compilers".
>>>
>>> checking if this is a cross compile... no
>>> checking for cl... no
>>> checking for cc... cc
>>> checking whether the C compiler works... yes
>>> checking for C compiler default output file name... a.out
>>> checking for suffix of executables...
>>> checking whether we are cross compiling... no
>>> checking for suffix of object files... o
>>> checking whether we are using the GNU C compiler... no
>>> checking whether cc accepts -g... yes
>>> checking for cc option to accept ISO C89... none needed
>>> `tty`: Ambiguous
>>> checking for cl... no
>>> checking for CC... CC
>>> checking whether we are using the GNU C++ compiler... no
>>> checking whether CC accepts -g... yes
>>> `tty`: Ambiguous
>>> configure: error: Could not find the needed compilers!
>>>
>>> It finds CC, which is in my path at:
>>>
>>> /java/devtools/i386/SUNWspro/SS12u1/bin/CC
>>>
>>> What is it looking for? config.log shows:
>>>
>>> configure:10084: checking whether we are using the GNU C++ compiler
>>> configure:10103: CC -c conftest.cpp >&5
>>> "conftest.cpp", line 14: Error: choke is not defined.
>>> 1 Error(s) detected.
>>> configure:10103: $? = 1
>>> configure: failed program was:
>>> | /* confdefs.h */
>>> | #define PACKAGE_NAME "openjdk"
>>> | #define PACKAGE_TARNAME "openjdk"
>>> | #define PACKAGE_VERSION "jdk8"
>>> | #define PACKAGE_STRING "openjdk jdk8"
>>> | #define PACKAGE_BUGREPORT "build-dev at openjdk.java.net"
>>> | #define PACKAGE_URL ""
>>> | /* end confdefs.h. */
>>> |
>>> | int
>>> | main ()
>>> | {
>>> | #ifndef __GNUC__
>>> | choke me
>>> | #endif
>>> |
>>> | ;
>>> | return 0;
>>> | }
>>> configure:10112: result: no
>>> configure:10121: checking whether CC accepts -g
>>> configure:10141: CC -c -g conftest.cpp >&5
>>> configure:10141: $? = 0
>>> configure:10182: result: yes
>>> configure:10280: error: Could not find the needed compilers!
>>>
>>> ??
>>>
>>> Thanks,
>>> David



More information about the build-infra-dev mailing list