This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] SATest: Ensure Docker image can be built
ClosedPublic

Authored by mantognini on May 23 2022, 4:57 AM.

Details

Summary

Solve build issues occurring when running docker build.

Fix the version of cmake-data to solve the following issue:

The following packages have unmet dependencies:
 cmake : Depends: cmake-data (= 3.20.5-0kitware1) but 3.23.1-0kitware1ubuntu18.04.1 is to be installed

Install libjpeg to solve this issue when installing Python
requirements:

The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.

Diff Detail

Event Timeline

mantognini created this revision.May 23 2022, 4:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2022, 4:57 AM
mantognini published this revision for review.May 24 2022, 12:52 AM
mantognini edited the summary of this revision. (Show Details)
mantognini added reviewers: vsavchenko, steakhal.

This patch relates to my previous comment: https://reviews.llvm.org/D124621#3485799

Herald added a project: Restricted Project. · View Herald TranscriptMay 24 2022, 12:54 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
steakhal accepted this revision.May 24 2022, 2:04 AM

LGTM;
So you have used this tool. Could you add some notes somewhere on how to get this to work?
What is the workflow?
Is it documented anywhere?

I know that's an unrelated topic, but I might consider using/integrating this stuff into our workflow.

This revision is now accepted and ready to land.May 24 2022, 2:04 AM

LGTM;
So you have used this tool. Could you add some notes somewhere on how to get this to work?
What is the workflow?
Is it documented anywhere?

I know that's an unrelated topic, but I might consider using/integrating this stuff into our workflow.

Thanks for the review.

It's kind of underdocumented at the moment. Happy to share here the commands I've run. I'm not planning to update a README file at this point as I believe --help messages from various scripts should be clarified too to avoid conflicting/confusing information. Unfortunately, I don't have the bandwidth at the moment to do that properly.

Essentially, I've run this to 1) build the docker image, 2) create some docker volume for persistent storage, and 3) open a shell in a docker container.

python3 ./clang/utils/analyzer/SATest.py docker --build-image
docker volume create --name satest-build
docker volume create --name satest-install
python3 ./clang/utils/analyzer/SATest.py docker \
  --build-dir satest-build --clang-dir satest-install --llvm-project-dir $(pwd) \
  --shell

Then, in that container, I've run essentially this to generate the reference data (mind the final -r):

python /entrypoint.py --build-llvm-only
cd /projects
python /scripts/SATest.py build [--projects cxxopts,...] [-j 10] -v -r

Then, to test some changes, I check out the relevant patch and re-run the above without -r to build and compare the results.

(I guess it should be possible to do all this without manually running commands in the container shell, but I haven't figured out how.)

I hope this helps.

This revision was automatically updated to reflect the committed changes.