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

Linker #121

Merged
merged 2 commits into from
Nov 25, 2020
Merged

Linker #121

merged 2 commits into from
Nov 25, 2020

Conversation

petricm
Copy link
Contributor

@petricm petricm commented Nov 20, 2020

resolves #118
BEGINRELEASENOTES

  • Update compiler flag handling
  • Resolve which type of linker is used and assign proper linking flags
  • Improve RPATH handling on macOS and add flag LCIO_SET_RPATH default ON

ENDRELEASENOTES

@rete
Copy link
Contributor

rete commented Nov 24, 2020

@gaede Do you remember what is the default rpath settings in a iLCSoft installation? Do we set this or not?
In other words, what should be the default value here and do we need to update iLCInstall scripts to set -DLCIO_SET_RPATH=ON/OFF?

@gaede
Copy link
Contributor

gaede commented Nov 24, 2020

We always built iLCSoft with rpath: https://github.com/iLCSoft/iLCUtil/blob/master/cmakemodules/ilcsoft_default_rpath_settings.cmake, so no need to specify anything in ilcinstall.
We need make sure, however that the settings in this PR and in ilcutil are compatible...

@petricm
Copy link
Contributor Author

petricm commented Nov 24, 2020

What is here for the linux rpath follows official CMake instruction on full rpath
https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling#always-full-rpath
the only difference to iLCSoft is that ilcsoft_default_rpath_settings.cmake is missing

# use, i.e. don't skip the full RPATH for the build tree
set(CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH already
# (but later on when installing)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)

and the system dir treatment.

As for the mac treatment, there is a long story on @rpath here or here, but in short this is way DD4hap and ROOT are built on macOS.

@petricm
Copy link
Contributor Author

petricm commented Nov 24, 2020

So, if you look in detail, this is the same as it was before with the added option to disable rpath

@petricm
Copy link
Contributor Author

petricm commented Nov 25, 2020

I was probably not clear. This PR does not change existing LCIO rpath behaviour, it just adds options.

@rete rete merged commit bab8576 into iLCSoft:master Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undefined linker flag -Wl,-no-undefined when compiling with GNU gcc/g++ on macOS
3 participants