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

CodeChecker failure, LD_PRELOAD looking for CodeChecker ldlogger.so object file in the wrong location #4125

Closed
RobMeades opened this issue Dec 9, 2023 · 6 comments
Labels
dev env ⛑️ Development environment duplicate 👥 package-Python 🐍 Issues related to the officially supplied PyPI (pip) package

Comments

@RobMeades
Copy link

RobMeades commented Dec 9, 2023

We run CodeChecker (version 6.22.2) on Linux (Ubuntu) building, via make, a GCC for ARM target, as follows:

CodeChecker check -b make -j8  -o analyze --jobs=12 --disable=misc-misplaced-const --disable=bugprone-signed-char-misuse --disable=clang-diagnostic-sign-compare --disable=clang-diagnostic-#warnings --disable=clang-diagnostic-unknown-attributes

CodeChecker starts up:

Starting build...
Using CodeChecker ld-logger.

...and then, for each file that is compiled, ld.so complains that LD_PRELOAD cannot find the CodeChecker ldlogger.so file

ERROR: ld.so: object '/usr/local/lib/python3.8/dist-packages/codechecker_analyzer/ld_logger/lib/x86_64/ldlogger.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

The reason it cannot find the file is because it is looking in the wrong place, there is no x86_64 sub-directory, the ldlogger.so file can be found here:

/usr/local/lib/python3.8/dist-packages/codechecker_analyzer/ld_logger/lib/ldlogger.so

Can anyone suggest how I can make LD_PRELOAD happy, or otherwise make CodeChecker happy?

Note that no LD_PRELOAD environment variable is shown by env and there is no /etc/ld.so.preload file, so the invocation of the logging stuff with LD_PRELOAD doesn't appear to be coming from the system on which CodeChecker has been installed, it seems to be coming from CodeChecker itself.

@RobMeades
Copy link
Author

In case it matters, CodeChecker was installed as follows:

wget software-properties-common
wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main"
apt-get install gcc-multilib g++-multilib locales clang-14 clang-tidy-14 clang-format-14 cppcheck libpq-dev make build-essential curl git python3-venv python3-dev python3-pip python3-setuptools libsasl2-dev libldap2-dev libssl-dev
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 9999
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 9999
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 9999
update-alternatives --install /usr/bin/python python /usr/bin/python3 1
pip3 install thrift codechecker

@whisperity
Copy link
Contributor

@RobMeades Please double-check the version of CodeChecker installed. The 6.22 deployment to PyPI is known to be nuked, but there should be a fix 6.22.2.post1 available. What do CodeChecker version and pip list | grep codechecker show?

See #3858, #3919, #3976, and #4053.

Alternatively, reinstall. We just released 6.23, and it should be up on PyPI as well.

Side note: To run CodeChecker, you do not need to install thrift. All the RPC dependencies are (or should be...) appropriately packaged into the main deployment. thrift is only needed manually if you want to develop changes to the API.

@whisperity whisperity added this to the release 6.23.0 milestone Dec 10, 2023
@whisperity whisperity added duplicate 👥 dev env ⛑️ Development environment package-Python 🐍 Issues related to the officially supplied PyPI (pip) package labels Dec 10, 2023
@RobMeades
Copy link
Author

Thanks for the swift response, I will try a reinstall forthwith, and leave thrift off this time.

@RobMeades
Copy link
Author

RobMeades commented Dec 10, 2023

FYI [before reinstall]:

> pip list | grep codechecker
codechecker         6.22.2
> CodeChecker version
[INFO 2023-12-10 13:06] - CodeChecker analyzer version:
---------------------------------------------------------------
Kind                 | Version
---------------------------------------------------------------
Base package version | 6.22.2
Package build date   | 2023-07-13T15:52
Git commit ID (hash) | a3d35cfd509b995187288cd8631446415a334257
Git tag information  | 6.22.2
---------------------------------------------------------------

[INFO 2023-12-10 13:06] - CodeChecker web version:
------------------------------------------------------------------------------
Kind                                | Version
------------------------------------------------------------------------------
Base package version                | 6.22.2
Package build date                  | 2023-07-13T15:52
Git commit ID (hash)                | a3d35cfd509b995187288cd8631446415a334257
Git tag information                 | 6.22.2
Server supported Thrift API version | 6.53
Client Thrift API version           | 6.53
------------------------------------------------------------------------------

@RobMeades
Copy link
Author

Yup, sweeeet, 6.23 is the THING. Thank you so much!

@whisperity
Copy link
Contributor

No problem!

@whisperity whisperity closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev env ⛑️ Development environment duplicate 👥 package-Python 🐍 Issues related to the officially supplied PyPI (pip) package
Projects
None yet
Development

No branches or pull requests

2 participants