Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build rt-wdf library on Linux #1

Open
Rezzonics opened this issue May 3, 2021 · 1 comment
Open

How to build rt-wdf library on Linux #1

Rezzonics opened this issue May 3, 2021 · 1 comment

Comments

@Rezzonics
Copy link

Rezzonics commented May 3, 2021

I built the lv2 plugin but it crashes:
jackd: JackAudioDriver::ProcessGraphAsyncMaster: Process error

@rerdavies
Copy link

rerdavies commented Sep 9, 2021

Run journalctl to see if any error messages are thrown.

On Raspbian 5.10.35, the jack client crashes due to unsatisfied linkages in librt-wdf.so (referenced by rt-wdf_lv2).

The problem seems to relate to incorrect configuration of Armadillo in the out-of-the-box installation of Armadillo (perhaps), and non-matching compiler defines for librt-wdf, and rt-wdf_lv2 headers (definitely).

The problem can be corrected by adding the define -DARMA_DONT_USE_WRAPPER to both builds, and adding -llapack and -lblas to the CXX linkage for rt-wdf.lv2 (assuming you have liblapack-dev and libblas-dev installed). The defines have to be added to BOTH projects to get the fix to stick. I'm not quite sure why not providing the define to rt-wdf_lv2 builds causes librt-wdf.so to reference a non-existent linkage; but it does. This is the fix for Raspbian, which comes with Armadillo, blas and lapack pre-installed. More capable Linuxen may use different math library backends (e.g. openblas, or Intel numerics libraries), or may even have none of the above.

The core issue is that Armadillo builds flexibly target available scientific libraries (openblas/blas, and lapack and/or Intel matrix libraries) and those .so libraries are configured at build time. If you build Armadillo from source, the problem will probably go away. Using -DARMA_DONT_USE_WRAPPER (with appropriate explicitly provided libraries) seems to work around the problem on Linux.

Quite possibly, the issue could be fixed by providing a real package build of rt-wdf. which would pull in compile information in from the currently installed Armadillo package information. That seems to be the way Armadillo wants things to be done. And also the way the rt-wdf_lv2 build expects things to be done. rt-wdf_lv2 actually does the right thing, referencing package defines for for the currently-nonexistent rt-wdf package.

So the correct fix would be to provide rt-wdf with a proper package build, instead of no build procedure at all (the current state of affairs).

I'm currently sitting on a pull request that provides a Linux CMake build for rt-wdf. But I'm not sure I have a total handle on how the Armadillo package import is supposed to work. I'll report back if I do manage to get it merged with rt-wdf.

Painful stuff, considering that Armadillo is most definitely not the right way to handle matrices in the implementation. (Pretty sure they can be solved symbolically in closed form at pre-processing time, which will run a good order of magnitude faster given the size and sparsity of those matrices. I think,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants