Problems building IcedTea with clang
Henrik /KaarPoSoft
henrik at kaarposoft.dk
Thu Jun 20 01:30:04 PDT 2013
Dear all,
I have build IcedTea 2.4.0 with gcc 4.7.2 without problems.
However, building fails with clang 3.2.
Before digging myself into debugging this, I would like to reach out to you
on this list for any insights you may have on the issue.
I can hardly think I am the first one to try building IcedTea with clang...
To build with clang I use the same build script as for gcc, but start with:
CC="clang"; export CC
CXX="clang++"; export CXX
The build starts as expected, and it seems that clang is indeed being
used as the compiler.
However, building fails with
non-void function 'getDefaultScopeID' should return a value [-Wreturn-type]
in src/solaris/native/java/net/net_util_md.c:117:9
(the relevant part of the log is attached).
In net_util_md.c:117 we have a CHECK_NULL
which expands to "if ((x) == NULL) return;"
which is problematic
as it is a return without value inside a non-void function.
If I understand correctly, this is not allowed in c99.
So I tried
CC="clang -std=gnu89"; export CC
CXX="clang++ -std=gnu89"; export CXX
but this also fails in the same way (log attached).
I could of course patch this manually, but I am fearing that I will run into
many more such issues in an uphill battle.
So: Has anyone build IcedTea 2.4.0 with clang 3.2 ?
Or maybe with some other version combination ?
Any hints would be most appreciated!
/Henrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icedtea7.log
Type: text/x-log
Size: 2628 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20130620/f8fb1247/icedtea7.log
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icedtea7_gnu89.log
Type: text/x-log
Size: 2639 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20130620/f8fb1247/icedtea7_gnu89.log
More information about the distro-pkg-dev
mailing list