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

DAOS-16826 build: Fix compiling issues in gcc 14 #15531

Merged
merged 9 commits into from
Dec 4, 2024

Conversation

jxiong
Copy link
Contributor

@jxiong jxiong commented Nov 22, 2024

This PR tends to fix the compilation issue we discovered in gcc 14. I have checked all the errors and I think they are legit.

Change-Id: Ie542b568eadc5052c76f8bd278f0c0e0545717ae

Before requesting gatekeeper:

  • Two review approvals and any prior change requests have been resolved.
  • Testing is complete and all tests passed or there is a reason documented in the PR why it should be force landed and forced-landing tag is set.
  • Features: (or Test-tag*) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.
  • Commit messages follows the guidelines outlined here.
  • Any tests skipped by the ticket being addressed have been run and passed in the PR.

Gatekeeper:

  • You are the appropriate gatekeeper to be landing the patch.
  • The PR has 2 reviews by people familiar with the code, including appropriate owners.
  • Githooks were used. If not, request that user install them and check copyright dates.
  • Checkpatch issues are resolved. Pay particular attention to ones that will show up on future PRs.
  • All builds have passed. Check non-required builds for any new compiler warnings.
  • Sufficient testing is done. Check feature pragmas and test tags and that tests skipped for the ticket are run and now pass with the changes.
  • If applicable, the PR has addressed any potential version compatibility issues.
  • Check the target branch. If it is master branch, should the PR go to a feature branch? If it is a release branch, does it have merge approval in the JIRA ticket.
  • Extra checks if forced landing is requested
    • Review comments are sufficiently resolved, particularly by prior reviewers that requested changes.
    • No new NLT or valgrind warnings. Check the classic view.
    • Quick-build or Quick-functional is not used.
  • Fix the commit message upon landing. Check the standard here. Edit it to create a single commit. If necessary, ask submitter for a new summary.

Change-Id: Ie542b568eadc5052c76f8bd278f0c0e0545717ae
@jxiong jxiong requested review from a team as code owners November 22, 2024 19:19
Copy link

github-actions bot commented Nov 22, 2024

Ticket title is 'Fixed various compiling issue seen by latest gcc'
Status is 'Open'
Labels: 'GCP'
https://daosio.atlassian.net/browse/DAOS-16826

jolivier23
jolivier23 previously approved these changes Nov 22, 2024
@daosbuild1
Copy link
Collaborator

Test stage Build on Leap 15.5 with Intel-C and TARGET_PREFIX completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/1/execution/node/372/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on Leap 15.5 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/1/execution/node/273/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 9 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/1/execution/node/348/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/1/execution/node/323/log

@daosbuild1
Copy link
Collaborator

Test stage Build DEB on Ubuntu 20.04 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/1/execution/node/326/log

@jxiong jxiong requested a review from wangdi1 November 22, 2024 23:15
Copy link
Contributor

@ashleypittman ashleypittman 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 to have been released in August, Fedora is typically the most up-to-date distro but it looks to be using 13 still.

There are failures in CI on leap that will need addressing.

Comment on lines 31 to 32
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wmissing-attributes\"") \
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we've seen something along these lines before, what's the actual issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it was complaining about fseek64() at https://codebrowser.dev/glibc/glibc/libio/stdio.h.html#780, where it has __nonnull((1)) attribute but ours doesn't have it.

BTW, I have gcc-13 installed as well, and it will hit the same issue; not sure why it can compile on Fedora . I'm using a Debian based system.

@daosbuild1
Copy link
Collaborator

Test stage Build on Leap 15.5 with Intel-C and TARGET_PREFIX completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/2/execution/node/387/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on Leap 15.5 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/2/execution/node/318/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 9 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/2/execution/node/366/log

@daosbuild1
Copy link
Collaborator

Test stage Build DEB on Ubuntu 20.04 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/2/execution/node/334/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/2/execution/node/367/log

@daosbuild1
Copy link
Collaborator

Test stage Build on Leap 15.5 with Intel-C and TARGET_PREFIX completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/3/execution/node/387/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on Leap 15.5 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/3/execution/node/336/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 9 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/3/execution/node/340/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/3/execution/node/374/log

@daosbuild1
Copy link
Collaborator

Test stage Build DEB on Ubuntu 20.04 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/3/execution/node/349/log

@daltonbohning
Copy link
Contributor

FYI the DAOS/NLT GHA is being fixed in #15538, which also requires the build fixes in this PR.

/* clang-format off */
#define IOIL_FORWARD_DECL(type, name, params) \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wmissing-attributes\"") \
Copy link
Contributor

Choose a reason for hiding this comment

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

this fails on leap 15 clang, probably doesn't like the particular warning

Copy link
Contributor

Choose a reason for hiding this comment

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

You might be able to fix it by also adding

_Pragma("GCC diagnostic ignored "-Wpragmas"")

Copy link
Contributor

Choose a reason for hiding this comment

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

another option here would be to fix the actual issue. If an attribute is required (and consistent), we could just add another argument to IOIL_FORWARD_DECL

Required-githooks: true

Signed-off-by: Jeff Olivier <[email protected]>
@daosbuild1
Copy link
Collaborator

Test stage Build on Leap 15.5 with Intel-C and TARGET_PREFIX completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/4/execution/node/387/log

@daosbuild1
Copy link
Collaborator

Test stage Build on Leap 15.5 with Intel-C and TARGET_PREFIX completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/5/execution/node/387/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on Leap 15.5 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/5/execution/node/343/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 9 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/5/execution/node/338/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on EL 8 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15531/5/execution/node/372/log

Required-githooks: true

Signed-off-by: Jeff Olivier <[email protected]>
Required-githooks: true

Signed-off-by: Jeff Olivier <[email protected]>
@jolivier23 jolivier23 requested review from a team as code owners December 3, 2024 21:16
Required-githooks: true

Signed-off-by: Jeff Olivier <[email protected]>
@jolivier23 jolivier23 self-requested a review December 3, 2024 21:25
@@ -4,6 +4,7 @@

DESIRED_FLAGS = ['-fstack-usage',
'-Wno-sign-compare',
'-Wno-missing-attributes',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

cool. thanks for fixing it.

@daltonbohning daltonbohning added the forced-landing The PR has known failures or has intentionally reduced testing, but should still be landed. label Dec 4, 2024
@daltonbohning
Copy link
Contributor

DAOS/NLT failure proven to be fixed by this PR + #15538

@daltonbohning
Copy link
Contributor

@daos-stack/client-api-owners @mchaarawi Any issue with this?

@jolivier23 jolivier23 merged commit 1eb8746 into master Dec 4, 2024
53 of 55 checks passed
@jolivier23 jolivier23 deleted the jxiong/fix_gcc14_compiling branch December 4, 2024 15:55
jolivier23 added a commit that referenced this pull request Dec 6, 2024
* Fix compiling issues in gcc 14

Signed-off-by: Jinshan Xiong <[email protected]>
Co-authored-by: Jeff Olivier <[email protected]>
jolivier23 added a commit that referenced this pull request Dec 8, 2024
* Fix compiling issues in gcc 14

Signed-off-by: Jinshan Xiong <[email protected]>
Co-authored-by: Jeff Olivier <[email protected]>
@daltonbohning
Copy link
Contributor

@jolivier23 I think we need to backport this to 2.6, right?

daltonbohning pushed a commit that referenced this pull request Dec 12, 2024
* Fix compiling issues in gcc 14

Signed-off-by: Jinshan Xiong <[email protected]>
Co-authored-by: Jeff Olivier <[email protected]>
daltonbohning pushed a commit that referenced this pull request Dec 12, 2024
* Fix compiling issues in gcc 14

Signed-off-by: Jinshan Xiong <[email protected]>
Co-authored-by: Jeff Olivier <[email protected]>
Signed-off-by: Dalton Bohning <[email protected]>
daltonbohning pushed a commit that referenced this pull request Dec 14, 2024
* Fix compiling issues in gcc 14

Signed-off-by: Jinshan Xiong <[email protected]>
Co-authored-by: Jeff Olivier <[email protected]>
Signed-off-by: Dalton Bohning <[email protected]>
daltonbohning pushed a commit that referenced this pull request Dec 14, 2024
* Fix compiling issues in gcc 14

Signed-off-by: Jinshan Xiong <[email protected]>
Co-authored-by: Jeff Olivier <[email protected]>
Signed-off-by: Dalton Bohning <[email protected]>
jolivier23 added a commit that referenced this pull request Dec 16, 2024
* Fix compiling issues in gcc 14

Signed-off-by: Jinshan Xiong <[email protected]>
Co-authored-by: Jeff Olivier <[email protected]>
daltonbohning pushed a commit that referenced this pull request Dec 16, 2024
* Fix compiling issues in gcc 14

Signed-off-by: Jinshan Xiong <[email protected]>
Co-authored-by: Jeff Olivier <[email protected]>
Signed-off-by: Dalton Bohning <[email protected]>
jolivier23 added a commit that referenced this pull request Dec 16, 2024
* Fix compiling issues in gcc 14

Signed-off-by: Jinshan Xiong <[email protected]>
Co-authored-by: Dalton Bohning <[email protected]>
Co-authored-by: Jeff Olivier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forced-landing The PR has known failures or has intentionally reduced testing, but should still be landed.
Development

Successfully merging this pull request may close these issues.

7 participants