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

Make Linux build #19

Closed
bluszcz opened this issue Sep 27, 2018 · 93 comments
Closed

Make Linux build #19

bluszcz opened this issue Sep 27, 2018 · 93 comments
Labels
Linux Issues which only occur on Linux
Milestone

Comments

@bluszcz
Copy link

bluszcz commented Sep 27, 2018

Thanks for DAW's like Ardour, Renoise, Bitwig and or Tracktion - Linux made its mark in the music world. Many plugin vendors did start already porting their products (check U-HE for example).

It would be great to have Linux build of this synth,

@asimilon
Copy link
Contributor

kurasu@09a22e4
Something that in progress.

@GeorgeNs
Copy link

Looking forward to be able to build it on linux!

@Jorgeelalto
Copy link

Jorgeelalto commented Oct 3, 2018

OK, so I just started tinkering with the Linux building thing and I managed to make it compile on the current version, the VST2 build. I don't know how to make it work though, tried running it with Reaper 5.95 on Ubuntu 16.04 but no luck - I suppose the Debug-surge.so file it creates (under the target folder) is not valid or something, or there is external data and files that I am not providing (skin, presets?). I'm attaching here the code of the current state. My repository is here: BuildSurgeOnLinux

# Install libgtkmm-3.0-dev and libcairo2-dev
echo "############################################################"
echo "# THIS SCRIPT NEEDS THE FOLLOWING SPECIAL PACKAGES:        #"
echo "# libgtkmm-3.0-dev libcairo2-dev                           #"
echo "# MAKE SURE YOU HAVE THEM OR COMPILATION WILL THROW ERRORS #"
echo "############################################################"

# Try to remove previous compilations
echo "REMOVING PREVIOUS BUILD FILES"
rm -rf surge VST_SDK
# First, clone Surge repo and update submodules
echo "CLONING SURGE REPO"
git clone https://github.com/kurasu/surge.git
echo "MOVING INTO SURGE FOLDER"
cd surge
echo "UPDATING GIT SUBMODULES"
git submodule update --init --recursive
# Then download VST_SDK file
echo "MOVING TO PARENT DIRECTORY"
cd ..
echo "RETRIEVING VST3SDK PACKAGE FROM STEINBERG"
wget https://www.steinberg.net/vst3sdk
# Extract it and remove the zip
echo "EXTRACTING VST3SDK ZIP PACKAGE"
unzip vst3sdk*
echo "REMOVING VST3SDK ZIP"
# Copy the vst2 stuff to the vst3 folder in Surge
echo "COPYING VST2 FILES TO surge/vst3sdk/"
cp -r VST_SDK/VST2_SDK/* surge/vst3sdk/
# Download premake5 and extract it here
# REPLACE WITH THE LATEST VERSION OF PREMAKE DOWNLOAD IF YOU WANT
echo "RETRIEVING PREMAKE5 PACKAGE"
wget https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz
echo "EXTRACTING PREMAKE5 PACKAGE"
tar -xvf premake-5*
# Remove premake5 tar.gz
echo "REMOVING PREMAKE5 TAR.GZ PACKAGE"
# Move premake5 bin to surge folder
echo "MOVING PREMAKE5 BINARY TO SURGE FOLDER"
mv premake5 surge/
# Build makefiles with premake
echo "ENTERING SURGE FOLDER"
cd surge
echo "RUNNING premake5 gmake2"
./premake5 gmake2
# make the vst2
echo "RUNNING surge-vst2.make"
make -f surge-vst2.make
# make the vst3
#make -f surge-vst3.make

Any contribution is appreciated and more than welcome, of course :)

@GeorgeNs
Copy link

GeorgeNs commented Oct 4, 2018

Yes I have tried too with Ubuntu 18,it compiles well it builds the .so file but I can't open it in any open source DAW!
More precisely it is not detectable. Carla or JUCE audio plugin host can't detect the plugin as well.
I have tried the following:
premake5 --cc=gcc --os=linux gmake (if i am not wrong gmake is better than gmake2)
then
make config=release_x64

the vst2 is going to be built successfully but not the same for the vst3(anyway linux has long way to go with vst3 plugins,i can only use the steinberg's editorhost to open a vst3 example) .
Anyway,even so, the vst2 .so file (which is around 19Mb) won't open
I didn't have time to search the reason but I guess is something related to vst sdk version or vstgui???
I am not an experienced programmer though (((

@davephillips
Copy link

I'm having the same problems. I can build the plugin fine as a VST2 but it won't instantiate in Bitwig or Ardour. I'm building it here on Fedora 23, with GCC 5.3.1. The only error thrown by Bitwig is the rather unhelpful "Could not read metadata" message.

@kmatheussen
Copy link
Contributor

To compile on linux, see this pull request: https://github.com/kurasu/surge/pull/20

Also, the reason the current state doesn't load is probably because of missing symbols.
Run "ldd -r ldd -r target/vst2/Debug/Surge-Debug.so" to check that. This should probably be added to the build system.

If you compiled it successfully, it should look like this:

[kjetil@localhost surge]$ ldd -r target/vst2/Debug/Surge-Debug.so 
        linux-vdso.so.1 (0x00007ffd65b41000)
        libfreetype.so.6 => /lib64/libfreetype.so.6 (0x00007fcd0279e000)
        libxcb-cursor.so.0 => /lib64/libxcb-cursor.so.0 (0x00007fcd02597000)
        libxcb.so.1 => /lib64/libxcb.so.1 (0x00007fcd02375000)
        libxkbcommon-x11.so.0 => /lib64/libxkbcommon-x11.so.0 (0x00007fcd0216d000)
        libxkbcommon.so.0 => /lib64/libxkbcommon.so.0 (0x00007fcd01f2c000)
        libcairo.so.2 => /lib64/libcairo.so.2 (0x00007fcd01c03000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fcd019e6000)
        libstdc++.so.6 => /home/kjetil/gcc-7.1.0_install/lib64/libstdc++.so.6 (0x00007fcd01663000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fcd0135b000)
        libgcc_s.so.1 => /home/kjetil/gcc-7.1.0_install/lib64/libgcc_s.so.1 (0x00007fcd01144000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fcd00d82000)
        libz.so.1 => /lib64/libz.so.1 (0x00007fcd00b6c000)
        libbz2.so.1 => /lib64/libbz2.so.1 (0x00007fcd0095c000)
        libpng16.so.16 => /lib64/libpng16.so.16 (0x00007fcd00729000)
        libxcb-render-util.so.0 => /lib64/libxcb-render-util.so.0 (0x00007fcd00525000)
        libxcb-render.so.0 => /lib64/libxcb-render.so.0 (0x00007fcd0031b000)
        libxcb-image.so.0 => /lib64/libxcb-image.so.0 (0x00007fcd00115000)
        libxcb-shm.so.0 => /lib64/libxcb-shm.so.0 (0x00007fccfff11000)
        libXau.so.6 => /lib64/libXau.so.6 (0x00007fccffd0d000)
        libxcb-xkb.so.1 => /usr/lib64/libxcb-xkb.so.1 (0x00007fccffaf0000)
        libpixman-1.so.0 => /lib64/libpixman-1.so.0 (0x00007fccff849000)
        libfontconfig.so.1 => /lib64/libfontconfig.so.1 (0x00007fccff605000)
        libEGL.so.1 => /lib64/libEGL.so.1 (0x00007fccff3f1000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fccff1ed000)
        libXrender.so.1 => /lib64/libXrender.so.1 (0x00007fccfefe3000)
        libX11.so.6 => /lib64/libX11.so.6 (0x00007fccfeca1000)
        libXext.so.6 => /lib64/libXext.so.6 (0x00007fccfea8f000)
        libGL.so.1 => /lib64/libGL.so.1 (0x00007fccfe7eb000)
        librt.so.1 => /lib64/librt.so.1 (0x00007fccfe5e2000)
        /lib64/ld-linux-x86-64.so.2 (0x000055ff0498e000)
        libxcb-util.so.1 => /lib64/libxcb-util.so.1 (0x00007fccfe3dc000)
        libexpat.so.1 => /lib64/libexpat.so.1 (0x00007fccfe1b1000)
        libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 (0x00007fccfdee3000)
        libGLX.so.0 => /lib64/libGLX.so.0 (0x00007fccfdcb2000)
[kjetil@localhost surge]$ 

@davephillips
Copy link

Hey Kjetil, Thanks for the assistance ! As I mentioned I can build the VST2 without problems. I ran ldd as per your instructions, got the following result, complete with a report of missing symbols. What stage did I miss ?

[dlphilp@The6300 surge]$ ldd -r target/vst2/Debug/Surge-Debug.so
linux-vdso.so.1 (0x00007ffc1e5f7000)
libgtkmm-3.0.so.1 => /lib64/libgtkmm-3.0.so.1 (0x00007f4da463c000)
libatkmm-1.6.so.1 => /lib64/libatkmm-1.6.so.1 (0x00007f4da43ec000)
libgdkmm-3.0.so.1 => /lib64/libgdkmm-3.0.so.1 (0x00007f4da419c000)
libgiomm-2.4.so.1 => /lib64/libgiomm-2.4.so.1 (0x00007f4da3de4000)
libpangomm-1.4.so.1 => /lib64/libpangomm-1.4.so.1 (0x00007f4da3bb4000)
libglibmm-2.4.so.1 => /lib64/libglibmm-2.4.so.1 (0x00007f4da3934000)
libgtk-3.so.0 => /lib64/libgtk-3.so.0 (0x00007f4da3004000)
libgdk-3.so.0 => /lib64/libgdk-3.so.0 (0x00007f4da2d34000)
libpangocairo-1.0.so.0 => /lib64/libpangocairo-1.0.so.0 (0x00007f4da2b24000)
libpango-1.0.so.0 => /lib64/libpango-1.0.so.0 (0x00007f4da28d4000)
libatk-1.0.so.0 => /lib64/libatk-1.0.so.0 (0x00007f4da26ac000)
libcairo-gobject.so.2 => /lib64/libcairo-gobject.so.2 (0x00007f4da249c000)
libgio-2.0.so.0 => /lib64/libgio-2.0.so.0 (0x00007f4da211c000)
libcairomm-1.0.so.1 => /lib64/libcairomm-1.0.so.1 (0x00007f4da1ef4000)
libcairo.so.2 => /lib64/libcairo.so.2 (0x00007f4da1bc4000)
libsigc-2.0.so.0 => /lib64/libsigc-2.0.so.0 (0x00007f4da19bc000)
libgdk_pixbuf-2.0.so.0 => /lib64/libgdk_pixbuf-2.0.so.0 (0x00007f4da1794000)
libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00007f4da153c000)
libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f4da11fc000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4da0fdc000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f4da0c54000)
libm.so.6 => /lib64/libm.so.6 (0x00007f4da094c000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f4da0734000)
libc.so.6 => /lib64/libc.so.6 (0x00007f4da036c000)
libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x00007f4da0164000)
libX11.so.6 => /lib64/libX11.so.6 (0x00007f4d9fe24000)
libXi.so.6 => /lib64/libXi.so.6 (0x00007f4d9fc0c000)
libXfixes.so.3 => /lib64/libXfixes.so.3 (0x00007f4d9fa04000)
libatk-bridge-2.0.so.0 => /lib64/libatk-bridge-2.0.so.0 (0x00007f4d9f7d4000)
libepoxy.so.0 => /lib64/libepoxy.so.0 (0x00007f4d9f4d4000)
libpangoft2-1.0.so.0 => /lib64/libpangoft2-1.0.so.0 (0x00007f4d9f2bc000)
libfontconfig.so.1 => /lib64/libfontconfig.so.1 (0x00007f4d9f074000)
libXinerama.so.1 => /lib64/libXinerama.so.1 (0x00007f4d9ee6c000)
libXrandr.so.2 => /lib64/libXrandr.so.2 (0x00007f4d9ec5c000)
libXcursor.so.1 => /lib64/libXcursor.so.1 (0x00007f4d9ea4c000)
libXcomposite.so.1 => /lib64/libXcomposite.so.1 (0x00007f4d9e844000)
libXdamage.so.1 => /lib64/libXdamage.so.1 (0x00007f4d9e63c000)
libxkbcommon.so.0 => /lib64/libxkbcommon.so.0 (0x00007f4d9e3fc000)
libwayland-cursor.so.0 => /lib64/libwayland-cursor.so.0 (0x00007f4d9e1f4000)
libwayland-egl.so.1 => /lib64/libwayland-egl.so.1 (0x00007f4d9dfec000)
libwayland-client.so.0 => /lib64/libwayland-client.so.0 (0x00007f4d9dddc000)
libXext.so.6 => /lib64/libXext.so.6 (0x00007f4d9dbc4000)
librt.so.1 => /lib64/librt.so.1 (0x00007f4d9d9bc000)
libthai.so.0 => /lib64/libthai.so.0 (0x00007f4d9d7ac000)
libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x00007f4d9d5a4000)
libharfbuzz.so.0 => /lib64/libharfbuzz.so.0 (0x00007f4d9d33c000)
libfreetype.so.6 => /usr/lib64/freetype-freeworld/libfreetype.so.6 (0x00007f4d9d08c000)
libpixman-1.so.0 => /lib64/libpixman-1.so.0 (0x00007f4d9cde4000)
libEGL.so.1 => /usr/lib64/nvidia-340xx/libEGL.so.1 (0x00007f4d9cad4000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f4d9c8cc000)
libpng16.so.16 => /lib64/libpng16.so.16 (0x00007f4d9c694000)
libxcb-shm.so.0 => /lib64/libxcb-shm.so.0 (0x00007f4d9c48c000)
libxcb-render.so.0 => /lib64/libxcb-render.so.0 (0x00007f4d9c27c000)
libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f4d9c054000)
libXrender.so.1 => /lib64/libXrender.so.1 (0x00007f4d9be44000)
libz.so.1 => /lib64/libz.so.1 (0x00007f4d9bc2c000)
libGL.so.1 => /usr/lib64/nvidia-340xx/libGL.so.1 (0x00007f4d9b8dc000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f4d9b6b4000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f4d9b494000)
libffi.so.6 => /lib64/libffi.so.6 (0x00007f4d9b28c000)
/lib64/ld-linux-x86-64.so.2 (0x0000559be5100000)
libatspi.so.0 => /lib64/libatspi.so.0 (0x00007f4d9b054000)
libdbus-1.so.3 => /lib64/libdbus-1.so.3 (0x00007f4d9adfc000)
libexpat.so.1 => /lib64/libexpat.so.1 (0x00007f4d9abcc000)
libdatrie.so.1 => /lib64/libdatrie.so.1 (0x00007f4d9a9c4000)
libgraphite2.so.3 => /lib64/libgraphite2.so.3 (0x00007f4d9a794000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f4d9a584000)
libnvidia-glsi.so.340.98 => /usr/lib64/nvidia-340xx/libnvidia-glsi.so.340.98 (0x00007f4d9a2fc000)
libXau.so.6 => /lib64/libXau.so.6 (0x00007f4d9a0f4000)
libnvidia-tls.so.340.98 => /usr/lib64/nvidia-340xx/tls/libnvidia-tls.so.340.98 (0x00007f4d99eec000)
libnvidia-glcore.so.340.98 => /usr/lib64/nvidia-340xx/libnvidia-glcore.so.340.98 (0x00007f4d972d4000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f4d9705c000)
libsystemd.so.0 => /lib64/libsystemd.so.0 (0x00007f4d96fd4000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f4d96dac000)
libgcrypt.so.20 => /lib64/libgcrypt.so.20 (0x00007f4d96ac4000)
libgpg-error.so.0 => /lib64/libgpg-error.so.0 (0x00007f4d968ac000)
libdw.so.1 => /lib64/libdw.so.1 (0x00007f4d9665c000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007f4d96454000)
libelf.so.1 => /lib64/libelf.so.1 (0x00007f4d9623c000)
libattr.so.1 => /lib64/libattr.so.1 (0x00007f4d96034000)
undefined symbol: _ZN12AudioEffectX10dispatcherEiilPvf (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect21setParameterAutomatedEif (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect19canProcessReplacingEb (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect18canDoubleReplacingEb (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect17programsAreChunksEb (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect15setInitialDelayEi (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect16getMasterVersionEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect18getCurrentUniqueIdEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect10masterIdleEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect9dB2stringEfPci (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect9Hz2stringEfPci (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect9ms2stringEfPci (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect12float2stringEfPci (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect10int2stringEiPci (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect17__hasVuDeprecatedEb (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect19__hasClipDeprecatedEb (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect19__canMonoDeprecatedEb (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect32__setRealtimeQualitiesDeprecatedEi (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect31__setOfflineQualitiesDeprecatedEi (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect28__isInputConnectedDeprecatedEi (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect29__isOutputConnectedDeprecatedEi (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX9beginEditEi (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX7endEditEi (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX9ioChangedEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX16updateSampleRateEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX15updateBlockSizeEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX15getInputLatencyEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX16getOutputLatencyEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX11getTimeInfoEi (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX22getCurrentProcessLevelEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX18getAutomationStateEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX19getHostVendorStringEPc (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX20getHostProductStringEPc (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX20getHostVendorVersionEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX18hostVendorSpecificEilPvf (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX9canHostDoEPc (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX15getHostLanguageEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX7isSynthEb (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX6noTailEb (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX12getDirectoryEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX13updateDisplayEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX10sizeWindowEii (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX16openFileSelectorEP13VstFileSelect (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX17closeFileSelectorEP13VstFileSelect (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX19allocateArrangementEPP21VstSpeakerArrangementi (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX21deallocateArrangementEPP21VstSpeakerArrangement (target/vst2/Debug/Surge-Debug.so)
undefined symbol: ZN12AudioEffectX11copySpeakerEP20VstSpeakerPropertiesS1 (target/vst2/Debug/Surge-Debug.so)
undefined symbol: ZN12AudioEffectX16matchArrangementEPP21VstSpeakerArrangementS1 (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX11offlineReadEP14VstOfflineTask16VstOfflineOptionb (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX12offlineWriteEP14VstOfflineTask16VstOfflineOption (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX12offlineStartEP12VstAudioFileii (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX21offlineGetCurrentPassEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX25offlineGetCurrentMetaPassEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX22__wantEventsDeprecatedEi (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX19__tempoAtDeprecatedEi (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX39__getNumAutomatableParametersDeprecatedEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX36__getParameterQuantizationDeprecatedEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX20__needIdleDeprecatedEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX27__getPreviousPlugDeprecatedEi (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX23__getNextPlugDeprecatedEi (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX32__willProcessReplacingDeprecatedEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX30__wantAsyncOperationDeprecatedEb (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX29__hasExternalBufferDeprecatedEb (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX31__setOutputSamplerateDeprecatedEf (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX38__getInputSpeakerArrangementDeprecatedEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX39__getOutputSpeakerArrangementDeprecatedEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX22__openWindowDeprecatedEP21__VstWindowDeprecated (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX23__closeWindowDeprecatedEP21__VstWindowDeprecated (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX24__getChunkFileDeprecatedEPv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZTI12AudioEffectX (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN6VSTGUI8soHandleE (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZTV12AudioEffectX (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect9setEditorEP10AEffEditor (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectXC2EPFlP7AEffectiilPvfEii (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffectD2Ev (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect19canProcessReplacingEb (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX6resumeEv (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN11AudioEffect17programsAreChunksEb (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12SurgeStorage11load_wt_wavENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP9Wavetable (target/vst2/Debug/Surge-Debug.so)
undefined symbol: __cpuid (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _Z19spawn_miniedit_textPci (target/vst2/Debug/Surge-Debug.so)
undefined symbol: _ZN12AudioEffectX7isSynthEb (target/vst2/Debug/Surge-Debug.so)

@kmatheussen
Copy link
Contributor

kmatheussen commented Oct 4, 2018 via email

@Jorgeelalto
Copy link

Jorgeelalto commented Dec 11, 2018

So I tested building this after a few months and for the vst3 build I'm getting different errors, related to the GUI probably like for the macOS build.

This is the process I followed to make this build:

# Clone Premake5
git clone https://github.com/premake/premake-core.git
# Build it
cd premake-core
make -f Bootstrap.mak linux
# Exit
cd ..
git clone https://github.com/kurasu/surge.git
cd surge
# Clone submodules
git submodule update --init --recursive
# Copy premake5 binaries to the surge directory
cp ../premake-core/bin/release/premake5 .
# Build the makefile
./premake5 gmake2
# And the vst3
make

After executing ld on the Surge-Debug.vst3 which results from the process in /target/vst3/Debug I get this output:

Surge-Debug.vst3: undefined reference to `non-virtual thunk to SurgeVst3EditController::queryInterface(char const*, void**)'
Surge-Debug.vst3: undefined reference to `SurgeVst3EditController::setParamNormalized(unsigned int, double)'
Surge-Debug.vst3: undefined reference to `non-virtual thunk to SurgeVst3EditController::createView(char const*)'
Surge-Debug.vst3: undefined reference to `non-virtual thunk to SurgeVst3EditController::queryInterface(char const*, void**)'
Surge-Debug.vst3: undefined reference to `non-virtual thunk to SurgeVst3EditController::queryInterface(char const*, void**)'
Surge-Debug.vst3: undefined reference to `non-virtual thunk to SurgeVst3EditController::setParamNormalized(unsigned int, double)'
Surge-Debug.vst3: undefined reference to `SurgeVst3EditController::getState(Steinberg::IBStream*)'
Surge-Debug.vst3: undefined reference to `__cpuid'
Surge-Debug.vst3: undefined reference to `non-virtual thunk to SurgeVst3EditController::queryInterface(char const*, void**)'
Surge-Debug.vst3: undefined reference to `non-virtual thunk to SurgeVst3EditController::getMidiControllerAssignment(int, short, short, unsigned int&)'
Surge-Debug.vst3: undefined reference to `SurgeStorage::load_wt_wav(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Wavetable*)'
Surge-Debug.vst3: undefined reference to `non-virtual thunk to SurgeVst3EditController::setState(Steinberg::IBStream*)'
Surge-Debug.vst3: undefined reference to `SurgeVst3EditController::getParamValueByString(unsigned int, char16_t*, double&)'
Surge-Debug.vst3: undefined reference to `non-virtual thunk to SurgeVst3EditController::queryInterface(char const*, void**)'
Surge-Debug.vst3: undefined reference to `SurgeVst3EditController::editorRemoved(Steinberg::Vst::EditorView*)'
Surge-Debug.vst3: undefined reference to `non-virtual thunk to SurgeVst3EditController::setComponentState(Steinberg::IBStream*)'
Surge-Debug.vst3: undefined reference to `non-virtual thunk to SurgeVst3EditController::getState(Steinberg::IBStream*)'
Surge-Debug.vst3: undefined reference to `SurgeVst3EditController::getMidiControllerAssignment(int, short, short, unsigned int&)'
Surge-Debug.vst3: undefined reference to `SurgeVst3EditController::setState(Steinberg::IBStream*)'
Surge-Debug.vst3: undefined reference to `SurgeVst3EditController::createView(char const*)'
Surge-Debug.vst3: undefined reference to `non-virtual thunk to SurgeVst3EditController::getParamValueByString(unsigned int, char16_t*, double&)'
Surge-Debug.vst3: undefined reference to `SurgeVst3EditController::editorAttached(Steinberg::Vst::EditorView*)'
Surge-Debug.vst3: undefined reference to `SurgeVst3EditController::receiveText(char const*)'
Surge-Debug.vst3: undefined reference to `non-virtual thunk to SurgeVst3EditController::queryInterface(char const*, void**)'
Surge-Debug.vst3: undefined reference to `SurgeVst3EditController::getParamStringByValue(unsigned int, double, char16_t*)'
Surge-Debug.vst3: undefined reference to `SurgeVst3EditController::setComponentState(Steinberg::IBStream*)'
Surge-Debug.vst3: undefined reference to `Steinberg::SystemTime::getTicks64()'
Surge-Debug.vst3: undefined reference to `SurgeVst3EditController::queryInterface(char const*, void**)'
Surge-Debug.vst3: undefined reference to `non-virtual thunk to SurgeVst3EditController::getParamStringByValue(unsigned int, double, char16_t*)'
Surge-Debug.vst3: undefined reference to `spawn_miniedit_text(char*, int)'
Surge-Debug.vst3: undefined reference to `moduleHandle'

So I think I will start looking for the moduleHandle, Steinberg::* and spawn_miniedit_text. I don't have much experience with C++ but I will try my best 😃

@esaruoho
Copy link
Collaborator

@Jorgeelalto after cloning the repo, did you run this?

git submodule update --init --recursive

? let us know if you get a different set of errors then.

@Jorgeelalto
Copy link

Jorgeelalto commented Dec 11, 2018

Oops, yes, forgot to add that to the process. I ran that before compiling everything yes (I will add it to my comment). Those errors are thrown even with the submodule cloning.

@esaruoho
Copy link
Collaborator

@Jorgeelalto what about trying to get VST2 to compile?

@Jorgeelalto
Copy link

Jorgeelalto commented Dec 15, 2018

Maybe there is an option to specify on premake5 so that it creates a makefile for a vst2 version, but just running premake5 gmake or premake5 gmake2 generates a Makefile and a surge-vst3.make. Both build the vst3 version, did not found a way to build the vst2 yet.

Edit: checked previous replies to this issue, did the makefile generation changed? I can see we had vst2 makefiles some time ago. I'm using the latest master version.

Edit 2: Never mind, looks like we have to set the env variable VST2SDK_DIR.

@Jorgeelalto
Copy link

So I managed to start building vst2 and I get a lot of errors of the type "CRect does not name a type", "CBitmap has not been declared". To me it looks like some kind of include problem, maybe the source code needs to be fed with some more .h files. I will try including some files manually.

@esaruoho
Copy link
Collaborator

@Jorgeelalto since today this repo progressed with about 100 new commits being merged into master - could you check again and see if you're still getting these errors?

@jarkkojs
Copy link
Collaborator

For VST2 build the my commits were missing. I've created a new pull request (substitute for #70).

@Jorgeelalto
Copy link

I see, I will wait for that PR to be merged. I have tested with the latest version of the master branch but I get the same problems in both VST3 and VST2.

@esaruoho
Copy link
Collaborator

PR is #111

@esaruoho
Copy link
Collaborator

@Jorgeelalto the PR is in, let us know how you fare with Linux builds now :)

@esaruoho
Copy link
Collaborator

@Jorgeelalto it's probably a great idea to look at https://github.com/whydoubt/surge/tree/linux_storage (heads up @jsakkine) - this might eventually make it into a PR, maybe there's something useful coming in there? :)

@baconpaul
Copy link
Collaborator

Just as an update, I took my ubuntu vm, pulled head, and built surge-app (not surge-vst3) and it linked no problem. I just needed to

apt-get install libgtkmm-3.0-dev

first.

@baconpaul
Copy link
Collaborator

surge-vst3 links for me also. No idea if it works. But at least on my vm (16.04.10 ubuntu with g++ 5.4.0) seems the recent spate of PRs have things linking. Just an FYI.

@esaruoho
Copy link
Collaborator

@baconpaul what's surge-app ? vst2, or standalone? surely we're not in the status where a surge linux standalone exists, or WDYT @jsakkine ?

@baconpaul
Copy link
Collaborator

Its @jsaskkine's work which got merged into the main branch. It doesn't work. But it does link!

@esaruoho
Copy link
Collaborator

okay. looks like we could wait till @whydoubt pushes in his PR for this branch of his that's wip:
https://github.com/whydoubt/surge/tree/linux_storage

anyway, nice to see that the linux work is being progressed by both @whydoubt and @jsakkine

@davephillips
Copy link

Greetings !

I can build the VST2 and VST3 plugin for Linux but neither will load in Bitwig, I always get the "Could not read plugin metadata" error. I also a ran a small VST2 debug program (from the VeeSeeVSTRack project) on the Surge binaries, the error reported "Could not find mainProc". Any suggestions ? Btw, I've been following this issue and building the code regularly. Unfortunately life events have prevented further involvement until now, hopefully I can help a bit towards getting a working Linux version of Surge.

Linux Fedora 23
GCC 5.3.1

Best,

dp

@jarkkojs
Copy link
Collaborator

jarkkojs commented Dec 20, 2018

Sorry I'll be for a while bit passive because my paid work on kernel takes all my time :) I'll become active when the holidays start. @whydoubt: sorry to interrupt ongoing work but it'd be nice if you could take the model that I proposed in https://github.com/kurasu/surge/issues/112 for Linux specific changes.

@esaruoho
Copy link
Collaborator

@davephillips can you try and check the VSTs with http://github.com/tracktion/pluginval and let us know what the app says?

@jarkkojs
Copy link
Collaborator

@baconpaul: yeah it is essentially an explicit check that you have all the required VST2 files.

@davephillips
Copy link

@esaruoho No problem, I'm building it now. I'll report back asap.

@kzantow
Copy link
Collaborator

kzantow commented Jan 3, 2019

@GeorgeNs erhm, this is linux? AFAIK all the other users have a UI...

@baconpaul
Copy link
Collaborator

@kzantow yeah guis showing up black on Linux reported earlier too - which is progress! Seems it may not be surge from the above report

@GeorgeNs
Copy link

GeorgeNs commented Jan 3, 2019

@kzantow yes linux, just ubuntu 18 with many extra tweaks and builds targeting audio processing and music making.

@baconpaul thanks for confirming,it seems it'snot only me having this issue. In my case keeping an older vstgui version solved my problem.
Cheers

@baconpaul
Copy link
Collaborator

@GeorgeNs do you happen to know how far back you had to rev vstgui to get it to work? May help some of the above folks

@baconpaul baconpaul added this to the 1.6 milestone Jan 3, 2019
@baconpaul baconpaul added Linux Issues which only occur on Linux and removed release 1.6 requirement labels Jan 3, 2019
@GeorgeNs
Copy link

GeorgeNs commented Jan 3, 2019

@baconpaul
This version should be the one that builds the steinberg plugins examples on linux succesfully:
https://github.com/steinbergmedia/vstgui/releases/tag/vstgui4_6

I tried it a long time ago,so if anyone can confirm that it is really so it would be nice.
Cheers

@rghvdberg
Copy link
Contributor

I've built it with the version mentioned by @GeorgeNs .
Same results.

@rghvdberg
Copy link
Contributor

trying to build examples from vstgui
could be doing this totally wrong but :
cloned the vstgui repo
mkdir build , cd build
cmake ../
make
result , everything segfaults ... (╯°□°)╯︵ ┻━┻

the vstgui4_6 , test fails ..

COnOffButtonCreatorTest
	title [OK] -> 108 µs
	font [OK] -> 93 µs
	fontColor [OK] -> 97 µs
	boxFrameColor [OK] -> 93 µs
	boxFillColor [OK] -> 92 µs
	checkmarkColor [OK] -> 91 µs
	drawCrossbox [OK] -> 101 µs
Segmentation fault
tests/unittest/CMakeFiles/unittests.dir/build.make:1033: recept voor doel 'Debug/unittests' is mislukt

and I dunno how to build the examples in 4_6 , it only builds the libs
probably needs some arguments for make 🤷‍♂️
should I report this back to steinberg ?

@whydoubt
Copy link
Contributor

whydoubt commented Jan 3, 2019

FWIW, the code for the sample plugins and hosts is in the vst3_public_sdk repo. To build and test, you'll really need the whole vst3sdk (recusively cloned). When you build, links for each of the sample plugins are made in your ~/.vst3 folder. The sample hosts are put in the bin/Debug folder within the build folder.

@rghvdberg
Copy link
Contributor

@kzantow reported for spam

@GeorgeNs
Copy link

GeorgeNs commented Jan 3, 2019

yes you need vst3sdk recursively cloned. What is inside in vstgui however is another story.
some weeks ago inside that folder was actually the 4_6 version. You will have to delete that folder and reclone only the vstgui to get finally the latest update. I dunno if something changed recently,didn't have time to check...

@whydoubt
Copy link
Contributor

whydoubt commented Jan 3, 2019

@GeorgeNs You shouldn't need to delete and reclone. Just go into vstgui4, checkout either the master or the develop branch (origin/HEAD points at the develop branch, FWIW). And if it's not a fresh clone, do a pull.

@GeorgeNs
Copy link

GeorgeNs commented Jan 3, 2019

Yes re-update I wanted to say..anyway,the matter is that if I get the latest vstgui and build the examples I will have black window,if I don't use the fresh and keep the 4_6 version the GUI of the examples shows up as expected

@jarkkojs
Copy link
Collaborator

jarkkojs commented Jan 10, 2019

Where is this going? Tried to Load VST2 plug-in on Linux with htop on. It eats all the system memory and crashes. I wonder what causes that memory leak.

@jarkkojs
Copy link
Collaborator

Created #250. Working on a fix for that one.

@esaruoho
Copy link
Collaborator

@jsakkine can there be some sort of most minimal check of disabling everything possible and seeing if it still Eats up all the resources?

@jarkkojs
Copy link
Collaborator

jarkkojs commented Jan 10, 2019

@esaruoho, does not make sense to even think about that as long as there are null pointer dereferences and all kinds of crust in the way... I'll fix bugs one by one as I stump into them and then we see what is happening...

@baconpaul
Copy link
Collaborator

@jsakkine if it helps here was basically my path to getting mac au working (which seems forever ago but was only about 30 days ago).

  1. Get it to build and link. We are there on linux. Great.
  2. The configuration state is key and the code will NPE without it. But the error messages are bad. So SurgeStorage.cpp where there's the error box around configuration.xml may be your second place. Without that you can't even load the SurgeSynth object let alone the GUI
  3. The patch management is next, but if you solved 2 you probably got that

With that you can get an instance of SurgeSynthesizer.cpp up and running and making sound. (That may be a reasonable thing to put in standalone app!). Then you have to turn to the UI

  1. The window creation path is different in each of VST2 3 and AU. In VST2 it is all in src/vst2 and is pretty clear but make sure it is calling the APIs you want and isn't #ifdef out for linux
  2. The window creation path will load bitmaps using CBitmap( CResourceDescription( id ) ) which on windows uses the .rc file and on mac loads from the bundle; you will need to look in vstgui source to see what it does on mac then make that work

With those two things fixed you stand a chance of actually getting a UI on screen I think.

Hope that helps!

@jarkkojs
Copy link
Collaborator

Thanks @baconpaul. I have pretty good idea how I'm proceeding. Not exactly with such a high level plan but I just go forward one car crash at a time :) I will create a CControl for showing the error message on Linux. That is the only stable platform to do it.

I'll catch the exception in the plug-in level and spawn that control there.

@jarkkojs
Copy link
Collaborator

And I solely focus on VST2 on Linux right now, ignoring everything else.

@baconpaul
Copy link
Collaborator

Hey so after the weekend, linux builds and runs. Has bugs still but builds and runs. So I’m going to close this issue! The README has good instructions on how to build it if you’re finding out that it builds and runs for the first time through a github notification!

@GeorgeNs
Copy link

GeorgeNs commented Feb 5, 2019

Hey,that's really hard work,it works!
Just may i add some notes for linux compilation instructions?
in order to build the vst2 something like this is needed:
export VST2SDK_DIR={...where the sdk2 is....}
then removing --:
./build-linux.sh clean
./build-linux.sh build
and finally copying the contents of data into Documents/Surge/
can have also the presets available.
Thanks!

@esaruoho
Copy link
Collaborator

esaruoho commented Feb 5, 2019

Hey,that's really hard work,it works!
Just may i add some notes for linux compilation instructions?
in order to build the vst2 something like this is needed:
export VST2SDK_DIR={...where the sdk2 is....}
then removing --:
./build-linux.sh clean
./build-linux.sh build
and finally copying the contents of data into Documents/Surge/
can have also the presets available.
Thanks!

.. hmm. the export VST2SDK_DIR has been added into the readme.md as of yesterday.. the -- removal has also been done, yesterday. are you sure you're viewing the newest readme.md?

@GeorgeNs
Copy link

GeorgeNs commented Feb 5, 2019

Really???yes pretty sure,I am on master branch

@GeorgeNs
Copy link

GeorgeNs commented Feb 5, 2019

Oh.for some reasonq Firefox engine results not the updated master branch. It's okay now!

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

No branches or pull requests