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

Building on Linux #4

Closed
ssabug opened this issue Feb 10, 2024 · 3 comments · Fixed by #6
Closed

Building on Linux #4

ssabug opened this issue Feb 10, 2024 · 3 comments · Fixed by #6

Comments

@ssabug
Copy link

ssabug commented Feb 10, 2024

Hi,

I tried to build Manta on fedora linux but the compilation failed.

I modified the Makefile JUCE_CPPFLAGS adding "-FPERMISSIVE=1" .

Source/audio/Manta.h

replaced lane by const_cast <float**>(lane) on lines 235,247,250,256,259

Source/audio/DryWetMix.cpp

dryBuf.getArrayOfWritePointers() by const_cast <float**>(dryBuf.getArrayOfWritePointers()) on lines 52,86

Source/audio/Oversampling.cpp

auto samplesUp = const_cast <float**>(buffer.getArrayOfWritePointers()); line 269,287
const auto samplesUpConst = const_cast <const float**>(samplesUp); line 288
const auto samplesIn =const_cast <float**>( inputBuffer.getArrayOfReadPointers()); line 270

Source/audio/PitchGlitcher.cpp

const_cast <float**>(audioBuffer.getArrayOfWritePointers()) line 214

Source/Processor.cpp

auto samples = const_cast <float**>(mainBuffer.getArrayOfWritePointers()); line 176
const auto constSamples = const_cast <const float**>(mainBuffer.getArrayOfReadPointers()); line 177
const auto constSamples = const_cast <const float**>(mainBuffer.getArrayOfReadPointers()) line 266
const auto samples = const_cast <float**>(mainBuffer.getArrayOfWritePointers()); line 265
const_cast <float**>(resampledMainBuf.getArrayOfWritePointers()), line 344

This way, standalone and vst3 builds, lv2 generates juce assertion failed errors.

The plugin works in bitwig on fedora linux. Thank you for sharing your work.

@Mrugalla
Copy link
Owner

yep. A while ago JUCE changed the return type of getArrayOfWritePointers and getArrayOfReadPointers from float** to float* const* which since then made it hard for people to just build and run older JUCE projects. Feel free to send a pull request with those changes if you want to. Also if you gave me your linux build I'd add it to the release section

@therealfumbles
Copy link

With a combination of find and sed I replaced every instance of float** with float* const* in all the .h and .cpp files and it compiled without any warnings or errors with JUCE 7.0.11 on debian.

It seems to work fine. I'm just wondering if a blanket replace like that would alter how the plugin behaves?

I tried building it with 7.0.2 to avoid making any code changes but it failed at the end with missing operands for mkdir and cp. It was having trouble building the plugin bundles for some reason. In any case, 7.0.2 is buggy for LV2 which is my preferred format right now.

@nvssynthesis
Copy link
Contributor

This issue is not Linux specific. Passing floatconst to a function that takes in float** should not be allowed on any compiler. const_casting is a dangerous, not recommended solution. I have just fixed this issue as commented above and am submitting a pull request.

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

Successfully merging a pull request may close this issue.

4 participants