-
Notifications
You must be signed in to change notification settings - Fork 118
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
glscopeclient looks in /usr/bin for plugins when installed system-wide and tries to dlopen every binary on the system #393
Comments
git commit 1f47d35 |
Backtrace:
|
Very interesting! What exact build config did you use - debug, release, sanitize? Have you tried compiling with gcc instead of LLVM? This sounds like it might be compiler specific. |
I used: |
A verbose make show it uses /usr/bin/c++, which is symlinked to /etc/alternatives/c++ which is symlinked to /usr/bin/g++ |
cmake ../ -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=/usr |
it looks like the LLVM error comes from |
which is loaded from here:
I wonder where that comes from. |
OH! It seems to use /usr/bin as plugin search dir and then
|
Got it! //current binary dir
char selfPath[1024] = "";
ssize_t readlinkReturn = readlink("/proc/self/exe", selfPath, (sizeof(selfPath) - 1) );
if ( readlinkReturn > 0)
search_dirs.push_back(dirname(selfPath)); That part seems to add /usr/bin (that's where glscopeclient is installed) to the plugin search path and load all executables there with dlopen |
Yeah ok, it shouldn't be doing that. The trick is that we do want to use the build directory as the search path during development. I guess a quick hack would be to only use the executable directory if it's not under /usr? |
The text was updated successfully, but these errors were encountered: