Open gak opened 3 years ago
Hi, thanks for the detailed report. Im on vacation at the moment but will look into it as soon as I can.
Hi, There seems to be a problem with the installation of osrm-backend. I added a temporary fix in your docker file to download and build/install osrm-backend before building the project and it worked for me. When I'm back I will do a proper fix but this should work for now.
# syntax=docker/dockerfile:experimental
FROM ubuntu:focal
ARG DEBIAN_FRONTEND=noninteractive
RUN sed -i -e 's/http:\/\/archive\.ubuntu\.com\/ubuntu\//mirror:\/\/mirrors\.ubuntu\.com\/mirrors\.txt/' /etc/apt/sources.list
RUN \
--mount=type=cache,target=/var/lib/apt \
apt-get update -y && \
apt-get install -y curl build-essential libssl-dev zlib1g-dev libssl-dev pkg-config cmake \
libboost-iostreams-dev libboost-regex-dev libboost-date-time-dev libboost-filesystem-dev \
libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libexpat1-dev \
libbz2-dev lua5.2 liblua5.2-dev libtbb-dev \
gcc clang gdb valgrind git vim
RUN curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly -y
ENV PATH /root/.cargo/bin:$PATH
RUN git clone https://github.com/Project-OSRM/osrm-backend
WORKDIR /osrm-backend
RUN mkdir build
WORKDIR build
RUN cmake ..
RUN make -j12
RUN make install
RUN mkdir /build
WORKDIR /build
COPY / /build
RUN cargo build
Thanks for this temp fix, it works perfectly. I'll leave the issue open for the proper fix.
Enjoy the vacation!
Hi,
Thanks for this awesome crate. I'm having issues building this in Ubuntu in a Docker image. I'm not well versed in
cmake
so I'm having problems working out why. The relevant (I think) error is:Full error at: https://gist.github.com/gak/ee482b96e6358de2d9675b9d54fa5130
I see that there are built
.a
files, e.g.libosrm.a
but thefind_package(LibOSRM)
call doesn't seem to find them.I've made a reproducible repository: https://github.com/gak/rs_osrm_test
It's just a matter of having Docker installed and run
make
, and the error should show up.If you want to interactively debug it, comment out the
RUN cargo build
in theDockerfile
,make
the build, then rundocker run -it rs_osrm_test bash
, then runcargo build
in the container instance.