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

CUDA stubs directory must not be added to rpath/runpath #2683

Closed
mboisson opened this issue Dec 6, 2018 · 10 comments · Fixed by #3850
Closed

CUDA stubs directory must not be added to rpath/runpath #2683

mboisson opened this issue Dec 6, 2018 · 10 comments · Fixed by #3850
Milestone

Comments

@mboisson
Copy link
Contributor

mboisson commented Dec 6, 2018

This is a follow up on easybuilders/easybuild-easyblocks#1464

adding stubs to LIBRARY_PATH is causing us problems, because it ends up in our binaries RUNPATH.

If this happens and you don't use LD_LIBRARY_PATH (because you are using RUNPATH), you will have problems at runtime.

This is probably something you need to check when you are using runpath/rpath with easybuild (for Compute Canada, @bartoldeman had to adjust our linker wrapper to exclude these paths)

A stub object is a shared object, built entirely from mapfiles, that supplies the same linking interface as the real object, while containing no code or data. Stub objects cannot be used at runtime.
@boegel boegel added this to the 3.8.1 milestone Dec 6, 2018
@boegel
Copy link
Member

boegel commented Jan 16, 2019

@mboisson How are these paths excluded in your linker wrapper exactly? Just based on directory name?

@mboisson
Copy link
Contributor Author

@bartoldeman would be best to answer that question.

@bartoldeman
Copy link
Contributor

yes, as follows:

        # also exclude stub libraries like for CUDA
        if [ "${1%%/stubs}" != "$1" ]; then
            return 0
        fi

it's not beautiful, but it's unlikely that a directory named "stubs" contains non-stub libraries I would think.

@boegel
Copy link
Member

boegel commented Jan 16, 2019

Are there any other cases known besides CUDA? If not, we can consider making the check a bit more strict to also check on CUDA in the path name...

@bartoldeman
Copy link
Contributor

I don't know of any others... in fact if I google /usr/lib64/stubs I only find references to cuda.

@boegel
Copy link
Member

boegel commented Jan 16, 2019

How does #2725 look by means of a fix?

@boegel
Copy link
Member

boegel commented Jan 16, 2019

fixed via #2725

@boegel boegel closed this as completed Jan 16, 2019
@bartoldeman
Copy link
Contributor

Note that this issue has resurfaced since easybuilders/easybuild-easyblocks#2373 since the stubs libs are now in $EBROOTCUDA/stubs/lib64.

@bartoldeman bartoldeman reopened this Sep 16, 2021
@boegel boegel modified the milestones: 3.8.1, next release (4.5.0?) Sep 16, 2021
@boegel
Copy link
Member

boegel commented Sep 16, 2021

@bartoldeman So we need to extend the filtering done in #2725 to CUDA/.*/stubs/lib64 or something?

@bartoldeman
Copy link
Contributor

@boegel exactly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants