Skip to content

Add -z,lazy to LDFLAGS#732

Merged
elezar merged 1 commit intoNVIDIA:mainfrom
elezar:add-z-lazy
Oct 11, 2024
Merged

Add -z,lazy to LDFLAGS#732
elezar merged 1 commit intoNVIDIA:mainfrom
elezar:add-z-lazy

Conversation

@elezar
Copy link
Copy Markdown
Member

@elezar elezar commented Oct 10, 2024

This fixes undefined symbol errors on platforms where -z,lazy may not be the default.

This was inadvertently removed in #333 and replaced with -Wl,--export-dynamic -Wl,--unresolved-symbols=ignore-in-object-files which seems to be equivalent on some systems.

@elezar elezar self-assigned this Oct 10, 2024
@klueska
Copy link
Copy Markdown
Collaborator

klueska commented Oct 10, 2024

Is it an either/or with --unresolved-symbols=ignore-in-object-files and -z,lazy or is it OK on all platforms to have both?

@elezar
Copy link
Copy Markdown
Member Author

elezar commented Oct 10, 2024

Is it an either/or with --unresolved-symbols=ignore-in-object-files and -z,lazy or is it OK on all platforms to have both?

I can't make a comment on all platforms. From my testing, it works on Ubuntu, but let me check the documentation.

Update: The ld man pages don't mention any connection between the two options. Note it does also state that -z lazy is the default, but it may be that this option is being affected by some config that is set on Gentoo.

@elezar elezar requested a review from klueska October 10, 2024 12:39
@elezar elezar added the must-backport The changes in PR need to be backported to at least one stable release branch. label Oct 11, 2024
@elezar elezar mentioned this pull request Oct 11, 2024
This fixes undefined symbol errors on platforms where -z,lazy may
not be the default.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar elezar merged commit 7fb31bd into NVIDIA:main Oct 11, 2024
@elezar elezar linked an issue Oct 11, 2024 that may be closed by this pull request
bartoldeman added a commit to ComputeCanada/easybuild-easyconfigs that referenced this pull request Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

must-backport The changes in PR need to be backported to at least one stable release branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nvidia-ctk returns undefined symbol: nvmlComputeInstanceDestroy

2 participants