madskjeldgaard / portedplugins

A collection of plugins for the SuperCollider sound environment, all of which are ported / remixed from elsewhere
GNU General Public License v3.0
180 stars 13 forks source link

BLOsc error build and install on Linux #39

Closed duckt14 closed 6 months ago

duckt14 commented 8 months ago

Hi, I'm unable to install the plugins because CMake tells me that BLOsc was not declared during the building. This is the text of the error:

In file included from /home/enrico/portedplugins/plugins/BLOsc/BLOsc.cpp:4: /home/enrico/portedplugins/plugins/BLOsc/BLOsc.hpp:26:18: error: ‘BlOsc’ in namespace ‘daisysp’ does not name a type 26 | daisysp::BlOsc blosc; | ^~~~~ /home/enrico/portedplugins/plugins/BLOsc/BLOsc.cpp: In constructor ‘BLOsc::BLOsc::BLOsc()’: /home/enrico/portedplugins/plugins/BLOsc/BLOsc.cpp:14:3: error: ‘blosc’ was not declared in this scope 14 | blosc.Init(samplerate); | ^~~~~ /home/enrico/portedplugins/plugins/BLOsc/BLOsc.cpp: In member function ‘void BLOsc::BLOsc::next(int)’: /home/enrico/portedplugins/plugins/BLOsc/BLOsc.cpp:32:5: error: ‘blosc’ was not declared in this scope 32 | blosc.SetFreq(slopedFreq.consume()); | ^~~~~ gmake[2]: *** [CMakeFiles/BLOsc_scsynth.dir/build.make:76: CMakeFiles/BLOsc_scsynth.dir/plugins/BLOsc/BLOsc.cpp.o] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:1898: CMakeFiles/BLOsc_scsynth.dir/all] Error 2 gmake: *** [Makefile:136: all] Error 2

Any solutions? Thank you, Enrico :)

Desktop:

madskjeldgaard commented 8 months ago

hi!

Did you update git submodules before building?

git submodule update --init --recursive

Othwerwise, there may have been some changes in daisysp-library that need to be synced with this repo, which I won't have time to do unfortunately.

WhiteGobo commented 6 months ago

I have the same error on arch linux via yay -S supercollider-portedplugins. daisysp-library updated on january 8 to v1.0. The Source/Synthesis/blosc.h/cpp were removed in the new version

WhiteGobo commented 6 months ago

They moved LGPL modules to a new submodule. See here for more information They said, "after updating libDaisy, and DaisySP (including pulling the new submodule), users can add USE_DAISYSP_LGPL=1 to their Makefile, and continue without any other changes."

WhiteGobo commented 6 months ago

With the PR the old version of daisysp will be used. That fixes the problem for me. Adding the option USE_DAISYSP_LGPL should fix the problem also. So adding

target_compile_definitions("${plugin_name}_scsynth PUBLIC "USE_DAISYSP_LGPL")

after:

https://github.com/madskjeldgaard/portedplugins/blob/24639cdeb48441e52c493de54aa822355326869a/CMakeLists.txt#L97

should fix the problem. But cmake of daisysp doesnt load daisysp-lgpl automaticly and i didnt got it to work.

I tried to fix the problem with the current version of daisysp but i guess daisysp-lgpl should be loaded automaticly from daisysp, and that isnt the case currently. So I tried adding

        CPMAddPackage(
                NAME daisysplgpl
                GITHUB_REPOSITORY "electro-smith/DaisySP-LPGL"
                GIT_TAG master
                )

after

https://github.com/madskjeldgaard/portedplugins/blob/24639cdeb48441e52c493de54aa822355326869a/CMakeLists.txt#L670-L680

and adding after setting USE_DAISYSP_LGPL:

    target_include_directories("${plugin_name}_scsynth" PUBLIC include/daisysplgpl)
    target_link_libraries("${plugin_name}_scsynth" DaisySP-LGPL)

Then i got an error that within daisysplpgl is missing dsp.h from daisysp couldnt be found.