pnorman / osmborder

Convert admin relations to render borders
24 stars 20 forks source link

Unable to compile - cannot find osmium #8

Closed nyurik closed 7 years ago

nyurik commented 7 years ago

On Ubuntu 16.04:

sudo apt install libosmium2-dev zlib1g-dev
# Installed:  libosmium2-dev: 2.6.0-2    zlib1g-dev:  1:1.2.8.dfsg-2ubuntu4
/mnt/tiles/osmborder$ git clone https://github.com/pnorman/osmborder.git
cd osmborder
mkdir build
cd build
cmake ..

Build results: https://gist.github.com/nyurik/280facb823bda8378ba12cb941aef064

dpkg -L libosmium2-dev shows all headers are in /usr/include/osmium, one file /usr/include/gdalcpp.hpp, and some examples in /usr/share/doc/libosmium2-dev

Also, there is no /usr/include/osmium/version.hpp per FindOsmium.cmake#L75

nyurik commented 7 years ago

Building both libs by hand, change the paths vars if needed:

LIBOSMIUM=/mnt/tiles/libosmium
git clone https://github.com/osmcode/libosmium.git $LIBOSMIUM
cd $LIBOSMIUM
mkdir build && cd build
cmake ..
make
cd ../..

export OSMIUM_INCLUDE_DIR=$LIBOSMIUM/include/osmium

sudo apt install zlib1g-dev

OSMBORDER=/mnt/tiles/osmborder
git clone https://github.com/pnorman/osmborder.git $OSMBORDER
cd $OSMBORDER
mkdir build && cd build
cmake ..
make