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

The flag --with-private-namespace is ignored when building with GCC with LTO enabled #2582

Open
sfc-gh-tmarzec opened this issue Dec 21, 2023 · 0 comments

Comments

@sfc-gh-tmarzec
Copy link

In my project, I'm using two copies of jemalloc simultaneously. To avoid duplicated symbols, one of then modifies the symbols using --with-jemalloc-prefix and --with-private-namespace flags.

When building with LTO, the --with-private-namespace flag has no effect, but no errors/warnings are reported.
I was able to track this problem, and it turns out that jemalloc calls nm in its post-processing step used for renaming private symbols. This fails when using LTO and building with GCC, in which case it's necessary to use gcc-nm instead of nm. I was able to fix this by manually setting the NM env variable to the path of gcc-nm.

The issue I see here is that this behaviour is not documented anywhere, and the errors returned by nm seem to be ignored (and not reported to the user).

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

No branches or pull requests

2 participants
@sfc-gh-tmarzec and others