-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
SUMO compilation
This page explains how to recompile the SUMO dependency on every platforms. SUMO is an open source microscopic and continuous road traffic simulation package used by the sumo interface to generate traffic in any Webots simulation.
Get Sumo 1.10.0 from precompiled package and create the target package: https://sourceforge.net/projects/sumo/files/sumo
Reference: http://sumo.dlr.de/wiki/Installing
# Recommended: sudo apt-get autoremove libxerces-c3.2 libxerces-c-dev libfox-1.6-0 libfox-1.6-dev
sudo add-apt-repository ppa:sumo/stable
sudo apt-get update
sudo apt-get install sumo sumo-tools
Note: The following additional packages will be installed:
fastjar jarwrapper libfox-1.6-0 libjs-openlayers libjs-underscore
libspatialindex-c6 libspatialindex-dev libspatialindex6 python3-pyproj
python3-rtree sumo sumo-tools
cd $HOME/software
mkdir sumo
cd sumo
cp /usr/bin/duarouter .
cp /usr/bin/netconvert .
cp /usr/bin/netedit .
cp /usr/bin/sumo .
cp /usr/bin/sumo-gui .
mkdir lib
cp /usr/lib/x86_64-linux-gnu/libFOX-1.6.so.0* lib/
cp /usr/lib/libgdal.so.1* lib/
cp /usr/lib/libgl2ps.so.0* lib/
cp /usr/lib/x86_64-linux-gnu/libproj.so.9* lib/
cp /usr/lib/x86_64-linux-gnu/libxerces-c-3.1.so* lib/
cp /usr/lib/libarmadillo.so.6* lib/
cp /usr/lib/x86_64-linux-gnu/libdapclient.so.6* lib/
cp /usr/lib/x86_64-linux-gnu/libdap.so.17* lib/
cp /usr/lib/libdfalt.so.0* lib/
cp /usr/lib/x86_64-linux-gnu/libepsilon.so.1* lib/
cp /usr/lib/x86_64-linux-gnu/libfreexl.so.1* lib/
cp /usr/lib/x86_64-linux-gnu/libgeos_c.so.1* lib/
cp /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10* lib/
cp /usr/lib/x86_64-linux-gnu/libkmlbase.so.1* lib/
cp /usr/lib/x86_64-linux-gnu/libkmldom.so.1* lib/
cp /usr/lib/x86_64-linux-gnu/libkmlengine.so.1* lib/
cp /usr/lib/libmfhdfalt.so.0* lib/
cp /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20* lib/
cp /usr/lib/x86_64-linux-gnu/libnetcdf.so.11* lib/
cp /usr/lib/x86_64-linux-gnu/libodbcinst.so.2* lib/
cp /usr/lib/x86_64-linux-gnu/libodbc.so.2* lib/
cp /usr/lib/libogdi.so.3.2* lib/
cp /usr/lib/x86_64-linux-gnu/libpq.so.5* lib/
cp /usr/lib/x86_64-linux-gnu/libspatialite.so.7* lib/
cp /usr/lib/libarpack.so.2* lib/
cp /usr/lib/libblas.so.3* lib/
cp /usr/lib/x86_64-linux-gnu/libgeos-3.5.0.so* lib/
cp /usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so.10* lib/
cp /usr/lib/liblapack.so.3* lib/
cp /usr/lib/x86_64-linux-gnu/libminizip.so.1* lib/
cp /usr/lib/x86_64-linux-gnu/libsuperlu.so.4* lib/
cp /usr/lib/x86_64-linux-gnu/libsz.so.2* lib/
cp /usr/lib/x86_64-linux-gnu/liburiparser.so.1* lib/
cp /usr/lib/x86_64-linux-gnu/libaec.so.0* lib/
cp /usr/lib/x86_64-linux-gnu/libgfortran.so.3* lib/
cp -R /usr/share/sumo/tools/traci .
cp -R /usr/share/sumo/tools/sumolib .
sudo apt-get autoremove sumo sumo-tools
cd $HOME/software
tar -cvjSf sumo-1.1.0.tar.bz2 sumo
Reference: http://sumo.dlr.de/wiki/Installing/MacOS_Build_w_Homebrew
Download Sumo sources (sumo-src-0.30.0.tar.gz) in $HOME/software/sumo-0.30.0 from:
https://sourceforge.net/projects/sumo/files/sumo/version%200.30.0/
cd $HOME/software/sumo-0.30.0
brew update
brew install Caskroom/cask/xquartz
brew install gdal
brew install proj
brew install xerces-c
brew install homebrew/x11/fox
brew uninstall --ignore-dependencies python # python is a dependency of gdal, we prefer to use the Python of the system
export CPPFLAGS="$CPPFLAGS -I/opt/X11/include/"
export LDFLAGS="-L/opt/X11/lib"
./configure CXX=clang++ --with-xerces=/usr/local --with-proj-gdal=/usr/local
make -jX
mkdir sumo-0.30-mac
cp -r bin sumo-0.30-mac/bin
cp -r data sumo-0.30-mac/data
mkdir sumo-0.30-mac/tools
cp -r tools/traci sumo-0.30-mac/tools/traci
cp -r tools/sumolib sumo-0.30-mac/tools/sumolib
cp tools/randomTrips.py sumo-0.30-mac/tools
cp tools/route2trips.py sumo-0.30-mac/tools
# find dependencies: otool -L duarouter netedit netconvert sumo sumo-gui | grep /usr/local | sed -e 's/ (.*//;s/^\s*//' | sort | uniq
cp /usr/local/opt/fox/lib/libFOX-1.6.0.dylib sumo-0.30-mac/bin
cp /usr/local/opt/freetype/lib/libfreetype.6.dylib sumo-0.30-mac/bin
cp /usr/local/opt/jpeg/lib/libjpeg.9.dylib sumo-0.30-mac/bin
cp /usr/local/opt/libpng/lib/libpng16.16.dylib sumo-0.30-mac/bin
cp /usr/local/opt/libtiff/lib/libtiff.5.dylib sumo-0.30-mac/bin
cp /usr/local/opt/proj/lib/libproj.12.dylib sumo-0.30-mac/bin
cp /usr/local/opt/xerces-c/lib/libxerces-c-3.1.dylib sumo-0.30-mac/bin
cp /usr/local/opt/gdal/lib/libgdal.1.dylib sumo-0.30-mac/bin
cp /usr/local/opt/json-c/lib/libjson-c.2.dylib sumo-0.30-mac/bin
cp /usr/local/opt/freexl/lib/libfreexl.1.dylib sumo-0.30-mac/bin
cp /usr/local/opt/geos/lib/libgeos_c.1.dylib sumo-0.30-mac/bin
cp /usr/local/opt/giflib/lib/libgif.7.dylib sumo-0.30-mac/bin
cp /usr/local/opt/libgeotiff/lib/libgeotiff.2.dylib sumo-0.30-mac/bin
cp /usr/local/opt/libspatialite/lib/libspatialite.7.dylib sumo-0.30-mac/bin
cp /usr/local/opt/sqlite/lib/libsqlite3.0.dylib sumo-0.30-mac/bin
cp /usr/local/opt/pcre/lib/libpcre.1.dylib sumo-0.30-mac/bin
cp /usr/local/opt/libxml2/lib/libxml2.2.dylib sumo-0.30-mac/bin
cp /usr/local/opt/liblwgeom/lib/liblwgeom-2.1.5.dylib sumo-0.30-mac/bin
cp /usr/local/Cellar/geos/3.6.2/lib/libgeos-3.6.2.dylib sumo-0.30-mac/bin
chmod u+w sumo-0.30-mac/bin/*dylib*
# create deps.py as described bellow
cd sumo-0.30-mac/bin
python deps.py
cd ../..
tar -czvf sumo-0.30-mac.tar.gz sumo-0.30-mac
# File: deps.py
from subprocess import call
import os
executables = [
"sumo",
"sumo-gui",
"netconvert",
"netedit",
"duarouter"
]
libraries = [
"/usr/local/opt/fox/lib/libFOX-1.6.0.dylib",
"/usr/local/opt/freetype/lib/libfreetype.6.dylib",
"/usr/local/opt/jpeg/lib/libjpeg.9.dylib",
"/usr/local/opt/libpng/lib/libpng16.16.dylib",
"/usr/local/opt/libtiff/lib/libtiff.5.dylib",
"/usr/local/opt/proj/lib/libproj.12.dylib",
"/usr/local/opt/xerces-c/lib/libxerces-c-3.1.dylib",
"/usr/local/opt/gdal/lib/libgdal.1.dylib",
"/usr/local/opt/json-c/lib/libjson-c.2.dylib",
"/usr/local/opt/freexl/lib/libfreexl.1.dylib",
"/usr/local/opt/geos/lib/libgeos_c.1.dylib",
"/usr/local/opt/giflib/lib/libgif.7.dylib",
"/usr/local/opt/libgeotiff/lib/libgeotiff.2.dylib",
"/usr/local/opt/libspatialite/lib/libspatialite.7.dylib",
"/usr/local/opt/sqlite/lib/libsqlite3.0.dylib",
"/usr/local/opt/pcre/lib/libpcre.1.dylib",
"/usr/local/opt/libxml2/lib/libxml2.2.dylib",
"/usr/local/opt/liblwgeom/lib/liblwgeom-2.1.5.dylib",
"/usr/local/Cellar/geos/3.6.2/lib/libgeos-3.6.2.dylib"
]
def command(cmd):
print cmd
call(cmd.split())
for lA in libraries:
lAName = os.path.basename(lA)
command("install_name_tool -id @loader_path/%s %s" % (lAName, lAName))
for lB in libraries:
lBName = os.path.basename(lB)
command("install_name_tool -change %s @loader_path/%s %s" % (lB, lBName, lAName))
for executable in executables:
for l in libraries:
lName = os.path.basename(l)
command("install_name_tool -change %s @loader_path/%s %s" % (l, lName, executable))
Download Sumo windows 64bits precompiled package (sumo-win64-0.30.0.zip) and extract it in $HOME/software/sumo-0.30.0 from:
https://sourceforge.net/projects/sumo/files/sumo/version%200.30.0/
cd $HOME/software/sumo-win64-0.30.0/sumo-0.30.0
mkdir sumo-0.30-windows
cp -r bin sumo-0.30-windows/bin
cp -r data sumo-0.30-windows/data
mkdir sumo-0.30-windows/tools
cp -r tools/traci sumo-0.30-windows/tools/traci
cp -r tools/sumolib sumo-0.30-windows/tools/sumolib
cp tools/randomTrips.py sumo-0.30-windows/tools
cp tools/route2trips.py sumo-0.30-windows/tools
zip -r sumo-0.30-windows.zip sumo-0.30-windows
Finally upload the file on the ftp.