Skip to content

Commit

Permalink
Merge pull request #583 from norlab-ulaval/dev-build-add-bionic-speci…
Browse files Browse the repository at this point in the history
…fic-gcc-install-requirement--nmo-585

dev-build-add-bionic-specific-gcc-install-requirement--nmo-585
Note: Build [#222](http://132.203.26.125:8111/buildConfiguration/LibpointmatcherBuildSystem_BuildAndTestMultiArchCiBuildAndTestDockerImages/8608?hideTestsFromDependencies=false&hideProblemsFromDependencies=false&expandPull+Request+Details=true&expandBuildChangesSection=true&expandBuildDeploymentsSection=false) has passed. The failed build msg was sent by the subsequent build triggered by a doc update commit.
  • Loading branch information
RedLeader962 committed Aug 15, 2024
2 parents 057f73a + fb2360e commit bafdda9
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 36 deletions.
1 change: 0 additions & 1 deletion build_system/.env
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ COMPOSE_PROJECT_NAME=libpointmatcher
## Unmute BUILDKIT_PROGRESS to set globaly for debugging dockerfile
## For debuging docker build localy, use `docker build --progress=plain --no-cache` flags instead
#BUILDKIT_PROGRESS=plain

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="bash lpm_crawl_libpointmatcher_build_matrix.bash › build &lt;service&gt; &lt;popup&gt;" type="ShConfigurationType" folderName="[LPM] C | Execute compose over build matrix" editBeforeRun="true">
<option name="SCRIPT_TEXT" value="bash lpm_crawl_libpointmatcher_build_matrix.bash --repository-version-build-matrix-override latest --os-name-build-matrix-override ubuntu --fail-fast -- build ci_PR_arm64v8" />
<option name="SCRIPT_TEXT" value="bash lpm_crawl_libpointmatcher_build_matrix.bash --repository-version-build-matrix-override latest --os-name-build-matrix-override ubuntu --fail-fast -- build ci_PR_arm64" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
Expand All @@ -16,4 +16,4 @@
</envs>
<method v="2" />
</configuration>
</component>
</component>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="bash lpm_crawl_libpointmatcher_build_matrix.bash › build ci_PR_arm64v8 &lt;popup&gt;" type="ShConfigurationType" folderName="[LPM] C | Execute compose over build matrix" editBeforeRun="true">
<option name="SCRIPT_TEXT" value="bash lpm_crawl_libpointmatcher_build_matrix.bash --repository-version-build-matrix-override latest --os-name-build-matrix-override ubuntu --cmake-build-type-build-matrix-override Release --ubuntu-version-build-matrix-override jammy --fail-fast -- build ci_PR_arm64v8" />
<configuration default="false" name="bash lpm_crawl_libpointmatcher_build_matrix.bash › build ci_PR_arm64 &lt;popup&gt;" type="ShConfigurationType" folderName="[LPM] C | Execute compose over build matrix" editBeforeRun="true">
<option name="SCRIPT_TEXT" value="bash lpm_crawl_libpointmatcher_build_matrix.bash --repository-version-build-matrix-override latest --os-name-build-matrix-override ubuntu --cmake-build-type-build-matrix-override Release --ubuntu-version-build-matrix-override jammy --fail-fast -- build ci_PR_arm64" />
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
<option name="SCRIPT_PATH" value="" />
<option name="SCRIPT_OPTIONS" value="" />
Expand All @@ -16,4 +16,4 @@
</envs>
<method v="2" />
</configuration>
</component>
</component>

This file was deleted.

1 change: 1 addition & 0 deletions build_system/docker-compose.dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
target: libpointmatcher-dependencies-general
context: ..
dockerfile: ${NBS_SUPERPROJECT_BUILD_SYSTEM_DIR:?err}/ubuntu/Dockerfile.dependencies
no_cache: true
platforms:
- "linux/amd64"
- "linux/arm64/v8"
Expand Down
2 changes: 1 addition & 1 deletion build_system/docker-compose.libpointmatcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
build:
context: ..
dockerfile: ${NBS_SUPERPROJECT_BUILD_SYSTEM_DIR:?err}/ubuntu/Dockerfile.libpointmatcher.compilation_test
no_cache: false
no_cache: true
target: test-compilation-auto-path-resolution
platforms:
- "linux/amd64"
Expand Down
35 changes: 35 additions & 0 deletions build_system/lpm_crawl_libpointmatcher_build_matrix.teamcity.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

# ....Architecture..............................................
TC_LPM_BUILD_ARCH=%TC_LPM_BUILD_ARCH%
if [[ -z ${TC_LPM_BUILD_ARCH} ]]; then
TC_LPM_BUILD_ARCH=ci_PR_multiarch
fi
echo "Build architecture: ${TC_LPM_BUILD_ARCH}"

# ....Setup flags for dn_build_all.bash.........................
LPM_CRAWL_BUILD_MATRIX_FLAGS=()
# Add flag from TeamCity custom parameters
LPM_CRAWL_BUILD_MATRIX_FLAGS+=($(echo %LPM_CRAWL_BUILD_MATRIX_FLAGS% | tr " " "\n"))
if [[ -n "${LPM_CRAWL_BUILD_MATRIX_FLAGS}" ]]; then
echo "LPM_CRAWL_BUILD_MATRIX_FLAGS=("
for each in "${LPM_CRAWL_BUILD_MATRIX_FLAGS[@]}" ; do
echo " ${each}"
done
echo ")"
fi

LPM_CRAWL_BUILD_MATRIX_FLAGS+=("--repository-version-build-matrix-override" "latest")
LPM_CRAWL_BUILD_MATRIX_FLAGS+=("--fail-fast")
LPM_CRAWL_BUILD_MATRIX_FLAGS+=("--" "build" "${TC_LPM_BUILD_ARCH:?err}")

# ....Dry-run..............................................
TC_DRY_RUN=%TC_DRY_RUN%
if [[ ${TC_DRY_RUN} == true ]]; then
echo "Run in dry-run mode"
LPM_CRAWL_BUILD_MATRIX_FLAGS+=("--dry-run")
fi

# ....Final.....................................................
echo -e "execute: bash lpm_crawl_libpointmatcher_build_matrix.bash ${LPM_CRAWL_BUILD_MATRIX_FLAGS[*]}"
bash lpm_crawl_libpointmatcher_build_matrix.bash "${LPM_CRAWL_BUILD_MATRIX_FLAGS[@]}"
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ LPM_ROOT_DIR="$(dirname "${_PATH_TO_SCRIPT}")"
cd "${LPM_ROOT_DIR}/../../"

# ====begin========================================================================================
#bash lpm_crawl_libpointmatcher_build_matrix.bash --fail-fast -- build --dry-run ci_PR_amd64 ci_PR_arm64v8
#bash lpm_crawl_libpointmatcher_build_matrix.bash --fail-fast -- build --dry-run ci_PR_amd64 ci_PR_arm64
bash lpm_crawl_libpointmatcher_build_matrix.bash --fail-fast -- build --dry-run
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ LPM_ROOT_DIR="$(dirname "${_PATH_TO_SCRIPT}")"
cd "${LPM_ROOT_DIR}/../../"

# ====begin========================================================================================
#bash lpm_crawl_libpointmatcher_build_matrix.bleeding.bash --fail-fast -- build --dry-run ci_PR_amd64 ci_PR_arm64v8
#bash lpm_crawl_libpointmatcher_build_matrix.bleeding.bash --fail-fast -- build --dry-run ci_PR_amd64 ci_PR_arm64
bash lpm_crawl_libpointmatcher_build_matrix.bleeding.bash --fail-fast -- build --dry-run
18 changes: 17 additions & 1 deletion build_system/ubuntu/lpm_install_dependencies_general_ubuntu.bash
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ sudo apt-get update &&
curl \
wget \
git \
software-properties-common \
&& sudo apt-get install --assume-yes "${APT_FLAGS[@]}" \
g++ \
gcc \
g++ \
catch \
make \
cmake \
Expand All @@ -87,6 +88,21 @@ sudo apt-get update &&

##cmake --version

# Retrieve ubuntu version number: DISTRIB_RELEASE
source /etc/lsb-release
print_msg "Ubuntu version is ${DISTRIB_RELEASE}"
if [[ ${DISTRIB_RELEASE} == '18.04' ]]; then
# Update Bionic outdated compiler
# Ref https://github.com/norlab-ulaval/libpointmatcher/pull/581#issuecomment-2284415233
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update &&
sudo apt-get install --assume-yes "${APT_FLAGS[@]}" \
gcc-9 \
g++-9 &&
sudo rm -rf /var/lib/apt/lists/*
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
fi

n2st::teamcity_service_msg_blockClosed
# .................................................................................................

Expand Down
21 changes: 17 additions & 4 deletions doc/Compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ This tutorial will guide you through the different steps to install libpointmatc
### Dependencies
Libpointmatcher relies on a number of standard libraries, most of which can be installed with standard package managers. The following table lists the minimum requirements necessary to instal libpointmatcher.

| Library name | cmake | boost | eigen | yaml-cpp | libnabo | doxygen (opt.) |
|:-------------|:------:|:------:|:-------:|:--------:|:-------:|:--------------:|
| **Version** | 3.10.2 | 1.65.1 | 3.3.4-4 | 0.5 | 1.1.1 | 1.8.13-10 |
| Library name | g++ | cmake | boost | eigen | yaml-cpp | libnabo | doxygen (opt.) |
|:-------------|-------|:------:|:------:|:-------:|:--------:|:-------:|:--------------:|
| **Version** | 9.4.0 | 3.10.2 | 1.65.1 | 3.3.4-4 | 0.5 | 1.1.1 | 1.8.13-10 |

## Detailed Installation Instructions
The rest of this tutorial will guide you through the different requirements step by step.
Expand All @@ -52,11 +52,24 @@ The rest of this tutorial will guide you through the different requirements step
Some installation steps are platform-dependent and need to be done beforehand.

=== "Ubuntu"
You will need to install the GNU Compiler Collection, also known as GCC. The minimum supported version is 7.5.0.
You will need to install the GNU Compiler Collection, also known as GCC. The minimum supported version is 9.4.0.
```bash
sudo apt update
sudo apt install build-essential
```

??? warning "Ubuntu 18 Bionic"

While newer versions of Ubuntu come with gcc and g++ on newer versions than 9.4.0 and support all modern C++17 standard library features, it is not the case for Ubuntu Bionic.
You will therefore need to install it manually.
Run
```shell
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update &&
sudo apt-get install gcc-9 g++-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
```

=== "MacOS"
###### Installing Xcode via the App Store (OS X 10.10.2 and later)

Expand Down
6 changes: 3 additions & 3 deletions doc/contributing/contributing_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ cd <path/to/libpointmatcher>/build_system
bash lpm_crawl_libpointmatcher_build_matrix.bash --fail-fast -- build ci_PR

# Run a specific case using build flags with multi-architecture
# virtualization using "ci_PR_amd64" and "ci_PR_arm64v8" services
# virtualization using "ci_PR_amd64" and "ci_PR_arm64" services
bash lpm_crawl_libpointmatcher_build_matrix.bash \
--repository-version-build-matrix-override latest \
--os-name-build-matrix-override ubuntu \
--cmake-build-type-build-matrix-override RelWithDebInfo \
--ubuntu-version-build-matrix-override jammy \
--fail-fast \
-- build ci_PR_amd64 ci_PR_arm64v8
-- build ci_PR_amd64 ci_PR_arm64

# Read the help for details
bash lpm_crawl_libpointmatcher_build_matrix.bash --help
Expand Down Expand Up @@ -135,4 +135,4 @@ See [Commit Message References](commit_msg_reference.md) for details.
- (in-progress) and it triggers the _semantic release automation_

## Writing Documentation
The documentation is located in the /doc folder and uses the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) Markdown framework.
The documentation is located in the /doc folder and uses the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) Markdown framework.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ markdown_extensions:
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
- pymdownx.details
- attr_list
- md_in_html
nav:
Expand Down

0 comments on commit bafdda9

Please sign in to comment.