I am currently setting up a Docker image to share a package that I developed. For this, I need to compile source code that requires, among other things, OpenBLAS. I am starting with an Ubuntu 22.04 base image and install libopenblas-dev
as usual. The problem I then run into is that all the files are not stored in their default locations (/usr/include and /usr/lib) but rather in /usr/lib/aarch64-linux-gnu and /usr/include/aarch64-linux-gnu/ where they are not found by default.
Now I could include those in the CFLAGS and LDFLAGS env variables, however, (a) I do not know how to do this independent of architecture (say, building on an x86 machine) and (b) how to dynamically specify these paths in a Dockerfile.
Thanks for any hint!
One thing I tried to solve this, which did not work, was to define the env variable via
ENV CFLAGS "$CFLAGS -I/usr/include/`dpkg-architecture -qDEB_HOST_MULTIARCH`"
but here the result of dpkg-architecture -qDEB_HOST_MULTIARCH
did not auto-expand...