Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed dockerfile builds (facebook#1734)
Summary: Building the docker images that compile infer from source under [master](https://github.com/facebook/infer/tree/main/docker/master) and [master-java](https://github.com/facebook/infer/tree/main/docker) currently result in compilation and execution failures. The compilation error is due to a missing `sqlite3` apt dependency since the command is now used during the make process in `./infer/models/Makefile` line 68 `sqlite3 $(RESULTS_DB) $(SQL_DUMP_MODEL_SPECS) </dev/null`. ``` facebook#12 259.8 [*ERROR**][5483] bash: line 1: sqlite3: command not found facebook#12 259.8 [*ERROR**][5483] make[2]: *** [Makefile:67: /infer/infer/lib/models.sql] Error 127 facebook#12 259.8 make[1]: *** [Makefile:437: infer_models] Error 2 facebook#12 259.8 make[1]: Leaving directory '/infer' facebook#12 259.8 make: *** [Makefile:449: opt] Error 2 facebook#12 259.9 facebook#12 259.9 compilation failure; you can try running facebook#12 259.9 facebook#12 259.9 make clean facebook#12 259.9 './build-infer.sh' java facebook#12 259.9 ``` The build phase is performed by debian bullseye whereas execution is performed by debian buster (older libc) which results in the following error when attempting to execute: ``` root@4212e6b6b322:/home/wsl2/# infer --help infer: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by infer) infer: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /infer/lib/infer/infer/bin/../libso/libsqlite3.so.0) root@4212e6b6b322:/home/wsl2/# ls /lib/x86_64-linux-gnu/libc libc-2.28.so libcap-ng.so.0 libcom_err.so.2 libcrypt-2.28.so libc.so.6 libcap-ng.so.0.0.0 libcom_err.so.2.1 libcrypt.so.1 ``` ---- The short fixes to the Dockerfiles have been tested on a WSL2 Ubuntu 20.04 host running docker desktop. After making the changes, infer was built and run successfully using `docker build -t infer .` Pull Request resolved: facebook#1734 Reviewed By: geralt-encore Differential Revision: D43627784 Pulled By: jvillard fbshipit-source-id: 55eb735020d5c55af478dbd45e342c4f4206c21d
- Loading branch information