Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/build_config/install_dependencies.sh
193884 views
1
#!/bin/bash
2
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3
# Copyright (C) 2025-2026 German Aerospace Center (DLR) and others.
4
# This program and the accompanying materials are made available under the
5
# terms of the Eclipse Public License 2.0 which is available at
6
# https://www.eclipse.org/legal/epl-2.0/
7
# This Source Code may also be made available under the following Secondary
8
# Licenses when the conditions for such availability set forth in the Eclipse
9
# Public License 2.0 are satisfied: GNU General Public License, version 2
10
# or later which is available at
11
# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13
14
# @file install_dependencies.sh
15
# @author Michael Behrisch
16
# @date 2025-12-15
17
18
SCRIPT_DIR=$(dirname $0)
19
# Check for macOS
20
if [[ "$(uname)" == "Darwin" ]]; then
21
brew update && brew bundle --file=$SCRIPT_DIR/Brewfile --no-upgrade
22
exit 0
23
fi
24
25
if [[ ! -f /etc/os-release ]]; then
26
echo "Unknown OS and /etc/os-release not found"
27
exit 1
28
fi
29
source /etc/os-release
30
31
# Determine Linux version
32
case "$ID" in
33
ubuntu|debian)
34
apt-get -y install $(cat $SCRIPT_DIR/build_req_deb.txt)
35
;;
36
centos)
37
if [[ "$VERSION_ID" == "7" ]]; then
38
# this is only tested with quay.io/pypa/manylinux2014_x86_64 and will probably not work with vanilla CentOS
39
# GDAL cannot be added because the build fails with dependency problems with sqlite3
40
yum install -y epel-release
41
yum-config-manager --add-repo=https://download.opensuse.org/repositories/science:/dlr/CentOS_7/
42
yum install -y --nogpgcheck ccache libxerces-c-devel proj-devel fox16-devel bzip2-devel gl2ps-devel swig3 eigen3-devel geos-devel
43
yum install -y https://packages.apache.org/artifactory/arrow/centos/7/apache-arrow-release-latest.rpm
44
yum install -y arrow-devel parquet-devel # For Apache Parquet
45
else
46
echo "CentOS version other than 7 detected: $VERSION_ID"
47
fi
48
;;
49
almalinux)
50
# this is only tested with quay.io/pypa/manylinux_2_28_x86_64 and will probably not work with vanilla almalinux
51
dnf install -y epel-release
52
dnf -y update
53
dnf install -y ccache xerces-c-devel proj-devel bzip2-devel gl2ps-devel swig gdal-devel eigen3-devel geos-devel
54
# fox dependencies
55
dnf install -y libX11-devel libXft-devel libXcursor-devel libXrandr-devel libXinerama-devel mesa-libGL-devel mesa-libGLU-devel freetype-devel fontconfig-devel libjpeg-turbo-devel libpng-devel
56
# installing arrow / parquet
57
dnf install -y https://packages.apache.org/artifactory/arrow/almalinux/$(echo $VERSION_ID | cut -f1 -d.)/apache-arrow-release-latest.rpm
58
dnf install -y arrow-devel parquet-devel
59
cd /opt
60
# building fox from source
61
curl -LO http://www.fox-toolkit.org/ftp/fox-1.6.59.tar.gz
62
tar xf fox-1.6.59.tar.gz
63
cd fox-1.6.59
64
./configure --disable-static --enable-shared
65
make -j$(nproc)
66
make install
67
cd ..
68
;;
69
*)
70
echo "Unknown or unsupported OS: $ID"
71
;;
72
esac
73
74
# building jupedsim from source
75
curl -LO https://github.com/PedestrianDynamics/jupedsim/archive/refs/tags/v1.3.1.tar.gz
76
tar xf v1.3.1.tar.gz
77
cmake -B jupedsim-build -DCMAKE_BUILD_TYPE=Release jupedsim-1.3.1
78
cmake --build jupedsim-build -j2
79
cmake --install jupedsim-build
80
81
# see https://github.com/pypa/manylinux/issues/1421
82
pipx install -f patchelf==0.16.1.0
83
84