igorski / homecorrupter

VST plugin that reduces sampling rate, bit depth and playback speed on-the-fly
https://www.igorski.nl/download/homecorrupter
MIT License
40 stars 1 forks source link

Cannot compile on linux with the latest vst3sdk #5

Open wipeover opened 3 years ago

wipeover commented 3 years ago

Hello, Fantastic project, thanks! I'd like to use it from linux, but it does not compile with the latest (3.7.3) vst3sdk. The compilation stops with the following error:

/usr/bin/ld: /home/x/vst/vst3sdk//build/lib/Release/libsdk.a(moduleinit.cpp.o): in function `InitModule()':
/home/x/vst/vst3sdk/public.sdk/source/main/moduleinit.cpp:113: multiple definition of `InitModule()'; CMakeFiles/homecorrupter.dir/src/vstentry.cpp.o:vstentry.cpp:(.text+0x1d0): first defined here
/usr/bin/ld: /home/x/vst/vst3sdk//build/lib/Release/libsdk.a(moduleinit.cpp.o): in function `DeinitModule()':
/home/x/vst/vst3sdk/public.sdk/source/main/moduleinit.cpp:120: multiple definition of `DeinitModule()'; CMakeFiles/homecorrupter.dir/src/vstentry.cpp.o:vstentry.cpp:(.text+0x1e0): first defined here
collect2: error: ld returned 1 exit status

Could you help to resolve the error or provide linux binaries to your vsts or give me a download link to the appropriate vst3sdk? Much appreciated!

fractalf commented 1 year ago

@wipeover I managed to build this for linux today

Basically I build it in a docker container

https://github.com/igorski/homecorrupter

version: "3.7"

services:
    ubuntu:
        container_name: ubuntu
        image: ubuntu:20.04
        tty: true
        volumes:
            - ./:/data

docker exec -it ubuntu /bin/bash

apt update
DEBIAN_FRONTEND=noninteractive apt install -y git wget unzip cmake libx11-xcb-dev libxcb-util-dev libxcb-cursor-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev libfontconfig1-dev libcairo2-dev libgtkmm-3.0-dev libsqlite3-dev libxcb-keysyms1-dev libjack-jackd2-dev g++

git clone https://github.com/igorski/homecorrupter.git

mkdir /homecorrupter/build
cd /homecorrupter/build

adduser root audio

wget https://download.steinberg.net/sdk_downloads/vst-sdk_3.7.7_build-19_2022-12-12.zip
unzip vst-sdk_3.7.7_build-19_2022-12-12.zip
mkdir VST_SDK/vst3sdk/build
cd VST_SDK/vst3sdk/build

wget https://github.com/Kitware/CMake/releases/download/v3.25.2/cmake-3.25.2-linux-x86_64.sh
./cmake-3.25.2-linux-x86_64.sh
./cmake-3.25.2-linux-x86_64/bin/cmake -DCMAKE_BUILD_TYPE=Release ..
./cmake-3.25.2-linux-x86_64/bin/cmake --build .

cd /homecorrupter/build
 ./VST_SDK/vst3sdk/build/cmake-3.25.2-linux-x86_64/bin/cmake -DVST3_SDK_ROOT=/homecorrupter/build/VST_SDK/vst3sdk/ ..
make

cp -r ./VST3/homecorrupter.vst3/ /data/