diff --git a/web/content/docs/devguide/advanced/conan-package-manager.md b/web/content/docs/devguide/advanced/conan-package-manager.md index 8e9f597a0ab3c1f9bd8fcfa580375bc36fe2d92d..2fb442165bb5016d3a78fe86ae560b9b7c8f50a2 100644 --- a/web/content/docs/devguide/advanced/conan-package-manager.md +++ b/web/content/docs/devguide/advanced/conan-package-manager.md @@ -20,6 +20,8 @@ The [Conan package manager](https://www.conan.io) helps to install all required ## 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: - `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 - `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. +### 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 - [Conan Blog](https://blog.conan.io) diff --git a/web/content/docs/devguide/troubleshooting/run.md b/web/content/docs/devguide/troubleshooting/run.md new file mode 100644 index 0000000000000000000000000000000000000000..6f901e4ec8185b282c6298c311f9e9e198fb5471 --- /dev/null +++ b/web/content/docs/devguide/troubleshooting/run.md @@ -0,0 +1,50 @@ ++++ +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.