c99-style header file in snv_173 (was Re: build failure on solaris-sparc)
Weijun Wang
weijun.wang at oracle.com
Wed Sep 14 12:01:23 UTC 2011
I removed the following line and the build has finished successfully.
Defs-solaris.gmk:147:CFLAGS_COMMON += -xc99=%none
-Max
On 09/14/2011 07:25 PM, Weijun Wang wrote:
> The machine is a snv_173 and its /usr/include/X11/Xfuncproto.h is much
> longer than an old version, say, the one on sc11b1903, which is a JPRT
> machine with 5.10.
>
> Here are the lines that causes the problem:
>
> 132 /* requires xproto >= 7.0.22 */
> 133 #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
> 134 #define _X_NONNULL(args...) __attribute__((nonnull(args)))
> 135 #else
> 136 #define _X_NONNULL(...) /* */
> 137 #endif
>
> So I write a tiny a.c and you can see:
>
> $ cat a.c
> #define A(...)
> int main() {}
>
> $ /java/devtools/sparc/SUNWspro/SS12u1/bin/cc a.c
> $ /java/devtools/sparc/SUNWspro/SS12u1/bin/cc -xc99=%none a.c
> "a.c", line 1: invalid token in #define macro parameters: ...
> cc: acomp failed for a.c
>
> -Max
>
>
> On 09/14/2011 06:56 PM, Chris Hegarty wrote:
>> Is it possible that one of the system includes in using C99 features? It
>> may be that on older Solaris boxes have an older version of the include
>> file?
>>
>> -Chris.
>>
>> On 14/09/2011 11:49, Weijun Wang wrote:
>>> I'm building jdk8 on a solaris-sparc and see this failure:
>>>
>>> /java/devtools/sparc/SUNWspro/SS12u1/bin/cc -xO2 -Wc,-Qrm-s
>>> -Wc,-Qiselect-T0 -L../../../build/solaris-sparc/tmp/sun/sun.awt/awt/obj
>>> -xc99=%none -xCC -errshort=tags -Xa -xregs=no%appl -xmemalign=4s -v -mt
>>> -xstrconst -W0,-noglobal -m32 -xarch=sparcvis -KPIC
>>> -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES -DMLIB_ADD_SUFF
>>> ../../../src/solaris/native/sun/awt/medialib/vis_32.il
>>> -I../../../src/share/native/sun/awt/medialib
>>> -I../../../src/solaris/native/sun/awt/medialib
>>> -I../../../src/solaris/native/sun/java2d/loops -DNDEBUG -DTRIMMED
>>> -D__solaris__ -Dsparc -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS -I.
>>> -I../../../build/solaris-sparc/tmp/sun/sun.awt/awt/CClassHeaders
>>> -I../../../src/solaris/javavm/export -I../../../src/share/javavm/export
>>> -I../../../src/share/native/common -I../../../src/solaris/native/common
>>> -I../../../src/share/native/sun/awt
>>> -I../../../src/solaris/native/sun/awt
>>> -I../../../src/share/native/sun/awt/debug
>>> -I../../../src/share/native/sun/awt/../font
>>> -I../../../src/solaris/native/sun/awt/../font
>>> -I../../../src/share/native/sun/awt/image
>>> -I../../../src/share/native/sun/awt/image/cvutils
>>> -I../../../src/share/native/sun/awt/shell
>>> -I../../../src/share/native/sun/awt/medialib
>>> -I../../../src/solaris/native/sun/awt/medialib
>>> -I../../../src/share/native/sun/awt/../java2d
>>> -I../../../src/solaris/native/sun/awt/../java2d
>>> -I../../../src/share/native/sun/awt/../java2d/loops
>>> -I../../../src/share/native/sun/awt/../java2d/pipe
>>> -I../../../src/share/native/sun/awt/../java2d/opengl
>>> -I../../../src/solaris/native/sun/awt/../java2d/opengl
>>> -I../../../src/solaris/native/sun/awt/../java2d/x11
>>> -I../../../src/share/native/sun/awt/../dc/doe
>>> -I../../../src/share/native/sun/awt/../dc/path
>>> -I../../../src/solaris/native/sun/awt/../jdga
>>> -I../../../src/solaris/native/sun/awt -c -o
>>> ../../../build/solaris-sparc/tmp/sun/sun.awt/awt/obj/BufImgSurfaceData.o
>>> ../../../src/share/native/sun/awt/image/BufImgSurfaceData.c
>>> "/usr/include/X11/Xfuncproto.h", line 136: invalid token in #define
>>> macro parameters: ...
>>> cc: acomp failed for
>>> ../../../src/share/native/sun/awt/image/BufImgSurfaceData.c
>>>
>>> Googling "invalid token in #define macro parameters: ..." shows
>>> something about c99 so I remove the -xc99=%none option above and re-run
>>> the command and it succeeds. Is there really a connection here?
>>>
>>> The machine is pae-t4two-04.
>>>
>>> Thanks
>>> Max
More information about the build-dev
mailing list