Skip to content
Snippets Groups Projects
Verified Commit 8c0aafca authored by Lars Bilke's avatar Lars Bilke
Browse files

[web] Added troubleshooting for runtime issues.

Added instructions on adapting shared library load paths.
Added note on using Conans runtime environments.
parent cf9cd628
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,8 @@ The [Conan package manager](https://www.conan.io) helps to install all required ...@@ -20,6 +20,8 @@ The [Conan package manager](https://www.conan.io) helps to install all required
## Advanced usage ## Advanced usage
### Build packages locally
Per default when Conan is enabled it will try to fetch prebuilt binaries from the [OGS Conan repository](https://ogs.jfrog.io/ogs/conan/) at <https://ogs.jfrog.io/ogs/api/conan/conan>. With the CMake option `OGS_CONAN_BUILD` you define what gets build locally. This option can be set to: Per default when Conan is enabled it will try to fetch prebuilt binaries from the [OGS Conan repository](https://ogs.jfrog.io/ogs/conan/) at <https://ogs.jfrog.io/ogs/api/conan/conan>. With the CMake option `OGS_CONAN_BUILD` you define what gets build locally. This option can be set to:
- `missing` - Default, only builds packages which are not available as a prebuilt binary for the current configuration - `missing` - Default, only builds packages which are not available as a prebuilt binary for the current configuration
...@@ -27,6 +29,16 @@ Per default when Conan is enabled it will try to fetch prebuilt binaries from th ...@@ -27,6 +29,16 @@ Per default when Conan is enabled it will try to fetch prebuilt binaries from th
- `never` - Builds no package locally - `never` - Builds no package locally
- `[a list of libraries to build]`, e.g. `"Eigen3;Boost"`. For names see [ConanSetup.cmake](https://gitlab.opengeosys.org/ogs/ogs/-/blob/master/scripts/cmake/ConanSetup.cmake). Make sure to set this back to 'never' after the libs have been built. Otherwise it would rebuild the libs on the next CMake run. - `[a list of libraries to build]`, e.g. `"Eigen3;Boost"`. For names see [ConanSetup.cmake](https://gitlab.opengeosys.org/ogs/ogs/-/blob/master/scripts/cmake/ConanSetup.cmake). Make sure to set this back to 'never' after the libs have been built. Otherwise it would rebuild the libs on the next CMake run.
### Conan environment
Conan creates a [runtime environment](https://docs.conan.io/en/latest/mastering/virtualenv.html#virtualrunenv-generator) automatically. When activated this sets environment variables such as `PATH` or `LD_LIBRARY_PATH` to point to the used Conan packages. Can be activated in your build directory after CMake ran:
```bash
source activate_run.sh
...
source deactivate_run.sh
```
## Further information ## Further information
- [Conan Blog](https://blog.conan.io) - [Conan Blog](https://blog.conan.io)
......
+++
date = "2020-09-28"
title = "Run"
author = "Lars Bilke"
weight = 1045
[menu]
[menu.devguide]
parent = "troubleshooting"
identifier = "run-troubleshooting"
+++
This page describes errors you get at runtime of OGS, e.g. when executing the `ogs`-executable or some utilities.
## Error message: `error while loading shared libraries` / `XX.dll could not be found or libXX.so could not be found.`
### Linux / macOS
Typical error message:
```
error while loading shared libraries: libXX.so: cannot open shared object file: No such file or directory
```
A shared library which was linked to OGS could not be found during runtime. The runtime search paths are determined by the system configuration but you add paths with the environment variable `LD_LIBRARY_PATH` (macOS: `DYLD_LIBRARY_PATH`). So you know where the missing library is located you can adapt the environment variable:
```bash
export LD_LIBRARY_PATH=/path/to/missing/lib:$LD_LIBRARY_PATH
./ogs
```
More information can be found here:
- https://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
- https://amir.rachum.com/blog/2016/09/17/shared-libraries/#runtime-search-path
If you use Conan you want to activate its [runtime environment]({{< relref "conan-package-manager.md#conan-environment" >}}).
One can see with the `ldd` (macOS: `otool -L`) tool which dynamic libraries will be loaded at runtime.
### Windows
Typical error message:
```
XX.dll could not be found.
```
Similar to Linux but on Windows you need to adapt the `PATH` environment variable.
One can use the [Dependencies](https://github.com/lucasg/Dependencies)-tool to see which DLLs will be loaded at runtime.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment