Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8312591: GCC 6 build failure after JDK-8280982 #14995

Closed
wants to merge 2 commits into from

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Jul 24, 2023

There is a simple build failure after JDK-8280982 with older GCCs:

* For target support_native_java.desktop_libawt_xawt_screencast_pipewire.o:
In file included from /home/buildbot/worker/build-jdkX-debian9/build/src/java.desktop/unix/native/libpipewire/include/spa/buffer/buffer.h:12:0,
                 from /home/buildbot/worker/build-jdkX-debian9/build/src/java.desktop/unix/native/libpipewire/include/pipewire/stream.h:171,
                 from /home/buildbot/worker/build-jdkX-debian9/build/src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.h:36,
                 from /home/buildbot/worker/build-jdkX-debian9/build/src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c:33:
/home/buildbot/worker/build-jdkX-debian9/build/src/java.desktop/unix/native/libpipewire/include/spa/utils/defs.h:61:24: error: "__clang_major__" is not defined [-Werror=undef]
 #elif __GNUC__ >= 7 || __clang_major__ >= 10
                        ^~~~~~~~~~~~~~~

There is an obvious fix for this: we need to check for defined(__GNUC__) explicitly before touching __clang_major__.

(Yes, GCC 6 is old; but we would like to make sure it builds until we run into hard to resolve build issues. This allows modern JDKs to be built in legacy enterprise environments for e.g. portable builds.)

Additional testing:

  • Linux GCC 6 fastdebug build (passes with HarfBuzz warnings, to be fixed separately)

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8312591: GCC 6 build failure after JDK-8280982 (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14995/head:pull/14995
$ git checkout pull/14995

Update a local copy of the PR:
$ git checkout pull/14995
$ git pull https://git.openjdk.org/jdk.git pull/14995/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14995

View PR using the GUI difftool:
$ git pr show -t 14995

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14995.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 24, 2023

👋 Welcome back shade! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 24, 2023
@openjdk
Copy link

openjdk bot commented Jul 24, 2023

@shipilev The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Jul 24, 2023
@mlbridge
Copy link

mlbridge bot commented Jul 24, 2023

Webrevs

Copy link
Member

@DamonFool DamonFool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@openjdk
Copy link

openjdk bot commented Jul 24, 2023

@shipilev This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8312591: GCC 6 build failure after JDK-8280982

Reviewed-by: jiefu, prr

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 53 new commits pushed to the master branch:

  • c27c877: 8302017: Allocate BadPaddingException only if it will be thrown
  • c55d29f: 8312626: Resolve multiple definition of 'start_timer' when statically linking JDK native libraries with user code
  • 0ca2bfd: 8311104: dangling-gsl warning in libwixhelper.cpp
  • c05ba48: 8313250: Exclude java/foreign/TestByteBuffer.java on AIX
  • 169b6e3: 8313174: Create fewer predictable port clashes in management tests
  • 8650026: 8310033: Clarify return value of Java Time compareTo methods
  • 25058cd: 8312620: WSL Linux build crashes after JDK-8310233
  • 8661b8e: 8312495: assert(0 <= i && i < _len) failed: illegal index after JDK-8287061 on big endian platforms
  • 486c784: 8312433: HttpClient request fails due to connection being considered idle and closed
  • 271417a: 8312579: [JVMCI] JVMCI support for virtual Vector API objects
  • ... and 43 more: https://git.openjdk.org/jdk/compare/ab821aa24f248e042d367ccd908fc1f68ebe8333...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 24, 2023
@prrace
Copy link
Contributor

prrace commented Jul 24, 2023

/reviewers 2

@openjdk
Copy link

openjdk bot commented Jul 24, 2023

@prrace
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Jul 24, 2023
@prrace
Copy link
Contributor

prrace commented Jul 24, 2023

This is not so obvious. This is a 3rd party header file.
Seems we should discuss with upstream.

@prrace
Copy link
Contributor

prrace commented Jul 25, 2023

@azvegint - Alexander please help decide what we should do here.

@prrace
Copy link
Contributor

prrace commented Jul 26, 2023

I submitted https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3386 to see what upstream say.

@prrace
Copy link
Contributor

prrace commented Jul 26, 2023

Comment in the gitlab bug
"this error is unrelated to the compiler version, it is rather caused by the -Werror=undef flag."

So maybe we should ignore that, if possible just on the old tool chain ?

@shipilev
Copy link
Member Author

Yeah, we can just ignore the warnings. See new commit. I don't see a clean way to disable this only for specific GCC versions, and other warnings seem to be added without version checks too. I checked it still builds fine on GCC 6.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 27, 2023
Copy link
Member

@DamonFool DamonFool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems better not touching the 3rd party source code.

@shipilev
Copy link
Member Author

shipilev commented Aug 1, 2023

I would like to integrate this, any final comments?

@shipilev
Copy link
Member Author

shipilev commented Aug 2, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Aug 2, 2023

Going to push as commit 9454b2b.
Since your change was applied there have been 96 commits pushed to the master branch:

  • 6a853bb: 8311821: Simplify ParallelGCThreadsConstraintFunc after CMS removal
  • e8471f6: 8313507: Remove pkcs11/Cipher/TestKATForGCM.java from ProblemList
  • 528596f: 8310991: missing @SInCE tags in java.xml
  • f14245b: 8312814: Compiler crash when template processor type is a captured wildcard
  • 9b55e9a: 8312572: JDK 21 RDP2 L10n resource files update
  • 28be34c: 8313226: Redundant condition test in X509CRLImpl
  • dc14247: 8309240: Array classes should be stored in dynamic CDS archive
  • bf70777: 8312181: CDS dynamic dump crashes when verifying unlinked class from static archive
  • 7ba8c69: 8312596: Null pointer access in Compile::TracePhase::~TracePhase after JDK-8311976
  • ec2f38f: 8313428: GHA: Bump GCC versions for July 2023 updates
  • ... and 86 more: https://git.openjdk.org/jdk/compare/ab821aa24f248e042d367ccd908fc1f68ebe8333...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Aug 2, 2023
@openjdk openjdk bot closed this Aug 2, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Aug 2, 2023
@openjdk
Copy link

openjdk bot commented Aug 2, 2023

@shipilev Pushed as commit 9454b2b.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
4 participants