Skip to content

Linux Support

Harald Steinlechner edited this page Nov 2, 2018 · 5 revisions

Aardvark Setup

General Setup

  1. install Mono >= 5.0 (used for paket and build script)
  2. install DotNet
  3. install VS Code + ionide (optional)
  4. newest graphics driver

Distro specific information

Ubuntu Dependencies

apt-get install libvulkan-dev libdevil-dev libassimp-dev libturbojpeg0-dev

Arch Dependencies

Build dependencies

  1. mono pacman -S mono (tested on 5.10.1)
  2. pacman -S dotnet-sdk
  3. yaourt -S msbuild-stable (msbuild not included in mono package)
  4. at the time of writing there is no official fsharp package. I used yaourt -S fsharp
  5. vscode via yaourt -S visual-studio-code-bin (optional)

Runtime dependencies

  1. for rendering you need graphics driver
  2. runtime dependencies pacman -S vulkan-icd-loader libjpeg-turbo devil (note that the devil package does not include )
  3. there is a bug in dotnet core. i use the following TERM=xterm according to, https://github.com/dotnet/core/issues/1284

the thing with ldlibrarypath + $(OutputPath) does not seem to work on arch (when started from project dir) works: TERM=xterm LD_LIBRARY_PATH=/home/hs/template/bin/Debug/netcoreapp2.0 dotnet run no work:TERM=xterm LD_LIBRARY_PATH=. dotnet run in bin/Debug/netcoreapp2.0 this works: TERM=xterm LD_LIBRARY_PATH=. dotnet app.dll

LD_LIBRARY_PATH

The current .NET core runtime (2.0) does not use the applications working directory for library resolution, which does not play well with Aardvark components. For resolving this issue we recommend to set the LD_LIBRARY_PATH='.'' globally in your .bashrc or similar. That way all .NET-Core apps will use their working directory for library probing. If you don't like the global variable you can just use LD_LIBRARY_PATH=. dotnet MyApp.dll to start your application.

All Templates take care of setting that variable via VS-Code settings.json but when running projects from the command-line you will still need to set it manually.

Note that on some systems the settings.json trick did not work. What worked however was to use launch.json + environment (found the info here):

    "configurations": [
        {
            "name": ".NET Core Launch (console)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "${workspaceFolder}/bin/Debug/netcoreapp2.0/yeah.dll",
            "args": [],
            "environment": [
                {
                    "name": "LD_LIBRARY_PATH",
                    "value": "${workspaceFolder}/bin/Debug/netcoreapp2.0/"
                }
            ],
            "cwd": "${workspaceFolder}/bin/Debug/netcoreapp2.0/",
            "console": "internalConsole",
            "stopAtEntry": false,
            "internalConsoleOptions": "openOnSessionStart"
        },

WorkingDirectory

.NET-Core applications will (by default) use your current directory as working directory when started via the command line. This also doesn't play well with Aardvark components and we therefore recommend adding

<PropertyGroup>
  <RunWorkingDirectory>$(OutputPath)</RunWorkingDirectory>
</PropertyGroup>

to your project files. This ensures that the apps working directory is always in the output-folder when using dotnet run or similar commands.

Troubleshooting

An unhandled exception of type 'System.TypeInitializationException' occurred in Aardvark.Rendering.Vulkan.dll: 'The type initializer for 'Aardvark.Rendering.Vulkan.Instance' threw an exception.'
 Inner exceptions found, see $exception in variables window for more details.
 Innermost exception 	 System.DllNotFoundException : Unable to load shared library 'vulkan-1' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libvulkan-1: cannot open shared object file: No such file or directory
   at Aardvark.Rendering.Vulkan.VkRaw.vkEnumerateInstanceLayerProperties(UInt32* pPropertyCount, VkLayerProperties* pProperties)
   at <StartupCode$Aardvark-Rendering-Vulkan>.$Platform..cctor()```


Clone this wiki locally
You can’t perform that action at this time.