Closed elanhickler closed 7 years ago
please add me to the contributor list for RS-MET so we can finally fix the OS X issues.
there's a handful more bad errors than just this.
i have now included stdlib.h in rosic.h - this should contain the missing definitions and it seems to be automatically included anywhere but on osx. i really really really need to review any change to my library before i drag them into the repository. it's not safe to assume that you can make a change here or there without breaking anything else (even if it seems so at first). so, can you work on your fork and pass me the desired changes? maybe, you can upload your fork to your gitlab and give me the link? however, i think, i'll set myself up with a mac build-system next week. after all, i want a mac version of my chainer, too
...i need to make my new mini-pc my main workstation. then i can also work directly on prettyscope on a proper desk (it sucks to work on the big screen without desk...i.e. sitting in an armchair with a plank for keyboard and mouse)
in jura_AudioPlugin.cpp
bool AudioPlugin::setPreferredBusArrangement(bool isInput, int bus, const AudioChannelSet& preferredSet)
no definition for this function in AudioPlugin, comment it out, or i think it's override that is causing the problem, there's no function to override
imageDrawer.cpp
swap should be std::swap
ImagePainter.cpp
move your template functions to ImagePainter.h
y u do dis robin!!!
ok - i'll add these changes tomorrow...keep posting. ... i know, much of this stuff seems innocuous enough...but only i know the quirks of my code
romos_AudioConnection.h
AudioConnection::AudioConnection(Module sourceModule = NULL, int outputIndex = 0, Module targetModule = NULL, int inputIndex = 0);
change to
AudioConnection(Module sourceModule = NULL, int outputIndex = 0, Module targetModule = NULL, int inputIndex = 0);
(just remove AudioConnection:: i believe)
romos_ModuleTypeRegistry.h
ModuleTypeRegistry::ModuleTypeRegistry();
-> remove ModuleTypeRegistry::
romos_ProcessingStatus.h
VoiceAllocator::VoiceAllocator();
-> remove ProcessingStatus::
romos_VoiceAllocator.h
VoiceAllocator::VoiceAllocator();
-> remove VoiceAllocator::
romos_InfrastructuralModules.h
virtual void ParameterModule::setValueFromController(double controllerValue);
-> remove ParameterModule::
tnt_sparse_matrix_csr.h
template <class T>
Sparse_Matrix_CompRow<T>::Sparse_Matrix_CompRow(int M, int N, int nz,
const T *val, const int *r, const int *c) : val_(nz,val),
rowptr_(M, r), colind_(nz, c), dim1_(M), dim2_(N) {}
rowptr(M, r), colind(nz, c) should be rowptr(M, *r), colind(nz, *c)
kiss_fft.h
had to comment out #include <malloc.h>
get malloc from
rosic.h
had to comment out #include <malloc.h>
get malloc from
jura_Editor.h
juce::Array<Rectangle
Rectangle needs namespace, add juce::
ok - i applied a batch of changes (some a little different from what you suggested):
imageDrawer.cpp swap should be std::swap
->replaced by rsSwap
romos_AudioConnection.h AudioConnection::AudioConnection(Module sourceModule = NULL, int outputIndex = 0, Module targetModule = NULL, int inputIndex = 0); change to AudioConnection(Module sourceModule = NULL, int outputIndex = 0, Module targetModule = NULL, int inputIndex = 0); (just remove AudioConnection:: i believe)
->done
romos_ModuleTypeRegistry.h ModuleTypeRegistry::ModuleTypeRegistry(); -> remove ModuleTypeRegistry:: romos_ProcessingStatus.h VoiceAllocator::VoiceAllocator(); -> remove ProcessingStatus:: romos_VoiceAllocator.h VoiceAllocator::VoiceAllocator(); -> remove VoiceAllocator:: romos_InfrastructuralModules.h virtual void ParameterModule::setValueFromController(double controllerValue); -> remove ParameterModule::
->done
tnt_sparse_matrix_csr.h
template
->removed TNT dependency (singular value decomposition commented out)
jura_Editor.h
juce::Array
->done
kiss_fft.h
had to comment out #include
->done
some other changes need further consideration:
rosic.h
had to comment out #include
->breaks windows codeblocks project due to alloca (probably linux too - need to try)
in jura_AudioPlugin.cpp bool AudioPlugin::setPreferredBusArrangement(bool isInput, int bus, const AudioChannelSet& preferredSet) no definition for this function in AudioPlugin, comment it out, or i think it's override that is causing the problem, there's no function to override
-> commenting out triggers assertion with msvc
ImagePainter.cpp move your template functions to ImagePainter.h y u do dis robin!!!
-> no good idea: (non-inlined) template functions in headers easily lead to "multiple definition" linker errors
what error messages do these produce? there must be different ways to solve these issues without introducing other issues...or maybe just wait until i have my own mac build system and sort these out myself...
ImagePainter.cpp move your template functions to ImagePainter.h y u do dis robin!!!
-> no good idea: (non-inlined) template functions in headers easily lead to "multiple definition" linker errors
why did you define your own abs
where did i? probably because i needed a template-based version. not sure. where is it?
oh, nevermind abs.
template
definitely those are redifinitions
use std::swap
ahh...these come from copying over the wu algorithm from wikipedia at the point where this source file didn't have access to the other definitions. can probably be removed now. but shouldn't be an issue
some other changes need further consideration:
rosic.h had to comment out #include
get malloc from ->breaks windows codeblocks project due to alloca (probably linux too - need to try)
then do ifdefs
alloca should never be used
using rsSwap now
ok, i have wrapped #include
..äähh...the software here apparently automatically converts double underscores to boldface
...and messes up other things in other ways
last few issues
Libraries/JUCE/modules/rapt/Visualization/Graphics/ImageDrawer.cpp roundToInt undefined in 3 places
Libraries/JUCE/modules/jura_framework/audio/jura_AudioPlugin.h const AudioChannelSet& preferredSet) override; get rid of override, there's no function to override.
Libraries/JUCE/modules/jura_framework/audio/jura_AudioPlugin.cpp line 218 remove AudioProcessor:: you shouldn't put a class namespace within its own scope!
oh i see, once it's not overridden then that becomes a problem.
this is weird - there is a setPreferredBusArrangement baseclass function: juce_AudioProcessor.h, line 338
Libraries/JUCE/modules/jura_framework/audio/jura_AudioPlugin.cpp line 218 remove AudioProcessor:: you shouldn't put a class namespace within its own scope!
this is actually a call to the baseclass method
without the baseclass qualifier, i'd have an infinite recursion (the function would call itself) ;-) ...i.e. stack-overflow
what does that function do anyway? do I need it right now?
also define those roundToInts please!!! that's the almost last issue.
The you have a billion warnings to go through once you get your mac running.
i trigger an assertion error if i don't override it - look at the comment in the cpp file. build a plugin with msvc, plug it in: BÄM: jassert(blah) gets triggered. ...at least in my chainer. does it not happen in your plugins?
alloca should never be used
hmm...well - this was an optimization for some performance critical code. stack memory is (much) faster to allocate than heap memory. i may try to get rid of this
ok then keep alloca, it's not an issue anymore
i think, a better way to deal with the situation when a performance critical (i.e. supposed to be used inside realtime code) function needs some temporary auxilliary memory would be to pass a "workArea" pointer. this could be even more efficient than alloca....but also more inconvenient on the client code side (which must maintain the workArea memory).....i want to use this idiom for low-level math/dsp functions in rapt
Libraries/JUCE/modules/rapt/Visualization/Graphics/ImageDrawer.cpp roundToInt undefined in 3 places
using rsRoundToInt now
...soo the last one is setPreferredBusArrangement now?
yes, except rsRoundToInt is not found in mac osx... but no idea why. Can't give any suggetions.
I think your includes are somehow structured wrong. When I go to definition in MSVC or in XCode it goes to Breakpoint Modulator
D:_PROGRAMMING\RS-MET\Libraries\JUCE\modules\rapt\Modulators\Envelopes\BreakpointModulator.cpp
that's where it thinks it's defined.
when i hover my mouse over it in MSVC it says RAPT::roundToInt
wtfffffffff
I would get rid of RoindToInt in the breakpointmodulator and go from there
oh! i get warnings (but not errors) related to that in windows/codeblocks, too
yeah...i'll try to get rid of these "preliminary" implementations there
ok - moved and templatized the rsRoundToInt function. compiles now without warning over here
ok, only issue is the setPreferredBusArrangement now
this is really a weirdo. the function is clearly declared in juce::AudioProcessor...even implemented - i even call the baseclass implementation from my overriden implementation. ...so you say, the error goes away, when i just remove the "override" tag from the declaration?
remove override and remove the class namespace in the function call
as i told you above: the baseclass qualifier in the function call is intentional and important. without it, it could run into an infinite recursion, i.e. give a stack-overflow runtime error
not only "could" it, it actually does - i just tried it
is there something ifdeffed in the baseclass or something? i just looked but found nothing
what does the compiler error actually say?
see thread: https://forum.juce.com/t/abs-rand-randmax-etc-functions-on-os-x-not-found/22856