I'm trying to modify a dockcross image to include the Apache Portable Runtime lib inside of the Docker image for a riscv64 linux dockcross image. Here's the relevant command I've appended to the end of the Dockerfile:
RUN cd /tmp && \
wget https://archive.apache.org/dist/apr/apr-1.6.3.tar.gz && \
tar -xvf apr-1.6.3.tar.gz && rm apr-1.6.3.tar.gz && \
cd apr-1.6.3 && \
./configure --target=riscv64-unknown-linux-gnu --prefix=${CROSS_ROOT} && \
make && \
make install
Note that this works when I execute this within an interactive session for the image, but not when I try to build it. Any ideas on how to fix it? Thank you!
Steps to reproduce:
Modify the default Dockerfile from the dockcross repository by appending the above code snippet. The image build (with make linux-riscv64
from the dockcross repo's root directory) should fail with the error message:
configure: error: Cannot determine size of void*
------
Dockerfile:127
--------------------
126 | # For now, we use a hardcoded apr version (1.6.3), might want to change that later
127 | >>> RUN cd /tmp && \
128 | >>> wget https://archive.apache.org/dist/apr/apr-1.6.3.tar.gz && \
129 | >>> tar -xvf apr-1.6.3.tar.gz && rm apr-1.6.3.tar.gz && \
130 | >>> cd apr-1.6.3 && \
131 | >>> ./configure --target=riscv64-unknown-linux-gnu --prefix=${CROSS_ROOT} && \
132 | >>> make && \
133 | >>> make install
134 |
--------------------
ERROR: failed to solve: process "/bin/sh -c cd /tmp && wget https://archive.apache.org/dist/apr/apr-1.6.3.tar.gz && tar -xvf apr-1.6.3.tar.gz && rm apr-1.6.3.tar.gz && cd apr-1.6.3 && ./configure --target=riscv64-unknown-linux-gnu --prefix=${CROSS_ROOT} && make && make install" did not complete successfully: exit code: 1
make: *** [Makefile:248: linux-riscv64] Error 1
I am trying to build the docker image from an x86_64 Linux host.