-
Notifications
You must be signed in to change notification settings - Fork 24
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
Consider adding rpath=. to example binaries #5
Comments
Mesa issues are still high on the priority list but they are unlikely to make it out in v1.0.0 beta (yes for final release of course). I do set RPATH to I'll take a proper look at this later today or tomorrow. |
Thanks for looking into it. No I didn't run make install. I was trying to run from bin. Sorry for the short response. Am on mobile and away from home. |
I cannot reproduce this. I'm on Ubuntu 17.04, compiling with GCC 7.0.1. Are you using Clang? Or perhaps it an issue with the bash and how it parses You could try doing |
Then, if I do
But it otherwise launches and displays a white screen (Mesa problems as previously mentioned). RPath settings:
Though, it seems other .so's have their origin set as expected
Here's all of them. Apparently only libbsf.so doens't have it. So maybe the rpath isn't the problem?:
|
Thanks for the detailed info. None of your libraries have Not sure why I'm not using Ninja, but Makefiles. It's potentially that, or bash differences. I'll try tomorrow with the Ninja generator and see if the same thing happens on my end. If you get a chance try changing |
Building with make apparently avoids the same issue, it runs without complaining about the missing library. Get this error instead :-P
|
Sadly, the double $ in bsf/Source/CMake/Properties.cmake doesn't seem to do the trick. |
So just using make instead of ninja triggers a segmentation fault when the example is ran? Plus the parameter warnings, which imply something also went wrong with the shader. It feels very strange. I'm guessing it's some kind of memory corruption, but it manifests more easily when using make for whatever reason. I cannot reproduce this. If you get a chance to step through the program and see if you can narrow down where exactly the crash happens it would be very useful. |
Using Ninja will indeed omit That said, |
I was checking out the new example apps (Which, btw, sadly still don't work on my linux machine, though they don't crash or throw exceptions anymore :-)) and, since it'd been a good while since I toyed with them last, I ended up spending about half an hour trying to figure out what wasn't working that they would claim they couldn't find libraries in their own directory.
Turned out, ld wasn't looking for the libraries in the bin folder, just the default system ld library path.
If you add either an rpath=. (for cwd) or an rpath=${build artifact output directory}, that issue would be alleviated.
Looking here: https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling
CMake has support for Rpath when building, and rpath when installing, so when someone runs "make install", the rpath fo rthe installed binaries and libraries is set appropriately for the system.
That, or add some more documentation to the Readme.md about launching the newly built examples.
The text was updated successfully, but these errors were encountered: