Skip to content

Commit c966811

Browse files
author
Hank Brekke
committed
Version: Upgrade OSRM v6.0.0
Cleaned AmazonLinux:2023 Build Scripts for Docker
1 parent d70a2ea commit c966811

12 files changed

+126
-7
lines changed

AmazonLinuxLibraries.dockerfile

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
FROM --platform=linux/amd64 amazonlinux:2023
2+
3+
# todo- remove rapidjson
4+
RUN yum -y install libxml2-devel bzip2-devel boost-devel libzip-devel \
5+
lua.x86_64 lua-devel.x86_64 luajit.x86_64 luajit-devel.x86_64 \
6+
expat expat-devel sqlite-devel rapidjson-devel libatomic \
7+
bzip2 diffutils binutils gcc14 gcc14-c++ cmake unzip wget tar xz gzip
8+
9+
WORKDIR /home
10+
11+
RUN wget "https://github.com/uxlfoundation/oneTBB/releases/download/v2022.1.0/oneapi-tbb-2022.1.0-lin.tgz" -O onetbb.tgz
12+
RUN tar -xf onetbb.tgz && \
13+
cp -a oneapi-tbb-2022.1.0/lib/intel64/gcc4.8/. /usr/local/lib/ && \
14+
cp -a oneapi-tbb-2022.1.0/include/. /usr/local/include/
15+
16+
RUN wget "https://nodejs.org/dist/v22.15.0/node-v22.15.0-linux-x64.tar.xz" -O node.tgz
17+
RUN tar -xf node.tgz && \
18+
ls node-v22.15.0-linux-x64 && \
19+
cp -a node-v22.15.0-linux-x64/bin/. /usr/local/bin && \
20+
cp -a node-v22.15.0-linux-x64/include/. /usr/local/include && \
21+
cp -a node-v22.15.0-linux-x64/lib/. /usr/local/lib && \
22+
cp -a node-v22.15.0-linux-x64/share/. /usr/local/share && \
23+
export PATH="$PATH:/usr/local/bin" && \
24+
node -v
25+
26+
RUN wget "https://github.com/Project-OSRM/osrm-backend/archive/refs/tags/v6.0.0.tar.gz" -O osrm.tgz
27+
RUN tar -xf osrm.tgz && \
28+
cd osrm-backend-6.0.0 && \
29+
npm install --ignore-scripts && \
30+
sed -i -e 's/LUA_COMPAT_5_2/LUA_COMPAT_5_2 1/g' /usr/include/luaconf-x86_64.h && \
31+
sed -i '1s/^/#include <utility>\n/' /usr/include/boost/asio/awaitable.hpp && \
32+
sed -i -e 's/Boost REQUIRED CONFIG COMPONENTS/Boost REQUIRED COMPONENTS/g' CMakeLists.txt && \
33+
mkdir build && \
34+
cd build && \
35+
CXX=gcc14-g++ CC=gcc14-cc cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=On -DCMAKE_CXX_FLAGS="-Wno-error=uninitialized" && \
36+
cmake --build . -j4
37+
38+
RUN wget "https://github.com/osmcode/osmium-tool/archive/refs/tags/v1.18.0.tar.gz" -O osmium.tgz
39+
RUN wget "https://github.com/osmcode/libosmium/archive/refs/tags/v2.22.0.tar.gz" -O libosmium.tgz
40+
RUN wget "https://github.com/mapbox/protozero/archive/refs/tags/v1.8.0.tar.gz" -O protozero.tgz
41+
RUN yum install -y lz4-devel
42+
RUN tar -xf protozero.tgz && \
43+
cd protozero-1.8.0 && \
44+
mkdir build && \
45+
cd build && \
46+
CXX=gcc14-g++ cmake .. -DBUILD_TESTING=OFF && \
47+
make && \
48+
make install
49+
RUN tar -xf libosmium.tgz && \
50+
cd libosmium-2.22.0 && \
51+
mkdir build && \
52+
cd build && \
53+
CXX=gcc14-g++ cmake .. -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF && \
54+
make && \
55+
make install
56+
RUN wget "https://github.com/nlohmann/json/archive/refs/tags/v3.12.0.tar.gz" -O nlohmann_json.tgz
57+
RUN tar -xf nlohmann_json.tgz && \
58+
cd json-3.12.0 && \
59+
mkdir build && \
60+
cd build && \
61+
CXX=gcc14-g++ cmake .. -DJSON_BuildTests=OFF && \
62+
make && \
63+
make install
64+
RUN tar -xf osmium.tgz && \
65+
cd osmium-tool-1.18.0 && \
66+
mkdir build && \
67+
cd build && \
68+
CXX=gcc14-g++ cmake .. -DBUILD_TESTING=OFF && \
69+
cmake --build .
70+
71+
RUN wget "https://github.com/OSGeo/shapelib/releases/download/v1.6.1/shapelib-1.6.1.tar.gz" -O shapelib.tgz
72+
RUN wget "https://github.com/systemed/tilemaker/archive/refs/tags/v3.0.0.tar.gz" -O tilemaker.tgz
73+
RUN tar -xf shapelib.tgz && \
74+
cd shapelib-1.6.1 && \
75+
CXX=gcc14-g++ ./configure && \
76+
make && \
77+
make install
78+
RUN wget "https://github.com/Tencent/rapidjson/archive/refs/heads/master.zip" -O rapidjson.zip
79+
RUN unzip rapidjson.zip && \
80+
cd rapidjson-master && \
81+
mkdir build && \
82+
cd build && \
83+
CXX=gcc14-g++ CC=gcc14-cc cmake .. -DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF && \
84+
cmake --build . && \
85+
cmake --install .
86+
RUN tar -xf tilemaker.tgz && \
87+
cd tilemaker-3.0.0 && \
88+
mkdir build && \
89+
cd build && \
90+
CXX=gcc14-g++ CC=gcc14-cc cmake .. && \
91+
cmake --build .
92+
93+
RUN cd osrm-backend-6.0.0 && \
94+
mkdir -p /home/export/node_modules/@project-osrm/osrm/lib && \
95+
cp package.json /home/export/node_modules/@project-osrm/osrm/ && \
96+
cp package-lock.json /home/export/node_modules/@project-osrm/osrm/ && \
97+
cp lib/index.js /home/export/node_modules/@project-osrm/osrm/lib/index.js && \
98+
cp -r lib/binding /home/export/node_modules/@project-osrm/osrm/lib && \
99+
mkdir /home/export/lib && \
100+
cp /usr/lib64/libboost_regex.so.1.75.0 /home/export/lib/ && \
101+
cp /usr/lib64/libboost_date_time.so.1.75.0 /home/export/lib/ && \
102+
cp /usr/lib64/libboost_chrono.so.1.75.0 /home/export/lib/ && \
103+
cp /usr/lib64/libboost_filesystem.so.1.75.0 /home/export/lib/ && \
104+
cp /usr/lib64/libboost_iostreams.so.1.75.0 /home/export/lib/ && \
105+
cp /usr/lib64/libboost_thread.so.1.75.0 /home/export/lib/ && \
106+
cp /usr/lib64/libboost_system.so.1.75.0 /home/export/lib/ && \
107+
cp /usr/lib64/libboost_program_options.so.1.75.0 /home/export/lib/ && \
108+
cp /usr/local/lib/libtbb.so.12 /home/export/lib/ && \
109+
cp /usr/lib64/libicudata.so.67 /home/export/lib/ && \
110+
cp /usr/lib64/libicui18n.so.67 /home/export/lib/ && \
111+
cp /usr/lib64/libicuuc.so.67 /home/export/lib/ && \
112+
cd ../osmium-tool-1.18.0 && \
113+
mkdir /home/export/bin && \
114+
cp build/src/osmium /home/export/bin/osmium && \
115+
cp /usr/lib64/libexpat.so.1 /home/export/lib/ && \
116+
cd ../tilemaker-3.0.0 && \
117+
cp /usr/local/lib/libshp.so.4 /home/export/lib/ && \
118+
cp /usr/lib64/libatomic.so.1 /home/export/lib/ && \
119+
cp build/tilemaker /home/export/bin/tilemaker && \
120+
cd /home/export && \
121+
zip -r /home/osrm-prebuilt-amazonlinux2023.zip .

build-libraries.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#/usr/bin/env bash
2+
set -e
3+
4+
docker build -f ./AmazonLinuxLibraries.dockerfile -t skyway-amz-libraries:latest .
5+
docker run --rm --platform linux/amd64 -v .:/home/host skyway-amz-libraries:latest cp osrm-prebuilt-amazonlinux2023.zip host/

json

Lines changed: 0 additions & 1 deletion
This file was deleted.

libosmium

Lines changed: 0 additions & 1 deletion
This file was deleted.
-1.02 MB
Binary file not shown.

osmium-tool

Lines changed: 0 additions & 1 deletion
This file was deleted.

osrm

Lines changed: 0 additions & 1 deletion
This file was deleted.

osrm-prebuilt-amazonlinux2023.zip

22.5 MB
Binary file not shown.

protozero

Lines changed: 0 additions & 1 deletion
This file was deleted.

shapelib

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)