Skip to content

Commit

Permalink
Document build for debian 12, Ubuntu 22.04 and Ubuntu 23.04 (#1694)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
flomnes and maurerle authored Nov 7, 2023
1 parent f6c8f7f commit 1cf1b86
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 54 deletions.
68 changes: 38 additions & 30 deletions docs/build/1-Development-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
Expand All @@ -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 :
Expand All @@ -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"

```
Expand All @@ -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
```
24 changes: 16 additions & 8 deletions docs/build/2-Dependencies-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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.

Expand All @@ -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 `<antares_checkout_dir>/../rte-antares-deps-<build_type>`

Expand Down
20 changes: 11 additions & 9 deletions docs/build/3-Build.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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 |
|:-------|-------|
Expand All @@ -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`
6 changes: 3 additions & 3 deletions docs/build/5-Installer-creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```
Expand All @@ -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
```
sudo apt install libwxgtk3.0-gtk3-0v5
```
6 changes: 3 additions & 3 deletions docs/build/continuous-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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] |
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 1cf1b86

Please sign in to comment.