728x90
디버그 모드 고 릴리즈 모드로 빌드 하는 것을 해보겠습니다.
1. 필수 라이브러리 설치
pacman -S mingw-w64-clang-x86_64-boost
pacman -S mingw-w64-clang-x86_64-tbb
pacman -S mingw-w64-clang-x86_64-lua
2. cmake 옵션
rm -Rf *
cmake -G "MSYS Makefiles" \
-DCMAKE_CXX_FLAGS="-fno-lto -Wmisleading-indentation -DTOBEE" \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--subsystem,console -Wl,-e,mainCRTStartup -lws2_32" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SYSTEM_NAME=Windows \
-DBOOST_INCLUDEDIR=/clang64/include/boost \
-DBOOST_LIBRARYDIR=/clang64/lib \
-DTBB_DIR=/clang64/lib/cmake/TBB \
-DLUA_INCLUDE_DIR=/clang64/include \
-DLUA_LIBRARIES=/clang64/lib \
-DCMAKE_INSTALL_PREFIX=/C/DEV/GIS/OSRM/Backend_Exec/Release \
..
3. 빌드 및 설치
make -j5
make install
4. 변경한 소스들
5. OSRM 데이터 빌드
다운로드:
https://tiles.osm.kr/download/
Chat gpt 교수님 왈:
CH 환경
osrm-extract -p /path/to/profile.lua /path/to/map.osm.pbf
osrm-contract /path/to/map.osrm
예:
@ECHO osrm-extract.exe -p %OSRM_SRC%\profiles\car.lua %OSRM_HOME%\osrm_data\raw_south_korea\south-korea-latest.osm.pbf
@ECHO osrm-extract.exe -p %OSRM_SRC%\profiles\car.lua %OSRM_HOME%\osrm_data\raw_seoul\seoul-non-military.osm.pbf
@ECHO osrm-contract.exe %OSRM_HOME%\osrm_data\raw_seoul\seoul-non-military.osm.pbf
@ECHO osrm-contract.exe %OSRM_HOME%\osrm_data\raw_south_korea\south-korea-latest.osm
@ECHO osrm-extract.exe -p %OSRM_SRC%\profiles\car.lua %OSRM_HOME%\osrm_data\raw_south_korea\south-korea-latest-non-military.osm.pbf
@ECHO osrm-extract.exe -p %OSRM_SRC%\profiles\car.lua %OSRM_HOME%\osrm_data\raw_south_korea\south-korea-latest.osm.pbf
MLD 환경
# 1. 데이터 추출
osrm-extract --algorithm mld -p car.lua map.osm.pbf
# 2. 데이터 파티셔닝
osrm-partition map.osrm
# 3. 데이터 맞춤화
osrm-customize map.osrm
# 4. OSRM 서버 실행
osrm-routed --algorithm mld map.osrm
배치파일 몇개
그냥 내 입맛대로 만들어 보았습니다.
오류
1.
stack index 3, expected number, received number: not a numeric type that fits exactly an integer (number maybe has significant decimals) (bad argument into 'void(unsigned char)')
stack traceback:
[C]: in metamethod 'newindex'
C:/DEV/GIS/OSRM/osrm-backend/profiles/lib/guidance.lua:112: in function 'lib/guidance.set_classification'
C:/DEV/GIS/OSRM/osrm-backend/profiles/lib/way_handlers.lua:108: in function 'lib/way_handlers.classification'
C:/DEV/GIS/OSRM/osrm-backend/profiles/lib/way_handlers.lua:711: in function 'lib/way_handlers.run'
C:\DEV\GIS\OSRM\\osrm-backend\profiles\car.lua:465: in function 'process_way'
[2024-11-29T17:40:19.613363] [error] [exception] Lua error (see stderr for traceback)
참고사이트
https://github.com/Project-OSRM/osrm-backend/wiki/Building-OSRM
728x90
'프로그래밍' 카테고리의 다른 글
좋은 C 메인 함수를 작성하는 방법 (0) | 2025.01.11 |
---|---|
[Windows 환경] MSYS2, MinGW64 용 OSRM 빌드하기 (0) | 2024.11.28 |
[Windows 환경] MSYS2, Clang64 및 Visual Studio Code (0) | 2024.11.25 |
[Windows 환경] MSYS2, Clang64 및 Visual Studio Code 사용 (0) | 2024.11.24 |
Spring Boot AOP (0) | 2024.02.27 |