Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update libosmium to 2.18.0. Fix problem with Docker image build. #6303

Merged
merged 1 commit into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 24 additions & 13 deletions .github/workflows/osrm-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ jobs:
./scripts/format.sh && ./scripts/error_on_dirty.sh
node ./scripts/validate_changelog.js
npm run docs && ./scripts/error_on_dirty.sh

docker-image:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks that we won’t have problem like this again

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add continue-on-error: false to this job in that case.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

needs: format-taginfo-docs
runs-on: ubuntu-22.04
continue-on-error: false
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Docker build
run: |
docker build -f docker/Dockerfile .

build-test-publish:
needs: format-taginfo-docs
Expand Down Expand Up @@ -78,13 +89,13 @@ jobs:
OSRM_CONNECTION_RETRIES: 10
OSRM_CONNECTION_EXP_BACKOFF_COEF: 1.5

- name: clang-5.0-debug
- name: clang-6.0-debug
continue-on-error: false
node: 12
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Debug
CLANG_VERSION: 5.0.0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had build errors on 5.0, I think it is okay to update it to 6.0.

CLANG_VERSION: 6.0.0
CUCUMBER_TIMEOUT: 60000

- name: clang-11.0-debug-clang-tidy
Expand Down Expand Up @@ -113,7 +124,7 @@ jobs:
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
CLANG_VERSION: 5.0.0
CLANG_VERSION: 6.0.0
ENABLE_CONAN: ON

- name: gcc-11-release
Expand Down Expand Up @@ -230,7 +241,7 @@ jobs:
node: 12
runs-on: ubuntu-20.04
BUILD_TYPE: Release
CLANG_VERSION: 5.0.0
CLANG_VERSION: 6.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
Expand All @@ -241,7 +252,7 @@ jobs:
node: 12
runs-on: ubuntu-20.04
BUILD_TYPE: Debug
CLANG_VERSION: 5.0.0
CLANG_VERSION: 6.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
Expand All @@ -252,7 +263,7 @@ jobs:
node: 14
runs-on: ubuntu-20.04
BUILD_TYPE: Release
CLANG_VERSION: 5.0.0
CLANG_VERSION: 6.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
Expand All @@ -263,7 +274,7 @@ jobs:
node: 14
runs-on: ubuntu-20.04
BUILD_TYPE: Debug
CLANG_VERSION: 5.0.0
CLANG_VERSION: 6.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
Expand All @@ -275,7 +286,7 @@ jobs:
node: 16
runs-on: ubuntu-20.04
BUILD_TYPE: Release
CLANG_VERSION: 5.0.0
CLANG_VERSION: 6.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
Expand All @@ -286,7 +297,7 @@ jobs:
node: 16
runs-on: ubuntu-20.04
BUILD_TYPE: Debug
CLANG_VERSION: 5.0.0
CLANG_VERSION: 6.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
Expand All @@ -311,7 +322,7 @@ jobs:
node: 16
runs-on: ubuntu-20.04
BUILD_TYPE: Release
CLANG_VERSION: 5.0.0
CLANG_VERSION: 6.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
Expand All @@ -323,7 +334,7 @@ jobs:
node: 16
runs-on: ubuntu-20.04
BUILD_TYPE: Debug
CLANG_VERSION: 5.0.0
CLANG_VERSION: 6.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
Expand All @@ -346,7 +357,7 @@ jobs:
node: "lts/*"
runs-on: ubuntu-20.04
BUILD_TYPE: Release
CLANG_VERSION: 5.0.0
CLANG_VERSION: 6.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
Expand All @@ -357,7 +368,7 @@ jobs:
node: "lts/*"
runs-on: ubuntu-20.04
BUILD_TYPE: Debug
CLANG_VERSION: 5.0.0
CLANG_VERSION: 6.0.0
ENABLE_GLIBC_WORKAROUND: ON
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- FIXED: Fix bug with reading Set values from Lua scripts. [#6285](https://github.com/Project-OSRM/osrm-backend/pull/6285)
- FIXED: Bug in bicycle profile that caused exceptions if there is a highway=bicycle in the data. [#6296](https://github.com/Project-OSRM/osrm-backend/pull/6296)
- Build:
- CHANGED: Update libosmium to version 2.18.0. [#6303](https://github.com/Project-OSRM/osrm-backend/pull/6303)
- CHANGED: Remove EXACT from find_package if using Conan. [#6299](https://github.com/Project-OSRM/osrm-backend/pull/6299)
- CHANGED: Configure Undefined Behaviour Sanitizer. [#6290](https://github.com/Project-OSRM/osrm-backend/pull/6290)
- CHANGED: Use Conan instead of Mason to install code dependencies. [#6284](https://github.com/Project-OSRM/osrm-backend/pull/6284)
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ RUN apt-get update && \
COPY . /src
WORKDIR /src

RUN NPROC=${BUILD_CONCURRENCY:-$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1)} echo "Building OSRM ${DOCKER_TAG}" && \
RUN NPROC=${BUILD_CONCURRENCY:-$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1)} && \
echo "Building OSRM ${DOCKER_TAG}" && \
git show --format="%H" | head -n1 > /opt/OSRM_GITSHA && \
echo "Building OSRM gitsha $(cat /opt/OSRM_GITSHA)" && \
mkdir -p build && \
Expand Down
28 changes: 27 additions & 1 deletion third_party/libosmium/.clang-tidy
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
---
Checks: '*,-android-cloexec-*,-bugprone-branch-clone,-bugprone-macro-parentheses,-cert-dcl21-cpp,-cert-err58-cpp,-clang-analyzer-optin.cplusplus.VirtualCall,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-macro-usage,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-vararg,-fuchsia-*,-google-runtime-references,-hicpp-avoid-c-arrays,-hicpp-invalid-access-moved,-hicpp-no-array-decay,-hicpp-no-assembler,-hicpp-vararg,-misc-macro-parentheses,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,-modernize-avoid-c-arrays,-modernize-make-unique,-modernize-raw-string-literal,-modernize-use-trailing-return-type,-readability-avoid-const-params-in-decls,-readability-implicit-bool-cast,-readability-implicit-bool-conversion,-readability-magic-numbers'
Checks: '*,-abseil-string-find-str-contains,-altera-*,-android-cloexec-*,-bugprone-branch-clone,-bugprone-easily-swappable-parameters,-bugprone-macro-parentheses,-cert-dcl21-cpp,-cert-err58-cpp,-clang-analyzer-optin.cplusplus.VirtualCall,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-macro-usage,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-vararg,-fuchsia-*,-google-runtime-references,-hicpp-avoid-c-arrays,-hicpp-invalid-access-moved,-hicpp-no-array-decay,-hicpp-no-assembler,-hicpp-vararg,-llvmlibc-*,-llvm-qualified-auto,-misc-macro-parentheses,-misc-non-private-member-variables-in-classes,-misc-no-recursion,-misc-unused-parameters,-modernize-avoid-c-arrays,-modernize-make-unique,-modernize-raw-string-literal,-modernize-use-trailing-return-type,-readability-avoid-const-params-in-decls,-readability-function-cognitive-complexity,-readability-identifier-length,-readability-implicit-bool-cast,-readability-implicit-bool-conversion,-readability-magic-numbers,-readability-qualified-auto'
#
# For a list of check options, see:
# https://clang.llvm.org/extra/clang-tidy/checks/list.html
#
# Disabled checks:
#
# abseil-string-find-str-contains
# We don't want the dependency.
#
# altera-*
# Doesn't apply.
#
# android-cloexec-*
# O_CLOEXEC isn't available on Windows making this non-portable.
#
# bugprone-branch-clone
# Nice idea but collides but with switch statements we'll need to use
# fall-throughs to fix this, which is also bad.
#
# bugprone-easily-swappable-parameters
# Interesting test, but not something we can do much about in many places.
#
# bugprone-macro-parentheses
# False positive in the only place where it reports something and
# disabling locally doesn't work.
Expand Down Expand Up @@ -87,6 +96,14 @@ Checks: '*,-android-cloexec-*,-bugprone-branch-clone,-bugprone-macro-parentheses
# hicpp-vararg
# Too strict, sometimes calling vararg functions is necessary.
#
# llvm-qualified-auto
# readability-qualified-auto
# This reports too many cases. Typical case is an iterator that might be
# a pointer on one system but some special type on another.
#
# llvmlibc-*
# Doesn't apply to us.
#
# misc-macro-parentheses
# Old name for bugprone-macro-parentheses.
#
Expand All @@ -95,6 +112,9 @@ Checks: '*,-android-cloexec-*,-bugprone-branch-clone,-bugprone-macro-parentheses
# an option "IgnoreClassesWithAllMemberVariablesBeingPublic" which should
# disable this, but it didn't work for me.
#
# misc-no-recursion
# There is nothing wrong with recursion.
#
# misc-unused-parameters
# Can't be fixed, because then Doxygen will complain. (In file
# include/osmium/area/problem_reporter.hpp).
Expand All @@ -117,6 +137,12 @@ Checks: '*,-android-cloexec-*,-bugprone-branch-clone,-bugprone-macro-parentheses
# This is header only library, so the declaration and implementation are
# often the same and we want to have the const in implementations.
#
# readability-function-cognitive-complexity
# Sometimes the large functions are needed.
#
# readability-identifier-length
# Too strict.
#
# readability-implicit-bool-cast
# Old name for readability-implicit-bool-conversion.
#
Expand Down
1 change: 1 addition & 0 deletions third_party/libosmium/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: "https://osmcode.org/sponsors.html"
48 changes: 48 additions & 0 deletions third_party/libosmium/.github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Report problems with the software
about: You found a (possible) bug in libosmium
title: ''
labels: ''
assignees: ''

---

## What version of libosmium are you using?

<!-- Please use the [latest
release](https://github.com/osmcode/libosmium/releases) or master if at all
possible. -->


## What operating system and compiler are you using?

<!-- Also what Linux distribution if applicable, OS version? -->


## Tell us something about your system

<!-- How much RAM do you have, how many CPUs, bare metal or cloud setup? -->


## What did you do exactly?

<!-- Please provide the command(s) you used including all options etc. Include
links to input files. -->


## What did you expect to happen?

<!-- Describe in detail what you expected the above would do. -->


## What did happen instead?

<!-- Please describe what happened and why you think this is wrong. Please
include (or link to, if it is too verbose) the log output. -->


## What did you do to try analyzing the problem?

<!-- Describe what steps you already did to try analyzing the problem before
reporting. -->

4 changes: 4 additions & 0 deletions third_party/libosmium/.github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contact_links:
- name: help.osm.org
url: https://help.openstreetmap.org/
about: Ask questions and get support from the community.
10 changes: 10 additions & 0 deletions third_party/libosmium/.github/actions/build-windows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Windows Build

runs:
using: composite
steps:
- name: Build
run: cmake --build . --config Release --verbose
shell: bash
working-directory: build

10 changes: 10 additions & 0 deletions third_party/libosmium/.github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Build

runs:
using: composite
steps:
- name: Build
run: make VERBOSE=1
shell: bash
working-directory: build

13 changes: 13 additions & 0 deletions third_party/libosmium/.github/actions/cmake-windows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Windows CMake

runs:
using: composite
steps:
- name: Create build directory
run: mkdir build
shell: bash
- name: Configure
run: cmake -LA .. -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DBUILD_HEADERS=OFF -DBUILD_BENCHMARKS=ON -DOsmium_DEBUG=TRUE -DPROTOZERO_INCLUDE_DIR=${GITHUB_WORKSPACE}/../protozero/include
shell: bash
working-directory: build

19 changes: 19 additions & 0 deletions third_party/libosmium/.github/actions/cmake/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CMake

runs:
using: composite
steps:
- name: Create build directory
run: mkdir build
shell: bash
- name: Configure
run: |
cmake -LA .. \
-DBUILD_DATA_TESTS=ON \
-DUSE_CPP_VERSION=${CPP_VERSION} \
-DWITH_PROJ=${WITH_PROJ} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DPROTOZERO_INCLUDE_DIR=${GITHUB_WORKSPACE}/../protozero/include
shell: bash
working-directory: build

10 changes: 10 additions & 0 deletions third_party/libosmium/.github/actions/ctest-windows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Windows Test

runs:
using: composite
steps:
- name: Test
run: ctest --output-on-failure -C Release
shell: bash
working-directory: build

10 changes: 10 additions & 0 deletions third_party/libosmium/.github/actions/ctest/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: ctest

runs:
using: composite
steps:
- name: Test
run: ctest --output-on-failure
shell: bash
working-directory: build

13 changes: 13 additions & 0 deletions third_party/libosmium/.github/actions/install-macos/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Install homebrew packages on macOS

runs:
using: composite
steps:
- name: Install packages
run: |
brew install \
boost \
gdal \
google-sparsehash
shell: bash

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Install Protozero from git

runs:
using: composite
steps:
- name: Install from git
run: git clone --quiet --depth 1 https://github.com/mapbox/protozero.git ../protozero
shell: bash

23 changes: 23 additions & 0 deletions third_party/libosmium/.github/actions/install-ubuntu/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Install apt packages on Ubuntu/Debian

runs:
using: composite
steps:
- name: Install packages
run: |
sudo apt-get update -q
sudo apt-get install -yq \
doxygen \
libboost-dev \
libgdal-dev \
libgeos++-dev \
liblz4-dev \
libproj-dev \
libsparsehash-dev \
ruby-json \
spatialite-bin
test "$CC" = clang-6.0 && sudo apt-get install -yq --no-install-suggests --no-install-recommends clang-6.0
test "$CC" = clang-8 && sudo apt-get install -yq --no-install-suggests --no-install-recommends clang-8
test "$CC" = clang-13 && sudo apt-get install -yq --no-install-suggests --no-install-recommends clang-13
shell: bash

Loading