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

8323667: Library debug files contain non-reproducible full gcc include paths #17399

Closed

Conversation

andrew-m-leonard
Copy link

@andrew-m-leonard andrew-m-leonard commented Jan 12, 2024

For gcc toolchains in ALLOW_ABSOLUTE_PATHS_IN_OUTPUT=False builds, this PR finds the location of the gcc system include paths, and adds -fdebug-prefix-map flags to map them to a standard location. Thus making the debuginfo and resulting libraries reproducible when using DevKits in different path locations.


Progress

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

Issue

  • JDK-8323667: Library debug files contain non-reproducible full gcc include paths (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17399

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

Using diff file

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

Webrev

Link to Webrev Comment

…e paths

Signed-off-by: Andrew Leonard <anleonar@redhat.com>
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 12, 2024

👋 Welcome back aleonard! 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 Jan 12, 2024
@openjdk
Copy link

openjdk bot commented Jan 12, 2024

@andrew-m-leonard The following label will be automatically applied to this pull request:

  • build

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 build build-dev@openjdk.org label Jan 12, 2024
@mlbridge
Copy link

mlbridge bot commented Jan 12, 2024

Webrevs

@andrew-m-leonard
Copy link
Author

I have tested this change successfully at Eclipse Adoptium across all the various Linux gcc platforms: x64Linux, ppc64leLinux, aarch64Linux, alpineAarch64Linux, s390xLinux

@andrew-m-leonard
Copy link
Author

@erikj79 when you get a moment, can you re-review please? thanks

@magicus
Copy link
Member

magicus commented Jan 16, 2024

Have you checked with strings if there are any other hard-coded paths, or are these really the only ones left?

…e paths

Signed-off-by: Andrew Leonard <anleonar@redhat.com>
…e paths

Signed-off-by: Andrew Leonard <anleonar@redhat.com>
@andrew-m-leonard
Copy link
Author

Have you checked with strings if there are any other hard-coded paths, or are these really the only ones left?

I have been doing some separate machine/location builds with DevKits located in different paths and build workspace in different location, and they are now "identical" with this change.
So yes, I believe this is complete.

Copy link
Member

@erikj79 erikj79 left a comment

Choose a reason for hiding this comment

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

I think this looks ok but could you split the longer lines to make side by side comparisons easier in the future?

make/autoconf/flags-cflags.m4 Show resolved Hide resolved
@magicus
Copy link
Member

magicus commented Jan 16, 2024

So $CC $CFLAGS did not work?

…e paths

Signed-off-by: Andrew Leonard <anleonar@redhat.com>
@andrew-m-leonard
Copy link
Author

I think this looks ok but could you split the longer lines to make side by side comparisons easier in the future?

Yep, done, thanks Erik

@andrew-m-leonard
Copy link
Author

andrew-m-leonard commented Jan 17, 2024

So $CC $CFLAGS did not work?

@magicus
So I purposely chose SYSROOT_CFLAGS thinking that would all that would be needed, but I think you're correct, I should use the complete CFLAGS in case a custom user extension include may have pointed at some other include path.
I have updated and tested successfully with CFLAGS_JDKLIB.
Ready for re-review, Thanks

@erikj79
Copy link
Member

erikj79 commented Jan 17, 2024

So $CC $CFLAGS did not work?

@magicus So I purposely chose SYSROOT_CFLAGS thinking that would all that would be needed, but I think you're correct, I should use the complete CFLAGS in case a custom user extension include may have pointed at some other include path. I have updated and tested successfully with CFLAGS_JDKLIB. Ready for re-review, Thanks

Magnus specifically meant $CFLAGS. It's set to "$MACHINE_FLAG $SYSROOT_CFLAGS $USER_CFLAGS" in flags.m4 and meant to contain relevant flags for running checks in configure. I don't think $CFLAGS_JDKLIB is appropriate here even if it should work.

@andrew-m-leonard
Copy link
Author

So $CC $CFLAGS did not work?

@magicus So I purposely chose SYSROOT_CFLAGS thinking that would all that would be needed, but I think you're correct, I should use the complete CFLAGS in case a custom user extension include may have pointed at some other include path. I have updated and tested successfully with CFLAGS_JDKLIB. Ready for re-review, Thanks

Magnus specifically meant $CFLAGS. It's set to "$MACHINE_FLAG $SYSROOT_CFLAGS $USER_CFLAGS" in flags.m4 and meant to contain relevant flags for running checks in configure. I don't think $CFLAGS_JDKLIB is appropriate here even if it should work.

Ah, I thought CFLAGS was only set in the gmk files...? i'll give it a try thanks.

…e paths

Signed-off-by: Andrew Leonard <anleonar@redhat.com>
@andrew-m-leonard
Copy link
Author

So $CC $CFLAGS did not work?

@magicus So I purposely chose SYSROOT_CFLAGS thinking that would all that would be needed, but I think you're correct, I should use the complete CFLAGS in case a custom user extension include may have pointed at some other include path. I have updated and tested successfully with CFLAGS_JDKLIB. Ready for re-review, Thanks

Magnus specifically meant $CFLAGS. It's set to "$MACHINE_FLAG $SYSROOT_CFLAGS $USER_CFLAGS" in flags.m4 and meant to contain relevant flags for running checks in configure. I don't think $CFLAGS_JDKLIB is appropriate here even if it should work.

Thanks @erikj79 yep, that works great, thank you for pointing that out.
Updated.

@erikj79
Copy link
Member

erikj79 commented Jan 17, 2024

Ah, I thought CFLAGS was only set in the gmk files...? i'll give it a try thanks.

No, we specifically only set the variable CFLAGS in configure because there are autoconf macros that relies on that variable. In our makefiles we avoid the standard variable CFLAGS and are instead choosing to be explicit with various CFLAGS_* and *_CFLAGS variables.

Copy link
Member

@erikj79 erikj79 left a comment

Choose a reason for hiding this comment

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

This looks good to me now.

@openjdk
Copy link

openjdk bot commented Jan 17, 2024

@andrew-m-leonard 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:

8323667: Library debug files contain non-reproducible full gcc include paths

Reviewed-by: erikj, ihse

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 59 new commits pushed to the master branch:

  • ff8cc26: 8323694: RISC-V: Unnecessary ResourceMark in NativeCall::set_destination_mt_safe
  • dadd9cd: 8316497: ColorConvertOp - typo for non-ICC conversions needs one-line fix
  • de237fb: 8323554: The typos in Javadoc: "@return if "
  • 51dbd36: 8322100: Fix GCMIncrementByte4 & GCMIncrementDirect4, and increase overlap testing
  • ffa33d7: 8317771: [macos14] Expand/collapse a JTree using keyboard freezes the application in macOS 14 Sonoma
  • 4e53235: 8323710: (fc) FileChannel.lock creates a FileKey with a poor hashCode after JDK-8321429 (win)
  • 19287ee: 8321561: (fs) Clarify non-atomic behavior of Files.move
  • 8b29e12: 8323794: Remove unused jimage compressor plugin configuration
  • 7be9f1d: 8321137: Reconsider ICStub alignment
  • b8dafa6: 8323612: IOVecWrapper should be changed to be TerminatingThreadLocal
  • ... and 49 more: https://git.openjdk.org/jdk/compare/8643cc21333c6b51242ed3b9295b25f372244755...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 Jan 17, 2024
Copy link
Member

@magicus magicus left a comment

Choose a reason for hiding this comment

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

Looks good now.

Thanks Erik for helping me clarify what I meant.

@andrew-m-leonard
Copy link
Author

/integrate

@openjdk
Copy link

openjdk bot commented Jan 18, 2024

Going to push as commit 57fad67.
Since your change was applied there have been 59 commits pushed to the master branch:

  • ff8cc26: 8323694: RISC-V: Unnecessary ResourceMark in NativeCall::set_destination_mt_safe
  • dadd9cd: 8316497: ColorConvertOp - typo for non-ICC conversions needs one-line fix
  • de237fb: 8323554: The typos in Javadoc: "@return if "
  • 51dbd36: 8322100: Fix GCMIncrementByte4 & GCMIncrementDirect4, and increase overlap testing
  • ffa33d7: 8317771: [macos14] Expand/collapse a JTree using keyboard freezes the application in macOS 14 Sonoma
  • 4e53235: 8323710: (fc) FileChannel.lock creates a FileKey with a poor hashCode after JDK-8321429 (win)
  • 19287ee: 8321561: (fs) Clarify non-atomic behavior of Files.move
  • 8b29e12: 8323794: Remove unused jimage compressor plugin configuration
  • 7be9f1d: 8321137: Reconsider ICStub alignment
  • b8dafa6: 8323612: IOVecWrapper should be changed to be TerminatingThreadLocal
  • ... and 49 more: https://git.openjdk.org/jdk/compare/8643cc21333c6b51242ed3b9295b25f372244755...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 18, 2024

@andrew-m-leonard Pushed as commit 57fad67.

💡 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
build build-dev@openjdk.org integrated Pull request has been integrated
3 participants