Сборка OSRM - построение маршрутов

Hi Alex,

I don’t see a CakeCache.txt.

I tried adding this
SET PATH=%PATH%;c:\libs\lib;c:\libs\include;
set CMAKE_LIBRARY_PATH =c:\libs\lib;c:\libs\include;
prior to the cmake command. Same issue.

The bzlib.h header is located in c:\libs\include.

Sorry, CMakeCache.txt in build folder.
You need to edit it or pass options directly to cmake:

cmake ..  ..........    -DBZIP2_INCLUDE_DIR=c:\libs\include  -DBZIP2_LIBRARIES=c:\libs\lib\libbz2.lib  

(I used http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz and bat-file to compile:

cd bzip2-1.0.6
nmake /f makefile.msc
copy /y *.lib d:\libs\lib\
copy /y bzlib.h d:\libs\include

should be run from the x64 command prompt)
SET PATH should not be needed.
Check that libbz2.lib exist in lib folder and bzlibh.h in include folder. Copy them manually if needed.

Hi Alex,


I deleted bzip2-1.0.6 and the two zlib files (I first tried to nmake, with simular errors there).
Next I downloaded the new bzip, compiled and copied the two files.

Then I added the parameter -DBZIP2_INCLUDE_DIR=%PREFIX%/include to the cmake command of OSRM.

Please add it to your instruction set (also where to get the bzip source code).

Thank you for your support and patience,

Nice to hear! Dennis started to integrate the patches into main OSRM repository, check https://github.com/DennisOSRM/Project-OSRM/pull/979#issuecomment-39839617

I have updated the instruction and specify supported bzip/zlib/libzml expicitly.

Thank you for testing and detailed feedback!

Good news.

I experimented with router.exe. Cool and fast! I want to extract total km’s and driving hours for trucks, so using should do the trick. And setting up the right lua.

I don’t know where to ask (I can’t find a discussion area in the project) so I’ll ask you. I don’t need a server and read about a standalone routing machine at https://github.com/DennisOSRM/Project-OSRM/wiki/osrm.7 I can’t find it somewhere, do you know it is present and where to find/call it?

Hi Alex,

I was planning to send this message to the group, but I think it has something to do with your translation, otherwise some others should have ask some questions much earlier.

I’m setting the speed profile to truck. I’m calling the extractor “osrm-extract -p truck.lua”

My truck.lua is a copy of car.lua, with only lower average speeds per type of road. In the output I see the truck.lua is loaded.

What I didn’t expect is that its speed is too high. I see for several main roads 100 km/hour, its max speed. This exceeds the average speeds by plenty.
Eg this is what I see in one of the roads (a highway):
And I see this for another highway with max 120 km/hour:

I noticed you now have a different car.lua. I used that one and the speeds are about the same, but what I don’t get is that you use:
local max_speed = parse_maxspeed( way.tags:Find(“maxspeed”) )*maxspeed_reduction

Next I downloaded the car.lua direct from the project and did the extraction once more. Same issue, the duration is based on the max speed.

Github issues will be better for such questions, I was just building for local restriction testing.
lua files in .zip are from from the latest develop version from git.
Maybe other formum members can help.

Considering auto-routing: you can write C++ route calculation code based on Tools/simpleClient.cpp (or just modify it)
or access OSRM service on localhost with some scripts, like Ruby (copy-paste code from existing route.rb, routing.rb ,nearest.rb etc.).

Ok, will post this issue in the group. I’ll do an extra check with the foot.lua this evening/tomorrow.

Now I’m working with c#, it’s no problem getting the json values from router.exe. I’ll have a look at the simpleclient, altough my C skills are a bit rusty (last time I used it was about 20 years ago).

Hi Alex,

I tested making the project using Visual Studio 2013. It works in Release mode and makes me easier to understand how all things works. Thanks!
Maybe you can add in the readme under Notes section “Visual Studio 12 Win64”: Set the project in Release mode and build ALL_BUILD.

In debug you get all type of mismatch errors in luabind. If I remove all the “-DCMAKE_BUILD_TYPE=Release” in the build_other.bat, I only receive this error when compiling OSRM in debug mode: Error 52 error LNK1190: invalid fixup found, type 0x02A9 e:\osrm\Project-OSRM\build\libboost_regex-vc120-mt-gd-1_55.lib(instances.obj) osrm-datastore
I created boost using “bjam toolset=msvc address-model=64 runtime-link=shared --prefix=%PREFIX% -sBZIP2_SOURCE=”%src%\bzip2-1.0.6" -sZLIB_SOURCE=“%src%\zlib-1.2.8” install"

Most Maybe boost just did not build correctly (insufficient drvie space, for example…)?

To be sure you may need to build in different folder completely (to avoid old libraries). Better replace -DCMAKE_BUILD_TYPE=Release with -DCMAKE_BUILD_TYPE=Debug to be sure (however, I did not remeber such things, building full boost was necessary and maybe luabind).

Рад вам сообщить, что OSRM наконец-то официально поддерживает Windows!

Код подержки Visual Studio 2013 (включая Express) уже в основной ветке разработки https://github.com/DennisOSRM/Project-OSRM/tree/develop
нашими совместными усилиями c Деннисом. Я так и не понял, зачем мне это надо было :slight_smile:
(кроме кучи опыта работы с git и cmake и ознакомления с С++ 11).

Автогенерируемые бинарные сборки вот тут: http://build.project-osrm.org
Графический (веб-) интерфейс и батники обработки пока не включены - сделаю чуть попозже, как и XP64-Server2003-сборку.
Пробуйте, пользуйтесь, жалуйтесь :smiley:

akks, очень даже нужно.
Буду пробовать после Сотм)

для windows x32 будет?

Официально-автоматических не будет (vs express не тянет и поддерка не гарантируется), на своей машине напишу батник и буду иногда запускать. Будет ли нормально работать - не знаю (последние работали?)

Там есть настройки компилятора для XP, но насколько оно будет работать непонятно.

Вот полная “официальная” сборка с веб-интерфейсом (из файлов http://build.project-osrm.org и GIT-репозиториев):

Кому хочется упаковывать из интернета самому и чаще меня - вот мой сборочный комплект (нужен только Git for Windows, запускать pack.bat, результат в папке OSRM и архиве):

Попытки XP и 32 бит - завтра вечером (настраиваю зоопарк библиотек на домашней машине) :slight_smile:

Забыл предупредить: последняя тестовая версия пока всё ещё изредка путается в запретах поворотов:
Так что для промышленного использования чуть-чуть подождите )

Готова 32-битная сборка, совместимая с WinXP:

Собрана MinGW, так что может работать в несколько раз медленнее.

спасибо. на windows 8.1 x32, команды работают. в работе еще не проверил

Для комплекта: сборка Visual Studio 64 бит с поддержкой Windows XP: