Page 1 of 1
Re: Link LLVM statically in binary releases
Posted: 07 Mar 2018 09:18
by kjetil
I need to look at how this was done on the computer used for building binaries, but I don't think using dynamic library vs. using static library had anything to do with the problems. I don't remember whether I built llvm statically or dynamically, but if it was dynamically, the dynamic libraries would have been included with Radium (in the "lib" folder), and then there shouldn't have been a difference (?).
I don't remember now, but I think the problems had something to do with incompatible ABI between LLVM and the system libc, or something like that. When Radium didn't work with the latest ubuntu, I couldn't include the faust dev instrument. A workaround would have been to make the whole faust dev instrument as a dynamic library, but that would have been a lot of work.
Re: Link LLVM statically in binary releases
Posted: 07 Mar 2018 09:55
by kjetil
I think 4.0.2 was the latest version where the faust dev instrument was included in linux:
http://users.notam02.no/~kjetism/radium ... emo.tar.xz
I checked now, and in 4.0.2, llvm was linked statically.
Re: Link LLVM statically in binary releases
Posted: 18 Jan 2019 18:47
by teteros
My original post in to this thread since it got deleted by accident (thanks google cache):
Hi Kjetil, I have a suggestion for the linux binary builds of radium.
Radium's
downloads page writes:
The Linux binares does not include the Faust Development instrument since it's difficult to make LLVM binaries work across distributions. In case you want the Faust Development instrument, you should compile Radium manually.
I agree, and it is indeed an
issue that had to be sort out every time LLVM updated in a linux distribution until new LLVM versions stopped working with radium's bundled
faust at all.
I wrote about some problems I've stumbled upon when building radium with LLVM linked dynamically on the
AUR package comments section.
For instance on AMD, mesa's gallium/radeon driver requires LLVM on runtime, not only for make/compile. This means installing any other llvm than system llvm (that mesa is linked with) will cause errors on startup of any OpenGL or Vulkan application on systems that use Gallium accel.
It seems to be a known issue and the llvm-dev
mailing list has recommended either hacking the build script or linking LLVM statically.
Linking LLVM statically when building radium and faust package turned out to be straightforward.
needs to use the
flags instead of just --libs
in the faust and radium (build_linux_common.sh) build scripts.
You can see my
PKGBUILD patch for reference.
Note that the patch uses llvm-config-4.0 which is LLVM 4.0.1 with renamed paths to avoid conflicts with system LLVM5+
I believe LLVM is linked statically in Windows and Mac OS X demo builds of radium, so it seems strange to me that radium on linux is build without faustdev at all, while faust itself still needs to be compiled as part of the radium QT5 build.
Though faust being linked dynamically with LLVM does not cause the above conflicts as it is a command-line application, and is only used for building the instruments in radium's case anyway.
Having to compile radium on linux to be able to use faust functionality is difficult as there is manual patching involved that is different on every distribution, so I think having it build-in the binaries will make radium be less overlooked as an interactive faust environment.