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

Can't compile on Linux #2

Open
erwan35 opened this issue Sep 29, 2023 · 32 comments
Open

Can't compile on Linux #2

erwan35 opened this issue Sep 29, 2023 · 32 comments

Comments

@erwan35
Copy link

erwan35 commented Sep 29, 2023

Hello,

Thanks for your job on the porting of this cool synth !

I'm using Debian Bullseye but i'm not able to compile.

Am I supposed to get some SDK ?

Can you please help ?

Thanks
Erwan

compile_synth.txt

@erwan35 erwan35 changed the title Can't compile Can't compile on Linux Sep 29, 2023
@ftoledo
Copy link

ftoledo commented Sep 30, 2023

same here... i think that need the vst sdk from Steinberg...Maybe can be disabled the vst2 build and just build vst3 version.

@fractalf
Copy link

fractalf commented Oct 1, 2023

Yea, same here...
I tried building it according to instructions in a docker container with all deps

FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install \
    build-essential \
    g++ \
    libasound2-dev \
    libjack-jackd2-dev \
    ladspa-sdk \
    libcurl4-openssl-dev \
    libfreetype6-dev \
    libx11-dev \
    libxcomposite-dev \
    libxcursor-dev \
    libxcursor-dev \
    libxext-dev \
    libxinerama-dev \
    libxrandr-dev \
    libxrender-dev \
    libwebkit2gtk-4.0-dev \
    libglu1-mesa-dev mesa-common-dev

After the last command is done, there are errors

...
make: *** [Makefile:348: build/intermediate/Release/VASTQFilterCoefficients_c6918b2.o] Error 1
make: *** [Makefile:323: build/intermediate/Release/VASTDelay_38201eee.o] Error 1
make: *** [Makefile:313: build/intermediate/Release/VASTBiQuadFilter_cf85de05.o] Error 1
make: *** [Makefile:343: build/intermediate/Release/VASTQFilter_bb3cbc34.o] Error 1
make: Leaving directory '/code/Vaporizer2/VASTvaporizer/Builds/LinuxMakefile'

Searching the terminal for errors I get these

../../Source/Engine/Filter/../Utils/VASTSynthfunctions.h:1070:25: error: 'arc4random' was not declared in this scope; did you mean 'srandom'?
 1070 |         fNoise = (float)arc4random();
      |                         ^~~~~~~~~~
      |                         srandom

../../../JUCE/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp:68:11: fatal error: pluginterfaces/vst2.x/vstfxstore.h: No such file or directory
   68 |  #include "pluginterfaces/vst2.x/vstfxstore.h"
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c

Some files are build but..

$ ls -l ./Vaporizer2/VASTvaporizer/Builds/LinuxMakefile/build/intermediate/Release# 

-rw-r--r-- 1 root root 40733 Oct  1 22:18 VASTBiQuadFilter_cf85de05.d
-rw-r--r-- 1 root root 40100 Oct  1 22:18 VASTCombFilter_9e79f598.d
-rw-r--r-- 1 root root 21808 Oct  1 22:18 VASTCombFilter_9e79f598.o
-rw-r--r-- 1 root root 40094 Oct  1 22:18 VASTDelayAPF_2c2d4a53.d
-rw-r--r-- 1 root root 21824 Oct  1 22:18 VASTDelayAPF_2c2d4a53.o
-rw-r--r-- 1 root root 40222 Oct  1 22:18 VASTDelay_38201eee.d
-rw-r--r-- 1 root root 40109 Oct  1 22:18 VASTLPFCombFilter_855aee46.d
-rw-r--r-- 1 root root 22040 Oct  1 22:18 VASTLPFCombFilter_855aee46.o
-rw-r--r-- 1 root root   205 Oct  1 22:17 VASTOnePoleLPF_2be7c583.d
-rw-r--r-- 1 root root  2168 Oct  1 22:17 VASTOnePoleLPF_2be7c583.o
-rw-r--r-- 1 root root 42675 Oct  1 22:18 VASTQFilter_bb3cbc34.d

Are we missing something? Can someone confirm that this is buildable?

@BillyDM
Copy link

BillyDM commented Oct 4, 2023

I'm on Arch and I'm getting the same error as above. It seems that for some reason it tries to use juce_VST3_Wrapper (which depends on the VST2 SDK) even though VST2 is disabled in the Projucer project.

@BillyDM
Copy link

BillyDM commented Oct 4, 2023

Aha! Adding JUCE_VST3_CAN_REPLACE_VST2="0" to the JUCEOPTIONS field in VASTvaporizer.jucer fixed it and I'm able to build it now.

@fractalf
Copy link

fractalf commented Oct 4, 2023

Nice find @BillyDM !
Thanks for updating the repo @KottV !

I still have some problems with this one though..

../../Source/Engine/Filter/../Utils/VASTSynthfunctions.h:1070:25: error: 'arc4random' was not declared in this scope; did you mean 'srandom'?
 1070 |         fNoise = (float)arc4random();
      |                         ^~~~~~~~~~
      |                         srandom

I could try an arch distro in the docker container, but all those dependencies would probably not be the same..

https://askubuntu.com/questions/759169/using-arc4random-on-ubuntu-14-04-trusty

Any idea on how to solve it?

Thanks :)

@fractalf
Copy link

fractalf commented Oct 4, 2023

ps, here's my updated Dockerfile

FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y --no-install-recommends \
    build-essential \
    g++ \
    libasound2-dev \
    libjack-jackd2-dev \
    ladspa-sdk \
    libcurl4-openssl-dev \
    libfreetype6-dev \
    libx11-dev \
    libxcomposite-dev \
    libxcursor-dev \
    libxcursor-dev \
    libxext-dev \
    libxinerama-dev \
    libxrandr-dev \
    libxrender-dev \
    libwebkit2gtk-4.0-dev \
    libglu1-mesa-dev mesa-common-dev \
    git \
    ca-certificates \
    libbsd-dev
WORKDIR /build
RUN git clone -b linux-fixes https://github.com/KottV/Vaporizer2
WORKDIR /build/Vaporizer2
RUN CONFIG=Release make -j8 -C ./JUCE/extras/Projucer/Builds/LinuxMakefile/
RUN ./JUCE/extras/Projucer/Builds/LinuxMakefile/build/Projucer --resave ./VASTvaporizer/VASTvaporizer.jucer
RUN CONFIG=Release make -j1 -C ./VASTvaporizer/Builds/LinuxMakefile/

@KottV
Copy link
Owner

KottV commented Oct 4, 2023

Nice find @BillyDM ! Thanks for updating the repo @KottV !

I still have some problems with this one though..

../../Source/Engine/Filter/../Utils/VASTSynthfunctions.h:1070:25: error: 'arc4random' was not declared in this scope; did you mean 'srandom'?
 1070 |         fNoise = (float)arc4random();
      |                         ^~~~~~~~~~
      |                         srandom

I could try an arch distro in the docker container, but all those dependencies would probably not be the same..

https://askubuntu.com/questions/759169/using-arc4random-on-ubuntu-14-04-trusty

Any idea on how to solve it?

Thanks :)

Hi, what is your distro? arc4random was added in glibc-2.36

Also there is no need for ladspa-sdk libcurl4-openssl-dev libwebkit2gtk-4.0-dev

@fractalf
Copy link

fractalf commented Oct 5, 2023

I'm personally using EndeavourOS, but I like to do most of compiling stuff in a docker container so my system stays clean from all sorts of different dependencies.

I will try to make a docker image for building with arch and see if I can find all the right dependencies.

I got those files you mentioned from here:
https://github.com/KottV/Vaporizer2/blob/linux-fixes/JUCE/docs/Linux%20Dependencies.md

@KottV
Copy link
Owner

KottV commented Oct 5, 2023

@fractalf
build with more recent glibc won't run on a system with an older one
I'll try to fix your issue later, not today.

@ftoledo
Copy link

ftoledo commented Oct 5, 2023

Nice find @BillyDM ! Thanks for updating the repo @KottV !
I still have some problems with this one though..

../../Source/Engine/Filter/../Utils/VASTSynthfunctions.h:1070:25: error: 'arc4random' was not declared in this scope; did you mean 'srandom'?
 1070 |         fNoise = (float)arc4random();
      |                         ^~~~~~~~~~
      |                         srandom

I could try an arch distro in the docker container, but all those dependencies would probably not be the same..
https://askubuntu.com/questions/759169/using-arc4random-on-ubuntu-14-04-trusty
Any idea on how to solve it?
Thanks :)

Hi, what is your distro? arc4random was added in glibc-2.36

Also there is no need for ladspa-sdk libcurl4-openssl-dev libwebkit2gtk-4.0-dev

Same here.. i building on debian 11 that have glibc 2.35. I hope that can be support that version too.
Thanks!

@fractalf
Copy link

fractalf commented Oct 5, 2023

Probably have to use Debian 12. Will try later tonight
https://sources.debian.org/src/glibc/

@fractalf
Copy link

fractalf commented Oct 5, 2023

All right!
It now builds..
..but the plugin crashes hard :(

libcurl4-openssl-dev was definetly needed it seems, but like you said the other two didn'tn

17.96 In file included from ../../JuceLibraryCode/include_juce_core.cpp:9:
17.96 ../../../../modules/juce_core/juce_core.cpp:92:13: fatal error: curl/curl.h: No such file or directory
17.96    92 |    #include <curl/curl.h>
17.96       |             ^~~~~~~~~~~~~
17.96 compilation terminated.

This was my final setup that should work on any system:

Dockerfile

FROM debian:12.1
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y --no-install-recommends \
    build-essential \
    g++ \
    libasound2-dev \
    libjack-jackd2-dev \
    libcurl4-openssl-dev \
    libfreetype6-dev \
    libx11-dev \
    libxcomposite-dev \
    libxcursor-dev \
    libxcursor-dev \
    libxext-dev \
    libxinerama-dev \
    libxrandr-dev \
    libxrender-dev \
    libglu1-mesa-dev mesa-common-dev \
    git \
    ca-certificates \
    libbsd-dev
WORKDIR /build
RUN git clone -b linux-fixes https://github.com/KottV/Vaporizer2
WORKDIR /build/Vaporizer2
RUN CONFIG=Release make -j8 -C ./JUCE/extras/Projucer/Builds/LinuxMakefile/
RUN ./JUCE/extras/Projucer/Builds/LinuxMakefile/build/Projucer --resave ./VASTvaporizer/VASTvaporizer.jucer
RUN CONFIG=Release make -j8 -C ./VASTvaporizer/Builds/LinuxMakefile/

docker-compose.yml

version: "3.7"
services:
    vaporizer2builder:
        build: .
        image: vaporizer2builder
        container_name: vaporizer2builder
        tty: true

Then run it like this

$ docker compose up -d --build
$ docker cp vaporizer2builder:/build/Vaporizer2/VASTvaporizer/Builds/LinuxMakefile/build/VASTvaporizer2.vst3 ~/.vst3

Unfortunately after all this, it doesn't run stable. Can barely hear some sound from it before it crashes hard..

Did any of you get a proper working build?

image

@fractalf
Copy link

fractalf commented Oct 5, 2023

Ok, so I started digging some more..
I thought I might build in an arch linux environment

Here's the Dockerfile that worked:

FROM archlinux:base-20231001.0.182270

RUN pacman -Sy
RUN pacman -S --noconfirm \
    git \
    base-devel \
    freetype2 \
    libx11 \
    libxrandr \
    libxinerama \
    libxcursor \
    alsa-utils \
    jack2 \
    liblsp-r3d-glx-lib
RUN git clone -b linux-fixes https://github.com/KottV/Vaporizer2
WORKDIR /Vaporizer2
RUN CONFIG=Release make -j8 -C ./JUCE/extras/Projucer/Builds/LinuxMakefile/
RUN ./JUCE/extras/Projucer/Builds/LinuxMakefile/build/Projucer --resave ./VASTvaporizer/VASTvaporizer.jucer
RUN CONFIG=Release make -j8 -C ./VASTvaporizer/Builds/LinuxMakefile/

The compiled plugin size differ for each build
image

..and event though the arch build also crashes, it seems to run slightly better.

However the UI doesn't work at all so I'm guessing there's where the problem is..

While compiling there's a whole lot of warnings, but no errors (I searched the output)

I've pretty much reached the end of the tunnel now, hopefully someone else could chip in?

@fractalf
Copy link

fractalf commented Oct 5, 2023

I did one last try on this... went through all the dependencies found here for ubuntu/debian and tried to find the arch equivalent..

https://github.com/juce-framework/JUCE/blob/master/docs/Linux%20Dependencies.md

FROM archlinux:base-20231001.0.182270
RUN pacman -Sy
RUN pacman -S --noconfirm \
    git \
    base-devel \
    freetype2 \
    libx11 \
    libxrandr \
    libxinerama \
    libxcursor \
    alsa-utils \
    jack2 \
    liblsp-r3d-glx-lib \
    libxcomposite \
    webkit2gtk-4.1 \
    glu \
    lsp-plugins \
    ladspa \
    mesa-utils
RUN git clone -b linux-fixes https://github.com/KottV/Vaporizer2
WORKDIR /Vaporizer2
RUN CONFIG=Release make -j8 -C ./JUCE/extras/Projucer/Builds/LinuxMakefile/
RUN ./JUCE/extras/Projucer/Builds/LinuxMakefile/build/Projucer --resave ./VASTvaporizer/VASTvaporizer.jucer
RUN CONFIG=Release make -j8 -C ./VASTvaporizer/Builds/LinuxMakefile/

Still UI glitches/problems/crash.
And that's pretty much where I throw in the towel.
At least for tonight ;)

@KottV
Copy link
Owner

KottV commented Oct 5, 2023

@ftoledo @fractalf 520c458
please do git pull, resave with Projucer, then compile with CONFIG=ReleaseOldGlibc instead of CONFIG=Release

@fractalf
Copy link

fractalf commented Oct 5, 2023

@KottV Now it won't build again

[root@f8e9d097af3f Vaporizer2]# CONFIG=ReleaseOldGlibc make -j8 -C ./JUCE/extras/Projucer/Builds/LinuxMakefile/
make: Entering directory '/Vaporizer2/JUCE/extras/Projucer/Builds/LinuxMakefile'
mkdir: missing operand
Try 'mkdir --help' for more information.
make: [Makefile:144: /jucer_NewProjectWizard_7817a7e4.o] Error 1 (ignored)
mkdir: missing operand
Try 'mkdir --help' for more information.
mkdir: missing operand
Try 'mkdir --help' for more information.
make: [Makefile:149: /jucer_StartPageComponent_de6b22ec.o] Error 1 (ignored)
mkdir: missing operand
Try 'mkdir --help' for more information.
make: [Makefile:154: /jucer_AutoUpdater_ca658dc2.o] Error 1 (ignored)
mkdir: missing operand
Try 'mkdir --help' for more information.
make: [Makefile:159: /jucer_CommandLine_f35de107.o] Error 1 (ignored)
make: [Makefile:164: /jucer_Main_f8488f5b.o] Error 1 (ignored)
mkdir: missing operand
Try 'mkdir --help' for more information.
mkdir: missing operand
Try 'mkdir --help' for more information.
make: [Makefile:174: /jucer_DocumentEditorComponent_bc853a2f.o] Error 1 (ignored)
make: [Makefile:169: /jucer_MainWindow_1e163aeb.o] Error 1 (ignored)
mkdir: missing operand
Try 'mkdir --help' for more information.
make: [Makefile:179: /jucer_OpenDocumentManager_ba866622.o] Error 1 (ignored)
Compiling jucer_NewProjectWizard.cpp
Compiling jucer_AutoUpdater.cpp
Compiling jucer_StartPageComponent.cpp
Compiling jucer_CommandLine.cpp
Compiling jucer_Main.cpp
Compiling jucer_DocumentEditorComponent.cpp
Compiling jucer_MainWindow.cpp
Compiling jucer_OpenDocumentManager.cpp
In file included from ../../Source/Application/jucer_Main.cpp:26:
../../Source/Application/jucer_Headers.h:28:10: fatal error: JuceHeader.h: No such file or directory
   28 | #include <JuceHeader.h>
      |          ^~~~~~~~~~~~~~
In file included from ../../Source/Application/StartPage/jucer_StartPageComponent.cpp:26:
../../Source/Application/StartPage/../jucer_Headers.h:28:10: fatal error: JuceHeader.h: No such file or directory
   28 | #include <JuceHeader.h>
      |          ^~~~~~~~~~~~~~
In file included from ../../Source/Application/jucer_CommandLine.cpp:26:
../../Source/Application/jucer_Headers.h:28:10: fatal error: JuceHeader.h: No such file or directory
   28 | #include <JuceHeader.h>
      |          ^~~~~~~~~~~~~~
In file included from ../../Source/Application/jucer_AutoUpdater.cpp:26:
../../Source/Application/../Application/jucer_Headers.h:28:10: fatal error: JuceHeader.h: No such file or directory
   28 | #include <JuceHeader.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
compilation terminated.
compilation terminated.
compilation terminated.
In file included from ../../Source/CodeEditor/jucer_DocumentEditorComponent.cpp:26:
../../Source/CodeEditor/../Application/jucer_Headers.h:28:10: fatal error: JuceHeader.h: No such file or directory
   28 | #include <JuceHeader.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
In file included from ../../Source/Application/StartPage/jucer_NewProjectWizard.cpp:26:
../../Source/Application/StartPage/../jucer_Headers.h:28:10: fatal error: JuceHeader.h: No such file or directory
   28 | #include <JuceHeader.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
In file included from ../../Source/CodeEditor/jucer_OpenDocumentManager.cpp:26:
../../Source/CodeEditor/../Application/jucer_Headers.h:28:10: fatal error: JuceHeader.h: No such file or directory
   28 | #include <JuceHeader.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
In file included from ../../Source/Application/jucer_MainWindow.cpp:26:
../../Source/Application/../Application/jucer_Headers.h:28:10: fatal error: JuceHeader.h: No such file or directory
   28 | #include <JuceHeader.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:151: /jucer_StartPageComponent_de6b22ec.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:181: /jucer_OpenDocumentManager_ba866622.o] Error 1
make: *** [Makefile:146: /jucer_NewProjectWizard_7817a7e4.o] Error 1
make: *** [Makefile:166: /jucer_Main_f8488f5b.o] Error 1
make: *** [Makefile:171: /jucer_MainWindow_1e163aeb.o] Error 1
make: *** [Makefile:161: /jucer_CommandLine_f35de107.o] Error 1
make: *** [Makefile:156: /jucer_AutoUpdater_ca658dc2.o] Error 1
make: *** [Makefile:176: /jucer_DocumentEditorComponent_bc853a2f.o] Error 1
make: Leaving directory '/Vaporizer2/JUCE/extras/Projucer/Builds/LinuxMakefile'

@fractalf
Copy link

fractalf commented Oct 5, 2023

Do you mind sharing a working build?
...so I can test that it's not my local setup with Bitwig that fails

@KottV
Copy link
Owner

KottV commented Oct 5, 2023

you're compiling Projucer, no need to that
just run:
git pull
CONFIG=Release make -j8 -C ./JUCE/extras/Projucer/Builds/LinuxMakefile/ (if it was deleted)
CONFIG=ReleaseOldGlibc make -j8 -C ./VASTvaporizer/Builds/LinuxMakefile/

@KottV
Copy link
Owner

KottV commented Oct 5, 2023

Do you mind sharing a working build? ...so I can test that it's not my local setup with Bitwig that fails

I use openSUSE TW (glibc 2.38) so it won't run in older system

@fractalf
Copy link

fractalf commented Oct 5, 2023

I'm have the same version

$ ldd --version
ldd (GNU libc) 2.38
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

Ok, so Im doing this now, and it builds, but still the plugin UI is unstable and crashes. Even messes up my window manager..

RUN CONFIG=Release make -j8 -C ./JUCE/extras/Projucer/Builds/LinuxMakefile/
RUN ./JUCE/extras/Projucer/Builds/LinuxMakefile/build/Projucer --resave ./VASTvaporizer/VASTvaporizer.jucer
RUN CONFIG=ReleaseOldGlibc make -j8 -C ./VASTvaporizer/Builds/LinuxMakefile/

image

@KottV
Copy link
Owner

KottV commented Oct 5, 2023

do you have "disabe GFX" checked?

@fractalf
Copy link

fractalf commented Oct 5, 2023

do you have "disabe GFX" checked?

Sorry, where do I find this setting?

@KottV
Copy link
Owner

KottV commented Oct 6, 2023

изображение

@mikelupe
Copy link

mikelupe commented Oct 6, 2023

Disabling GFX solved my crash issues with Ardour on Debian 12 bookworm. It gave a serious SEGFAULT.

EDIT: There are no GFX performance issues at all, when disabling it, btw. At least not that I experienced any.

@fractalf
Copy link

fractalf commented Oct 6, 2023

Ah, yes, well you see I don't even have access to that setting, since ti UI is not working at all!
Maybe there is someway to set it default off?

@mikelupe
Copy link

mikelupe commented Oct 6, 2023

@fractalf Ardour e.g. has got the feature of ALT-DoubleClicking on a plugin, which opens the "generic GUI" w/o graphics - but only for automatable parameters, so I guess rather no chance for "disable GFX". What DAW are you on, maybe it's got this feature as well.

@fractalf
Copy link

fractalf commented Oct 6, 2023

Im using Bitwig, never heard of such a thing..
..but if this is a feature that just has to be off for Linux, we should find a way to disable it by default no?

@mikelupe
Copy link

mikelupe commented Oct 6, 2023

In the code here it's around this line:

settings->setAttribute("DisableOpenGLGFX", (m_disableOpenGLGFX == true ? "X" : ""));

Not sure though how and where to set it to true as default.

EDIT: Here it is:
https://github.com/KottV/Vaporizer2/blob/7d4e4cdc444d664c2b91e7ad66c3f0e1ea415273/VASTvaporizer/Source/Plugin/VASTAudioProcessor.h#L254C1-L254C46

You could try setting it to true and then compile it again.

@KottV
Copy link
Owner

KottV commented Oct 6, 2023

@fractalf as it's not a Linux compile problem, there is a separate issue: #3

@fractalf
Copy link

fractalf commented Oct 6, 2023

Nice find, I had to try this out right away.
..unfortunately it's still very buggy.
Basically the UI doesn't work properly, and if I try to press something it just crashes.
Sound works fine if I dont touch the UI, but obviously that sawtooth gets a bit boring after some time ;)

Honestly, I'll probably never use this synth in my workflow, but the nerd/programmer side of me really wanna get this working..

@KottV
Copy link
Owner

KottV commented Oct 6, 2023

@fractalf
standalone version works more or less fine for me, the plugin version - depends of a host you're using

@mikelupe
Copy link

mikelupe commented Oct 6, 2023

As mentioned, no more issues at all with the upcoming Ardour 8 RC3, since I disabled GFX.

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

6 participants