From 1cf1b86d734a6e538dd554562be4d0ce1ddafefa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Tue, 7 Nov 2023 11:34:04 +0100 Subject: [PATCH] Document build for debian 12, Ubuntu 22.04 and Ubuntu 23.04 (#1694) * Add build instructions for Debian 12 & Ubuntu 23.04 (#1692) * add install instructions for debian bookworm - switch to new libwxgtk * fix package requirements for debian 12 install * use Ubuntu/Debian or more specific versions as needed * Minor changes --------- Co-authored-by: Florian Maurer --- docs/build/1-Development-requirements.md | 68 +++++++++++++----------- docs/build/2-Dependencies-install.md | 24 ++++++--- docs/build/3-Build.md | 20 +++---- docs/build/5-Installer-creation.md | 6 +-- docs/build/continuous-integration.md | 6 +-- src/CMakeLists.txt | 2 +- 6 files changed, 72 insertions(+), 54 deletions(-) diff --git a/docs/build/1-Development-requirements.md b/docs/build/1-Development-requirements.md index 891cbe9cc4..3c91bfca8d 100644 --- a/docs/build/1-Development-requirements.md +++ b/docs/build/1-Development-requirements.md @@ -13,32 +13,37 @@ The compilation of *antares-xpansion* requires C++17 support. Some external repositories must be enabled - === "Centos 7 (EPEL)" - ``` - sudo yum install epel-release - sudo yum install centos-release-scl - ``` - - === "Centos 8 (PowerTools)" - ``` - sudo yum install dnf-plugins-core - sudo yum config-manager --set-enabled PowerTools - ``` - - You can then use a more recent version of GCC by enabling `devtoolset-9` : - ``` - sudo yum install devtoolset-9 - ``` - - Before compiling *antares-xpansion* we must launch a new shell with `scl` tool : - ``` - scl enable devtoolset-9 bash - ``` -=== "Ubuntu" +=== "Centos 7 (EPEL)" - ``` - sudo apt install build-essential - ``` +``` +sudo yum install epel-release +sudo yum install centos-release-scl +``` + +=== "Centos 8 (PowerTools)" + +``` +sudo yum install dnf-plugins-core +sudo yum config-manager --set-enabled PowerTools +``` + +You can then use a more recent version of GCC by enabling `devtoolset-9` : +``` +sudo yum install devtoolset-9 +``` + +Before compiling *antares-xpansion* we must launch a new shell with `scl` tool : +``` +scl enable devtoolset-9 bash +``` + +=== "Ubuntu/Debian" + +For building on Debian 12 or Ubuntu 23.04 the installation requires the following build and test dependencies: + +``` + sudo apt install git unzip build-essentials +``` ## [CMake version](#cmake-version) CMake 3.x must be used. @@ -51,7 +56,7 @@ CMake 3.x must be used. sudo yum install epel-release sudo yum install cmake3 ``` -=== "Ubuntu" +=== "Ubuntu/Debian" ``` sudo apt install cmake @@ -63,15 +68,17 @@ Python 3.x is used for end-to-end test. === "Windows" You can download latest Windows version directly from [Python website](https://www.python.org/downloads/windows/). + === "Centos" ``` sudo yum install python3 python3-pip ``` -=== "Ubuntu" + +=== "Ubuntu/Debian" ``` - sudo apt-get install python3 python3-pip + sudo apt install python3 python3-pip ``` Required python modules can be installed with : @@ -85,6 +92,7 @@ Git version must be above 2.15 for external dependencies build because `--ignore === "Windows" You can download latest Windows version directly from [Git website](https://gitforwindows.org/). + === "Centos" ``` @@ -97,8 +105,8 @@ Git version must be above 2.15 for external dependencies build because `--ignore source /opt/rh/rh-git227/enable ``` -=== "Ubuntu" +=== "Ubuntu/Debian" ``` - sudo apt-get install git + sudo apt install git ``` diff --git a/docs/build/2-Dependencies-install.md b/docs/build/2-Dependencies-install.md index 067402dfa7..1fc76e6f62 100644 --- a/docs/build/2-Dependencies-install.md +++ b/docs/build/2-Dependencies-install.md @@ -6,12 +6,12 @@ - [OR-Tools](https://github.com/rte-france.com/or-tools) (fork from [Google](https://github.com/google/or-tools)) - [wxWidgets](https://github.com/wxWidgets/wxWidgets) (Only for the complete Antares Simulator solution with GUI) -- Boost librairies : test (Only for unit tests) +- Boost libraries : test (Only for unit tests) -This section describes the install procedures for the third-party Open source libraries used by *ANTARES*. -The install procedure can be done +This section describes the installation procedures for the third-party Open source libraries used by *ANTARES*. +The installation procedure can be done -- by compiling the sources after cloning the official git repository +- by compiling the sources after cloning the official git repository (see [here](3-Build.md) for more informations) - by using a package manager ## Install with package manager @@ -53,11 +53,17 @@ The install procedure can be done sudo yum install cmake3 devtoolset-9 sudo yum install libuuid-devel unzip wxGTK3-devel boost-test boost-devel ``` -=== "Ubuntu (apt-get)" +=== "Ubuntu 20.04 or 22.04 / Debian 11 (apt)" ``` - sudo apt-get install uuid-dev libwxgtk3.0-gtk3-dev - sudo apt-get install libboost-test-dev + sudo apt install uuid-dev libwxgtk3.0-gtk3-dev + sudo apt install libboost-test-dev + ``` + +=== "Ubuntu 23.04 / Debian 12 (apt)" + + ``` + sudo apt install uuid-dev libwxgtk3.2-dev libboost-test-dev ``` ## Automatic libraries compilation from git @@ -67,6 +73,8 @@ Apart from OR-Tools, all dependencies can be built at configure time using the o You can set `-DBUILD_ORTOOLS=ON` to download & build OR-Tools. It is also possible to use a precompiled archive, see below. +For compiling the package yourself from git, additional build dependencies are needed (see [here](1-Development-requirements.md)). + ### Pre-compiled OR-Tools : release+static only You can [download](https://github.com/rte-france/or-tools/releases) a precompiled OR-Tools archive that contains headers & static libraries. @@ -75,7 +83,7 @@ Please note that dynamic linking with OR-Tools is only supported in Linux. Decompress the archive, and provide its path as a `CMAKE_PREFIX_PATH`. If you use XPRESS, you may need also to specify `XPRESS_ROOT`. ### Defining dependency install directory -When using multiple directories for antares development with multiple branches it can be useful to have a common dependency install directory. +When using multiple directories for Antares development with multiple branches it can be useful to have a common dependency install directory. Dependency install directory can be specified with `DEPS_INSTALL_DIR`. By default install directory is `/../rte-antares-deps-` diff --git a/docs/build/3-Build.md b/docs/build/3-Build.md index a918b63d6b..1cc36392b7 100644 --- a/docs/build/3-Build.md +++ b/docs/build/3-Build.md @@ -1,8 +1,8 @@ # Build -Before build, make sure that dependencies are installed (see [here](2-Dependencies-install.md) for more informations) +Before build, make sure that dependencies are installed (see [here](2-Dependencies-install.md) for more informations). -## Environnement settings -On Centos enable `devtoolset-9` and `rh-git227`: +## Environment settings +On CentOS enable `devtoolset-9` and `rh-git227`: ``` scl enable devtoolset-9 bash source /opt/rh/rh-git227/enable @@ -19,12 +19,12 @@ git submodule update --init src/antares-deps ``` cmake -B _build -S [antares_src] -DVCPKG_ROOT=[vcpkg_root] -DVCPKG_TARGET_TRIPLET=[vcpkg-triplet] -DCMAKE_BUILD_TYPE=release ``` -=== "Centos" +=== "CentOS" ``` cmake3 -B _build -S [antares_src] -DCMAKE_BUILD_TYPE=release ``` -=== "Ubuntu" +=== "Ubuntu/Debian" ``` cmake -B _build -S [antares_src] -DCMAKE_BUILD_TYPE=release @@ -42,7 +42,7 @@ Here is a list of available CMake configure option : |`BUILD_TESTING`| Enable test build (default `OFF`)| |`BUILD_ORTOOLS`| Enable build for OR-Tools and its dependencies (requires an Internet connecton)| -Additionnal options for windows +Additional options for windows |Option |Description | |:-------|-------| @@ -55,15 +55,17 @@ Additionnal options for windows ``` cmake --build _build --config release -j8 ``` -=== "Centos" +=== "CentOS" ``` cmake3 --build _build --config release -j8 ``` -=== "Ubuntu" +=== "Ubuntu/Debian" ``` cmake --build _build --config release -j8 ``` Note : -> Compilation can be done on several processor with ```-j``` option. +> Compilation can be done on several processors with `-j` option. + +The final GUI file can be executed at `_build/ui/simulator/antares-8.7-ui-simulator` \ No newline at end of file diff --git a/docs/build/5-Installer-creation.md b/docs/build/5-Installer-creation.md index 2d888ff768..5b723ddbe8 100644 --- a/docs/build/5-Installer-creation.md +++ b/docs/build/5-Installer-creation.md @@ -33,7 +33,7 @@ CPack can be used to create the installer after the build phase : sudo yum install wxGTK3 ``` -=== "Ubuntu" +=== "Ubuntu/Debian" ### Ubuntu .deb (Experimental) ``` @@ -49,5 +49,5 @@ CPack can be used to create the installer after the build phase : ### Required system libraries There are still some system libraries that must be installed if you want to use *ANTARES*: ``` - sudo apt-get install libwxgtk3.0-gtk3-0v5 - ``` \ No newline at end of file + sudo apt install libwxgtk3.0-gtk3-0v5 + ``` diff --git a/docs/build/continuous-integration.md b/docs/build/continuous-integration.md index b826084dec..507c170099 100644 --- a/docs/build/continuous-integration.md +++ b/docs/build/continuous-integration.md @@ -5,9 +5,9 @@ Here is a description of workflow with their associated status : | OS | .yml | Description | Status | |:-------|--------|--------|------| -| Ubuntu |`ubuntu-system.yml`|Compilation with system libraries (apt-get) and pre-compiled not system libraries use| [![Status][ubuntu_precompiled_svg]][ubuntu_precompiled_link] | -| Ubuntu |`ubuntu-system-deps-build.yml`|Compilation with system libraries (apt-get) and not system libraries compilation| [![Status][ubuntu_deps_build_svg]][ubuntu_deps_build_link] | -| Ubuntu |`ubuntu-release.yml`|Compilation with system libraries (apt-get) and not system libraries compilation for release creation| [![Status][ubuntu_release_svg]][ubuntu_release_link] +| Ubuntu |`ubuntu-system.yml`|Compilation with system libraries (apt) and pre-compiled not system libraries use| [![Status][ubuntu_precompiled_svg]][ubuntu_precompiled_link] | +| Ubuntu |`ubuntu-system-deps-build.yml`|Compilation with system libraries (apt) and not system libraries compilation| [![Status][ubuntu_deps_build_svg]][ubuntu_deps_build_link] | +| Ubuntu |`ubuntu-release.yml`|Compilation with system libraries (apt) and not system libraries compilation for release creation| [![Status][ubuntu_release_svg]][ubuntu_release_link] | Windows |`windows-vcpkg.yml`|Compilation with VCPKG use and pre-compiled not system libraries use| [![Status][windows_precompiled_svg]][windows_precompiled_link] | | Windows |`windows-pre-compiled-only.yml`|Compilation without VCPKG and with pre-compiled libraries use| [![Status][windows_precompiled_only_svg]][windows_precompiled_only_link] | | Windows |`windows-vcpkg.yml`|Compilation with VCPKG use and pre-compiled not system libraries use for release creation| [![Status][windows_release_svg]][windows_release_link] | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7570b715dd..02740859c9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -436,7 +436,7 @@ else() set(CPACK_PACKAGE_VERSION_MINOR ${ANTARES_VERSION_LO}) set(CPACK_PACKAGE_VERSION_PATCH ${ANTARES_VERSION_REVISION}${ANTARES_VERSION_TAG}) - set(CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.0-gtk3-0v5") + set(CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.0-gtk3-0v5 | libwxgtk3.2-dev") set(CPACK_RPM_PACKAGE_REQUIRES "wxGTK3") set(CPACK_RPM_PACKAGE_AUTOREQPROV "0")