Trying to build valhalla from source code, but failing

David Alayachew davidalayachew at gmail.com
Mon Apr 24 21:07:19 UTC 2023


Hello Valhalla Dev Team,

I am trying to build the Valhalla code base from source so that I can test
some of the new features. However, when I tried to do so this morning, my
build failed because a warning was thrown, and the build seems to fail on
warnings.

Here is the warning.

C:\cygwin64\home\david\valhalla\src\jdk.compiler\share\classes\com\sun\tools\javac\code\Lint.java:145:
warning: [this-escape] possible 'this' escape before subclass is fully
initialized
        context.put(lintKey, this);
                             ^
error: warnings found and -Werror specified
1 error
1 warning

Here is a link to the class on Valhalla's code base.

Current -
https://github.com/openjdk/valhalla/blob/lworld/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java#L145

Commit -
https://github.com/openjdk/valhalla/blob/947ad67fcdbef5e518f60a30b60309d9fc2cf337/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java#L145

Long story short, a new warning was added to JDK 21, and since I am
building Valhalla using this JDK 21, it is throwing a warning. They have
since put a @SuppressWarnings("this-escape") on the offending method in the
main line jdk code base, but that commit has not yet been put into the
Valhalla code base.

I don't really know how to hide my JDK 21 build, or to tell the Valhalla
build script to use my JDK 20 build. But, worst case scenario, I can just
delete my JDK 21 build, so I am not blocked. But I wanted to bring this up
in case this is something that needed action to be taken on.

Thank you for your time!
David Alayachew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-dev/attachments/20230424/07de7b8b/attachment.htm>


More information about the valhalla-dev mailing list