You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Rainer Jung <ra...@kippdata.de> on 2013/06/20 17:52:36 UTC

1.8.0 build problem on Solaris Sparc using gcc

1.8.0 calls gcc with -std=c90. For my Solaris 10 Sparc using gcc 4.7.2
this leads to "_STRICT_STDC" getting defined and then limits.h no longer
defines PATH_MAX. So apr.h bombs out during compile with:

#error no decision has been made on APR_PATH_MAX for your platform

Adding e.g. "EXTRA_CPPFLAGS = -D__EXTENSIONS__" fixes on my platform.

gcc manual as I understand it says -std=c90 and -std=c89 are the same
and both are equivalent to -ansi. Was that intended as a new flag for 1.8.0?

The flag is set by SVN_CC_MODE_SETUP in build/ac-macros/compiler.m4 and
passes along into CMODEFLAGS in the Makefile.

On Solaris that means "turn off any non c90 features". If you want all
of the c90 compatible extensions on top of c90, then you need to define
__EXTENSIONS__.

Regards,

Rainer

Re: 1.8.0 build problem on Solaris Sparc using gcc

Posted by Branko Čibej <br...@wandisco.com>.
On 20.06.2013 23:17, Rainer Jung wrote:
> On 20.06.2013 22:38, Branko Čibej wrote:
>> On 20.06.2013 22:30, Branko Čibej wrote:
>>> On 20.06.2013 17:52, Rainer Jung wrote:
>>>> 1.8.0 calls gcc with -std=c90. For my Solaris 10 Sparc using gcc 4.7.2
>>>> this leads to "_STRICT_STDC" getting defined and then limits.h no longer
>>>> defines PATH_MAX. So apr.h bombs out during compile with:
>>>>
>>>> #error no decision has been made on APR_PATH_MAX for your platform
>>>>
>>>> Adding e.g. "EXTRA_CPPFLAGS = -D__EXTENSIONS__" fixes on my platform.
>>>>
>>>> gcc manual as I understand it says -std=c90 and -std=c89 are the same
>>>> and both are equivalent to -ansi. Was that intended as a new flag for 1.8.0?
>>> The intended flag was -std=c90, yes.
>>> You should be able to use just plain CFLAGS= instead of EXTRA_CPPFLAGS=,
>>> the problem with initial CFLAGS being overriden should have been fixed.
>>>
>>>> The flag is set by SVN_CC_MODE_SETUP in build/ac-macros/compiler.m4 and
>>>> passes along into CMODEFLAGS in the Makefile.
>>> Yup.
>>>
>>>> On Solaris that means "turn off any non c90 features". If you want all
>>>> of the c90 compatible extensions on top of c90, then you need to define
>>>> __EXTENSIONS__.
>>> Could you provide a patch that does that? I expect the best place would
>>> be in the SVN_CC_MODE_SETUP macro in compiler.m4.
>> By the way, I wouldn't be surprised if this was a problem on HP-UX and
>> AIX as well; from what I recall, they used to show similar behaviour.
>> Unfortunately I don't have access to any of these platforms to test on.
> I could bake something Solaris specific, which would be defining
> "__EXTENSIONS__" or something more POSIX like which also works here,
> namely defining "_POSIX_SOURCE". Unfortunately I've got not idea to
> which platforms in addition to Solaris I should apply "_POSIX_SOURCE".
>
> Not the best starting point for a good patch.

I'd be comfortable with having a case statement that just adds
_POSIX_SOURCE on Solaris for now. The point is that I can't test on
Solaris -- or something like that would already be in compiler.m4.

Adding similar changes for other platforms will simply have to wait for
bug reports from people using those platforms.

-- Brane


-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com

Re: 1.8.0 build problem on Solaris Sparc using gcc

Posted by Rainer Jung <ra...@kippdata.de>.
On 20.06.2013 22:38, Branko Čibej wrote:
> On 20.06.2013 22:30, Branko Čibej wrote:
>> On 20.06.2013 17:52, Rainer Jung wrote:
>>> 1.8.0 calls gcc with -std=c90. For my Solaris 10 Sparc using gcc 4.7.2
>>> this leads to "_STRICT_STDC" getting defined and then limits.h no longer
>>> defines PATH_MAX. So apr.h bombs out during compile with:
>>>
>>> #error no decision has been made on APR_PATH_MAX for your platform
>>>
>>> Adding e.g. "EXTRA_CPPFLAGS = -D__EXTENSIONS__" fixes on my platform.
>>>
>>> gcc manual as I understand it says -std=c90 and -std=c89 are the same
>>> and both are equivalent to -ansi. Was that intended as a new flag for 1.8.0?
>> The intended flag was -std=c90, yes.
>> You should be able to use just plain CFLAGS= instead of EXTRA_CPPFLAGS=,
>> the problem with initial CFLAGS being overriden should have been fixed.
>>
>>> The flag is set by SVN_CC_MODE_SETUP in build/ac-macros/compiler.m4 and
>>> passes along into CMODEFLAGS in the Makefile.
>> Yup.
>>
>>> On Solaris that means "turn off any non c90 features". If you want all
>>> of the c90 compatible extensions on top of c90, then you need to define
>>> __EXTENSIONS__.
>> Could you provide a patch that does that? I expect the best place would
>> be in the SVN_CC_MODE_SETUP macro in compiler.m4.
> 
> By the way, I wouldn't be surprised if this was a problem on HP-UX and
> AIX as well; from what I recall, they used to show similar behaviour.
> Unfortunately I don't have access to any of these platforms to test on.

I could bake something Solaris specific, which would be defining
"__EXTENSIONS__" or something more POSIX like which also works here,
namely defining "_POSIX_SOURCE". Unfortunately I've got not idea to
which platforms in addition to Solaris I should apply "_POSIX_SOURCE".

Not the best starting point for a good patch.

Regards,

Rainer



Re: 1.8.0 build problem on Solaris Sparc using gcc

Posted by Trent Nelson <tr...@snakebite.org>.
On Thu, Jun 20, 2013 at 01:38:11PM -0700, Branko Čibej wrote:
> On 20.06.2013 22:30, Branko Čibej wrote:
> > On 20.06.2013 17:52, Rainer Jung wrote:
> >> 1.8.0 calls gcc with -std=c90. For my Solaris 10 Sparc using gcc 4.7.2
> >> this leads to "_STRICT_STDC" getting defined and then limits.h no longer
> >> defines PATH_MAX. So apr.h bombs out during compile with:
> >>
> >> #error no decision has been made on APR_PATH_MAX for your platform
> >>
> >> Adding e.g. "EXTRA_CPPFLAGS = -D__EXTENSIONS__" fixes on my platform.
> >>
> >> gcc manual as I understand it says -std=c90 and -std=c89 are the same
> >> and both are equivalent to -ansi. Was that intended as a new flag for 1.8.0?
> > The intended flag was -std=c90, yes.
> > You should be able to use just plain CFLAGS= instead of EXTRA_CPPFLAGS=,
> > the problem with initial CFLAGS being overriden should have been fixed.
> >
> >> The flag is set by SVN_CC_MODE_SETUP in build/ac-macros/compiler.m4 and
> >> passes along into CMODEFLAGS in the Makefile.
> > Yup.
> >
> >> On Solaris that means "turn off any non c90 features". If you want all
> >> of the c90 compatible extensions on top of c90, then you need to define
> >> __EXTENSIONS__.
> > Could you provide a patch that does that? I expect the best place would
> > be in the SVN_CC_MODE_SETUP macro in compiler.m4.
> 
> By the way, I wouldn't be surprised if this was a problem on HP-UX and
> AIX as well; from what I recall, they used to show similar behaviour.
> Unfortunately I don't have access to any of these platforms to test on.

    Send me your ssh keys and I'll set up Snakebite access for you :-)
    (That goes for any other committers that want access.)

    Current platforms available:

% ./sb
Logged you in from 124.169.107.163.
+------------------------------------------------------------------+
|                         Available Hosts                          |
|               (Last Update: 2013-06-17 13:19:38Z)                |
+------------------------------------------------------------------+
| Alias |      OS     |   Arch   |     CPUs     | RAM  | Compilers |
+-------|-------------|----------|--------------|------|-----------+
|     a7|AIX 7.1      | PowerPC  |    2 @ 1.4GHz|   8GB|xlc121     |
|     h2|HP-UX 11iv2  | PA-RISC  |    2 @ 875MHz|   8GB|hpacc0395  |
|     h3|HP-UX 11iv3  | Itanium2 |    4 @ 1.3GHz|  64GB|hpacc0626  |
|     i6|IRIX 6.5.30  |   MIPS   |    4 @ 500MHz|   4GB|gcc34      |
|    s10|Solaris 10   |  SPARC   |    2 @ 1.2GHz|   8GB|suncc123   |
|    s11|Solaris 11   |   x64    |    2 @ 2.4GHz|  16GB|suncc123   |
|     s9|Solaris 9    |  SPARC   |    2 @ 900MHz|   8GB|suncc123   |
|     t5|Tru64 5.1B   |  Alpha   |    4 @ 667MHz|   7GB|cc65       |
+------------------------------------------------------------------+
Enter alias (^C to exit): 

    Doesn't get more exotic than that!  (www.snakebite.net for more
    info.)

        Trent.

Re: 1.8.0 build problem on Solaris Sparc using gcc

Posted by Branko Čibej <br...@wandisco.com>.
On 20.06.2013 22:30, Branko Čibej wrote:
> On 20.06.2013 17:52, Rainer Jung wrote:
>> 1.8.0 calls gcc with -std=c90. For my Solaris 10 Sparc using gcc 4.7.2
>> this leads to "_STRICT_STDC" getting defined and then limits.h no longer
>> defines PATH_MAX. So apr.h bombs out during compile with:
>>
>> #error no decision has been made on APR_PATH_MAX for your platform
>>
>> Adding e.g. "EXTRA_CPPFLAGS = -D__EXTENSIONS__" fixes on my platform.
>>
>> gcc manual as I understand it says -std=c90 and -std=c89 are the same
>> and both are equivalent to -ansi. Was that intended as a new flag for 1.8.0?
> The intended flag was -std=c90, yes.
> You should be able to use just plain CFLAGS= instead of EXTRA_CPPFLAGS=,
> the problem with initial CFLAGS being overriden should have been fixed.
>
>> The flag is set by SVN_CC_MODE_SETUP in build/ac-macros/compiler.m4 and
>> passes along into CMODEFLAGS in the Makefile.
> Yup.
>
>> On Solaris that means "turn off any non c90 features". If you want all
>> of the c90 compatible extensions on top of c90, then you need to define
>> __EXTENSIONS__.
> Could you provide a patch that does that? I expect the best place would
> be in the SVN_CC_MODE_SETUP macro in compiler.m4.

By the way, I wouldn't be surprised if this was a problem on HP-UX and
AIX as well; from what I recall, they used to show similar behaviour.
Unfortunately I don't have access to any of these platforms to test on.

-- Brane


-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com

Re: 1.8.0 build problem on Solaris Sparc using gcc

Posted by Branko Čibej <br...@wandisco.com>.
On 20.06.2013 17:52, Rainer Jung wrote:
> 1.8.0 calls gcc with -std=c90. For my Solaris 10 Sparc using gcc 4.7.2
> this leads to "_STRICT_STDC" getting defined and then limits.h no longer
> defines PATH_MAX. So apr.h bombs out during compile with:
>
> #error no decision has been made on APR_PATH_MAX for your platform
>
> Adding e.g. "EXTRA_CPPFLAGS = -D__EXTENSIONS__" fixes on my platform.
>
> gcc manual as I understand it says -std=c90 and -std=c89 are the same
> and both are equivalent to -ansi. Was that intended as a new flag for 1.8.0?

The intended flag was -std=c90, yes.
You should be able to use just plain CFLAGS= instead of EXTRA_CPPFLAGS=,
the problem with initial CFLAGS being overriden should have been fixed.

> The flag is set by SVN_CC_MODE_SETUP in build/ac-macros/compiler.m4 and
> passes along into CMODEFLAGS in the Makefile.

Yup.

> On Solaris that means "turn off any non c90 features". If you want all
> of the c90 compatible extensions on top of c90, then you need to define
> __EXTENSIONS__.

Could you provide a patch that does that? I expect the best place would
be in the SVN_CC_MODE_SETUP macro in compiler.m4.

-- Brane


-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com

Re: 1.8.0 build problem on Solaris Sparc using gcc

Posted by Alexander Thomas <al...@collab.net>.
On Thursday 20 June 2013 09:22 PM, Rainer Jung wrote:
> 1.8.0 calls gcc with -std=c90. For my Solaris 10 Sparc using gcc 4.7.2
> this leads to "_STRICT_STDC" getting defined and then limits.h no longer
> defines PATH_MAX. So apr.h bombs out during compile with:
> 
> #error no decision has been made on APR_PATH_MAX for your platform
> 

I had the same problem in Solaris SPARC with gcc 3.4.6, which I fixed
with "-DPATH_MAX=1024".

> Adding e.g. "EXTRA_CPPFLAGS = -D__EXTENSIONS__" fixes on my platform.
> 
"-D__EXTENSIONS__" was my initial workaround, but this tends to fails
later while compiling bindings (IIRC).
-- 
Alexander Thomas (AT) <al...@collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development