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

Detect whether libatomic should be linked in when using CXX linker. #11818

Merged
merged 2 commits into from Dec 7, 2021

Conversation

vkalintiris
Copy link
Contributor

@vkalintiris vkalintiris commented Nov 22, 2021

Summary

There was already a check for this when building with the bundled
protobuf. Considering that we needed the same check when building for
ML, I moved the check so that it can happen in either case when a
C++ linker is required for the build to succeed.

Test Plan

CI jobs

Additional Information

This should fix #11812

There was already a check for this when building with the bundled
protobuf. Considering that we needed the same check when building for
ML, I moved the check so that it can happen in either case when a
C++ linker is required for the build to succeed.
@github-actions github-actions bot added the area/build Build system (autotools and cmake). label Nov 22, 2021
underhood
underhood previously approved these changes Nov 22, 2021
iigorkarpov
iigorkarpov previously approved these changes Nov 22, 2021
@underhood
Copy link
Contributor

@vkalintiris seems to break on CentOS7?

@vkalintiris
Copy link
Contributor Author

@vkalintiris seems to break on CentOS7?

IIUC, --with-bundled-protobuf was broken then. I think we have two options:

  • ask agent-sre to install libatomic on centos 7, or
  • duplicate the -latomic check and explicitly disable it on CentOS 7 for ML.

TBH, I don't know what is the best approach here.

# all the atomic ops with builtins then, the library will be left unused.
# Otherwise, some ops will be covered by the compiler's intrinsics and some
# will be picked up by the linker from -latomic. In the later case, if
# -latomic is not available there will be a build failure, which would
Copy link
Contributor

@underhood underhood Nov 23, 2021

Choose a reason for hiding this comment

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

I think in future the correct way would be:

  • detect if latomic is there
  • detect if it is needed

if needed and not present then error in configure step with user friendly explanation to install libatomic instead of build failure

and in detect mode - disable all CXX features instead of failure

Copy link
Contributor

@underhood underhood left a comment

Choose a reason for hiding this comment

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

needs to be finalised in the future (see comments above)

@underhood
Copy link
Contributor

underhood commented Nov 30, 2021

@stelfrag overview here:

  • this is not a final fix (see my comments above)
  • however we could still merge it as an improvement if we want

@stelfrag
Copy link
Collaborator

stelfrag commented Dec 7, 2021

Lets merge this

@vkalintiris vkalintiris merged commit 1fd40e5 into netdata:master Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Build system (autotools and cmake).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installation fails on Raspberry Pi 4 4GT and 8GT Raspberry Pi OS Bullseye
4 participants