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

build libscsindirgpu.so against CUDA_full_jll #1289

Closed
wants to merge 2 commits into from

Conversation

kalmarek
Copy link
Contributor

@kalmarek kalmarek commented Jul 6, 2020

the GitSource commit is bumped for easier handling of CUDA_PATH and it already includes the fix mentioned in the build script

@kalmarek kalmarek marked this pull request as ready for review July 6, 2020 18:06
@kalmarek kalmarek force-pushed the master branch 3 times, most recently from 0210732 to 9a581e1 Compare July 6, 2020 18:22
@kalmarek
Copy link
Contributor Author

kalmarek commented Jul 6, 2020

linux-x64 builds ibscsgpuindir.so successfully, but fails afterwards with

[ Info: /agent/_work/1/s/S/SCS/build/x86_64-linux-gnu/cFHDc9Ep/destdir/lib/libscsgpuindir.so matches our search criteria of libscsgpuindir
[ Info: /agent/_work/1/s/S/SCS/build/x86_64-linux-gnu/cFHDc9Ep/destdir/lib/libscsgpuindir.so cannot be dlopen'ed
[ Info: Found a valid dl path libscsindir.so while looking for libscsgpuindir
[ Info: Found a valid dl path libssp.so.0 while looking for libscsgpuindir
[ Info: Found a valid dl path libssp.so.0.0.0 while looking for libscsgpuindir
[ Info: Found a valid dl path libstdc++.so.6 while looking for libscsgpuindir
[ Info: Found a valid dl path libstdc++.so.6.0.19 while looking for libscsgpuindir
[ Info: Found a valid dl path libstdc++.so.6.0.26 while looking for libscsgpuindir
[ Info: Found a valid dl path libtsan.so.0 while looking for libscsgpuindir
[ Info: Found a valid dl path libtsan.so.0.0.0 while looking for libscsgpuindir
[ Info: Could not locate libscsgpuindir inside ["/agent/_work/1/s/S/SCS/build/x86_64-linux-gnu/cFHDc9Ep/destdir/lib64", "/agent/_work/1/s/S/SCS/build/x86_64-linux-gnu/cFHDc9Ep/destdir/lib"]
┌ Error: Built SCS but libscsgpuindir still unsatisfied:
└ @ BinaryBuilder /depot/packages/BinaryBuilder/JlR0m/src/AutoBuild.jl:759
##[error]Built SCS but libscsgpuindir still unsatisfied:
ERROR: LoadError: Cannot continue with unsatisfied build products!

strangely enough powerpc64 succeeds??!

@maleadt could you please have a look?

@maleadt
Copy link
Contributor

maleadt commented Jul 6, 2020

Yes, that's expected: the built library will depend on some CUDA libraries, which are unavailable at build time. For now, set dont_dlopen (or whatever the option is named exactly). It might also be possible to resolve this by putting the CUDA stub libraries on the LD load path (these are normally used to link dynamically to during build on a system without a functioning CUDA installation, as is here the case, but I think they could also be used to get past the dlopen audit here).

What CUDA libraries does the built GPU depend on? Could you do an ldd (which isn't directly available in the build environment)? You'll need to provide these at run time, which you could use CUDA_jll for, but adding that as a Dependency to your build recipe here will generate a JLL that unconditionally tries to dlopen CUDA libraries, which will fail without a GPU/CUDA (that's what I meant with the generated wrappers not working well for conditional dependencies). One solution is to split your package here in a GPU JLL (that you conditionally import) and a regular one that doesn't depend on CUDA_jll. An alternative might be to use CUDA.jll, trigger some functionality that dlopens the libraries that you need, which should then make it possible to dlopen your GPU library.

You should probably also hard-code the CUDA version you want to build against. In fact, since different applications might rely on different versions of CUDA, I should probably split CUDA_jll in versioned packages, e.g. CUDA90_jll.

@giordano
Copy link
Member

giordano commented Jul 6, 2020

Not sure it's a good idea to add CUDA to this builder? Maybe create a new one, only for x86_64-linux-gnu which has CUDA as additional dependency? Something like what we do for Darknet

@kalmarek
Copy link
Contributor Author

kalmarek commented Jul 7, 2020

@maleadt thanks for the tips!

@giordano no, I don't actually intend to merge this ;) At the moment I'm in the phase "try to make it build and see what are the options to use it next" ;)

@kalmarek
Copy link
Contributor Author

kalmarek commented Jul 7, 2020

hmm, now we have:

[ Info: /agent/_work/1/s/S/SCS/build/x86_64-linux-gnu/cFHDc9Ep/destdir/lib/libscsgpuindir.so matches our search criteria of libscsgpuindir
[ Info: /agent/_work/1/s/S/SCS/build/x86_64-linux-gnu/cFHDc9Ep/destdir/lib/libscsgpuindir.so cannot be dlopen'ed
[ Info: Found a valid dl path libscsindir.so while looking for libscsgpuindir
[ Info: Found a valid dl path libssp.so.0 while looking for libscsgpuindir
[ Info: Found a valid dl path libssp.so.0.0.0 while looking for libscsgpuindir
[ Info: Found a valid dl path libstdc++.so.6 while looking for libscsgpuindir
[ Info: Found a valid dl path libstdc++.so.6.0.19 while looking for libscsgpuindir
[ Info: Found a valid dl path libstdc++.so.6.0.26 while looking for libscsgpuindir
[ Info: Found a valid dl path libtsan.so.0 while looking for libscsgpuindir
[ Info: Found a valid dl path libtsan.so.0.0.0 while looking for libscsgpuindir
[ Info: Could not locate libscsgpuindir inside ["/agent/_work/1/s/S/SCS/build/x86_64-linux-gnu/cFHDc9Ep/destdir/lib64", "/agent/_work/1/s/S/SCS/build/x86_64-linux-gnu/cFHDc9Ep/destdir/lib"]
┌ Error: Built SCS but libscsgpuindir still unsatisfied:
└ @ BinaryBuilder /depot/packages/BinaryBuilder/JlR0m/src/AutoBuild.jl:759
##[error]Built SCS but libscsgpuindir still unsatisfied:
ERROR: LoadError: Cannot continue with unsatisfied build products!

so first libscsgpuindir.so is found in /agent/_work/1/s/S/SCS/build/x86_64-linux-gnu/cFHDc9Ep/destdir/lib/libscsgpuindir.so but then cannot be located there? hmm...

@giordano giordano marked this pull request as draft July 7, 2020 09:23
@kalmarek
Copy link
Contributor Author

kalmarek commented Jul 7, 2020

superseeded by #1294

@kalmarek kalmarek closed this Jul 7, 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.

3 participants