-
Notifications
You must be signed in to change notification settings - Fork 385
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
LD_PRELOAD cannot be preloaded, possible regression with #4312 #4360
Comments
I have tested with the latest master version (already CMake-based) Bitcoin project, and there is no mention of it overriding the LD_LIBRARY_PATH. The issue still holds. Right now, I see 2 ways of doing this:
|
The problem with the solution in #3919 (which was reverted and fixed in #4314) was that it put the absolute path of the ldlogger.so into to the LD_LIBRARY_PATH. The 32bits version of the ldlogger.so was used on a 32bits host, and the 64bits version on a 64 bits host. Unfortunately this is not correct, as not the architecture type of the host which matters, but the architecture type of the gcc compiler that we logged. So a user reported that logging was not working correctly when he was logging a 32bits gcc on a 64 bits machine as the 64 bits ldlogger was loaded which could not be dynamically linked with the 32bits gcc. The currently implemented strategy as of #4314 is the following: We set the LD_LIBRARY_PATH to the directory containing containing dir and the LD_PRELOAD env var to relative ldlogger.so then the linux will automatically select the ld_logger/lib/i386 and the ld_logger/lib/x86_64 subdirectories based on the architecture of the logged gcc. Has this behaviour changed on the newest linux ubunut 24? The current implementation works fine (according to my tests) on ubuntu 20,22, rhel 8,9. |
I have created a draft for option 2 since it seemed like the simpler solution. PR here: #4394 |
Describe the bug
On Ubuntu-24.04, when analyzing bitcoin v0.20.1, the logging phase fails.
CodeChecker version
master a6663b3
To Reproduce
Results in this error for all TUs:
Expected behaviour
I expect the log to produce a compilation database, but it is empty.
Desktop (please complete the following information)
Additional context
I see that the issue came up in #3858, and I suspect that the regression to this error happened #4312.
I think the change should not just be reverted, but instead, the machine architecture of the TU analyzed should be added to LD_LIBRARY_PATH env variable of the compiler invocation to be logged.
The text was updated successfully, but these errors were encountered: