Closed cschol closed 2 months ago
Still failing:
In file included from src/AdWidget.cpp:1:
In file included from src/Ad.h:12:
In file included from src/AdditiveOscillator.h:3:
In file included from src/SpectrumStereo.h:2:
src/Spectrum.h:31:5: error: implicit instantiation of undefined template 'std::array<int, 32>'
prime = {
^
/home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX11.1.sdk/usr/include/c++/v1/__tuple:219:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
^
In file included from src/AdWidget.cpp:1:
In file included from src/Ad.h:12:
In file included from src/AdditiveOscillator.h:3:
src/SpectrumStereo.h:73:5: error: cannot initialize object parameter of type 'Spectrum' with an expression of type 'SpectrumStereo'
process_tmp();
^~~~~~~~~~~
In file included from src/AdWidget.cpp:1:
In file included from src/Ad.h:12:
src/AdditiveOscillator.h:76:23: error: cannot initialize object parameter of type 'Spectrum' with an expression of type 'SpectrumStereo'
int highest = min(spec->getHighest(),
^~~~
src/AdditiveOscillator.h:104:12: error: cannot initialize object parameter of type 'Spectrum' with an expression of type 'SpectrumStereo'
wave = spec->getAmp(0) * sine_iMin2 + spec->getAmp(1) * sine_iMin1;
^~~~
src/AdditiveOscillator.h:104:43: error: cannot initialize object parameter of type 'Spectrum' with an expression of type 'SpectrumStereo'
wave = spec->getAmp(0) * sine_iMin2 + spec->getAmp(1) * sine_iMin1;
^~~~
src/AdditiveOscillator.h:110:15: error: cannot initialize object parameter of type 'Spectrum' with an expression of type 'SpectrumStereo'
wave += spec->getAmp(i) * sine_i;
^~~~
src/AdWidget.cpp:72:12: error: cannot initialize a parameter of type 'engine::Module *' with an lvalue of type 'Ad *'
setModule(module);
^~~~~~
/home/build/rack-plugin-toolchain/Rack-SDK-mac-x64/include/app/ModuleWidget.hpp:46:33: note: passing argument to parameter 'module' here
void setModule(engine::Module* module);
^
src/AdWidget.cpp:84:11: error: no matching function for call to 'createParamCentered'
addParam(createParamCentered<RoundLargeBlackKnob>(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/build/rack-plugin-toolchain/Rack-SDK-mac-x64/include/helpers.hpp:98:15: note: candidate function template not viable: no known conversion from 'Ad *' to 'engine::Module *' for 2nd argument
TParamWidget* createParamCentered(math::Vec pos, engine::Module* module, int paramId) {
^
src/AdWidget.cpp:86:11: error: no matching function for call to 'createParamCentered'
addParam(createParamCentered<RoundLargeBlackKnob>(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/build/rack-plugin-toolchain/Rack-SDK-mac-x64/include/helpers.hpp:98:15: note: candidate function template not viable: no known conversion from 'Ad *' to 'engine::Module *' for 2nd argument
TParamWidget* createParamCentered(math::Vec pos, engine::Module* module, int paramId) {
^
src/AdWidget.cpp:88:11: error: no matching function for call to 'createParamCentered'
addParam(createParamCentered<RoundLargeBlackKnob>(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/build/rack-plugin-toolchain/Rack-SDK-mac-x64/include/helpers.hpp:98:15: note: candidate function template not viable: no known conversion from 'Ad *' to 'engine::Module *' for 2nd argument
TParamWidget* createParamCentered(math::Vec pos, engine::Module* module, int paramId) {
^
Hm. 🤔 I made a post in the forum.
so on a raw mac it builds fine, which means something in your code is screwing up header interpretation in the toolchain. I have a 242 not a 251 based docker on my mac so can't build it there because of DarkPJ301MPort
I took a quick look at your code and some thoughs
If I had to be I would say it is because you are using namespace std
in header files. This is a bad practice for a variety o reasons and makes your code fragile under changing include orders, which is what I think is happening here. Just for general C++ goodness, I'd strongly recommend fixing that.
A good rule of thumb in rack if you do want to do things like that is always make sure you include "rack.hpp" very first. It looks like you might be doing that through your included headers but I'm not 100% sure.
You have a header called "plugin.hpp" which shadows a header in the SDK. I wonder if the wrong one is getting included in mac toolchain builds somehow? That could also be a problem. I think most of us call our slug header Slug.h
so in your case vanTies.hpp
Again just some thoughts. Wasn't able to repro the blowout here because i haven't updated my toolchain in a bit.
Thanks, @baconpaul !
The new version is in the library. Apparently it works.
Regarding your remarks:
I tried to install the toolkit, but I got stuck there.
ha yeah my first guess when reading was "include array but that's already there so it must be something else"
It wasn't something else. Just the problem was fixed and you hadn't updated either community or this issue!
Anyway, using namespace std in headers is a really bad idea. It will seem annoying typing "std::" and "rack::" all the time but you will appreciate it if and as your project scales.
Will do that. Thanks for the feedback, @baconpaul ! 🙂
I think this was solved with the latest commit and the additional build failure was an old one.
Yeah that’s what happened indeed!
Multiple compile errors on macOS platform: