Skip to content

Add -z,lazy to LDFLAGS#131

Closed
elezar wants to merge 1 commit intoNVIDIA:mainfrom
elezar:add-z-lazy
Closed

Add -z,lazy to LDFLAGS#131
elezar wants to merge 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.

@elezar elezar requested a review from klueska October 10, 2024 09:01
@elezar elezar self-assigned this Oct 10, 2024
Signed-off-by: Evan Lezar <elezar@nvidia.com>
@klueska
Copy link
Copy Markdown
Collaborator

klueska commented Oct 15, 2024

Given the errors, it doesn't look like we can just set this for all builds that link to this. It needs to be set on the go build command line.

@DanielGibson
Copy link
Copy Markdown

Probably the safest fix would be to use dlsym() to load the libnvidia-ml.so functions, instead of kinda-linking-against-it-but-not-really and relying on lazy binding

@thesamesam
Copy link
Copy Markdown

thesamesam commented Oct 9, 2025

We had a user run into this today in Gentoo. Gentle ping, would love to see this in. It'd make things much easier than trying to workaround it in all consumers.

(Unfortunately, the CI logs have expired, so I can't comment on fixing those right now.)

@elezar
Copy link
Copy Markdown
Member Author

elezar commented Apr 13, 2026

As @klueska points out. This is not the right place to do this. It needs to be added explicitly in the application being built.

@elezar elezar closed this Apr 13, 2026
@elezar elezar deleted the add-z-lazy branch April 13, 2026 14:06
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.

4 participants