Open jwatson27 opened 1 year ago
If building python is not necessary, it can be disable using the LCM_ENABLE_PYTHON
cmake variable.
docker run -it lcm-bug cmake .. -DLCM_ENABLE_PYTHON=OFF
In this case, the cmake configuration completes correctly without checking for the python library.
If building python is necessary, install the python dev apt package before building LCM. For example, adding the following to the Dockerfile before the WORKDIR /usr/src
results in the following output during the cmake configuration.
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
docker build -f Dockerfile -t lcm-bug .
docker run -it lcm-bug cmake ..
-- Found Python: /usr/bin/python3.10 (found version "3.10.6") found components: Interpreter
-- Found Python: /usr/bin/python3.10 (found version "3.10.6") found components: Interpreter Development Development.Module Development.Embed
In version 1.4.0, if the Python_LIBRARY
was not found, it would skip the python build. Should version 1.5.0 also do that?
If the python installation is desired for the default build, I think the python dev package (e.g. python3-dev
) should be listed as a required dependency.
In version 1.4.0, if the
Python_LIBRARY
was not found, it would skip the python build. Should version 1.5.0 also do that?If the python installation is desired for the default build, I think the python dev package (e.g.
python3-dev
) should be listed as a required dependency.
Agree on both counts; it looks like this is a bug in the meson logic. It looks like the detection logic may just be checking for the interpreter
# Python
lcm_option(
LCM_ENABLE_PYTHON
"Build Python bindings and utilities"
PYTHON_FOUND Python)
if(LCM_ENABLE_PYTHON)
add_subdirectory(lcm-python)
endif()
but it should be disabling if other necessary components are not found.
Summary
When attempting to build LCM 1.5.0 from source on ubuntu 22.04, the cmake configuration step throws the following error:
Example
Host OS:
Ubuntu 22.04
Docker version:Docker version 23.0.6, build ef23cbc
.Dockerfile
Build & Run
Output