StudioSixPlusOne / rack-modules

VCV Rack modules
GNU General Public License v3.0
25 stars 8 forks source link

Build failure on macOS platform #112

Closed cschol closed 1 year ago

cschol commented 3 years ago

Build failure on macOS platform during integration:

n file included from src/modules/Hula.cpp:2:                                                                                                              
./src/composites/Hula.h:116:40: error: implicit instantiation of undefined template 'std::__1::array<rack::simd::Vector<float, 4>, 4>'
    std::array<float_4, SIMD_CHANNELS> lastOuts;                                                                                                           
                                       ^                                                                                                                                                                                                                                                                              
src/modules/Hula.cpp:19:17: note: in instantiation of template class 'HulaComp<WidgetComposite>' requested here                                            
        config (Comp::NUM_PARAMS, Comp::NUM_INPUTS, Comp::NUM_OUTPUTS, Comp::NUM_LIGHTS);                                                                  
                ^                                                                                                                                                                                                                                                                                                     
/home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX10.13.sdk/usr/include/c++/v1/__tuple:223:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;                                                                                      
                                                               ^                                                                                                                                                                                                                                                      
In file included from src/modules/Hula.cpp:2:                            
./src/composites/Hula.h:117:40: error: implicit instantiation of undefined template 'std::__1::array<rack::simd::Vector<float, 4>, 4>'                     
    std::array<float_4, SIMD_CHANNELS> phases;                                                                                                                                                                                                                                                                        
                                       ^                                                                                                                   
/home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX10.13.sdk/usr/include/c++/v1/__tuple:223:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;                                                                                                                                                                                                                                                 
                                                               ^                                                                                           
In file included from src/modules/Hula.cpp:2:                      
./src/composites/Hula.h:118:40: error: implicit instantiation of undefined template 'std::__1::array<rack::simd::Vector<float, 4>, 4>'                                                                                                                                                                                
    std::array<float_4, SIMD_CHANNELS> fineTuneVocts;                                                                                                      
                                       ^                                                                                                                   
/home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX10.13.sdk/usr/include/c++/v1/__tuple:223:64: note: template is declared here                                                                                                                                                                        
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                               ^
In file included from src/modules/Hula.cpp:2:
./src/composites/Hula.h:123:93: error: implicit instantiation of undefined template 'std::__1::array<sspo::Decimator<4, 1, rack::simd::Vector<float, 4> >, 4>'
    std::array<sspo::Decimator<oversampleCount, oversampleQuality, float_4>, SIMD_CHANNELS> decimators;
                                                                                            ^
/home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX10.13.sdk/usr/include/c++/v1/__tuple:223:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                               ^
In file included from src/modules/Hula.cpp:2:
./src/composites/Hula.h:124:69: error: implicit instantiation of undefined template 'std::__1::array<std::__1::array<rack::simd::Vector<float, 4>, 4>, 4>'
    std::array<std::array<float_4, oversampleCount>, SIMD_CHANNELS> oversampleBuffers;
                                                                    ^
/home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX10.13.sdk/usr/include/c++/v1/__tuple:223:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                               ^
In file included from src/modules/Hula.cpp:2:
./src/composites/Hula.h:125:54: error: implicit instantiation of undefined template 'std::__1::array<sspo::BiQuad<rack::simd::Vector<float, 4> >, 4>'
    std::array<sspo::BiQuad<float_4>, SIMD_CHANNELS> dcOutFilters;
                                                     ^
/home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX10.13.sdk/usr/include/c++/v1/__tuple:223:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                               ^
In file included from src/modules/Hula.cpp:2:
./src/composites/Hula.h:126:54: error: implicit instantiation of undefined template 'std::__1::array<sspo::BiQuad<rack::simd::Vector<float, 4> >, 4>'
    std::array<sspo::BiQuad<float_4>, SIMD_CHANNELS> lpFilters;
                                                     ^
/home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX10.13.sdk/usr/include/c++/v1/__tuple:223:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                               ^
In file included from src/modules/Hula.cpp:2:
./src/composites/Hula.h:128:54: error: implicit instantiation of undefined template 'std::__1::array<sspo::BiQuad<rack::simd::Vector<float, 4> >, 4>'
    std::array<sspo::BiQuad<float_4>, SIMD_CHANNELS> depthFilters;
                                                     ^
/home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX10.13.sdk/usr/include/c++/v1/__tuple:223:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
                                                               ^
In file included from src/modules/Hula.cpp:2:
./src/composites/Hula.h:129:54: error: implicit instantiation of undefined template 'std::__1::array<sspo::BiQuad<rack::simd::Vector<float, 4> >, 4>'
    std::array<sspo::BiQuad<float_4>, SIMD_CHANNELS> feedbackFilters;
                                                     ^
/home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX10.13.sdk/usr/include/c++/v1/__tuple:223:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;

and

In file included from /home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX10.13.sdk/usr/include/c++/v1/algorithm:643:
/home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX10.13.sdk/usr/include/c++/v1/memory:4233:28: error: assigning to 'std::__1::__shared_weak_count *' from incompatible type 'std::__1::unique_ptr<std::__1::__shared_ptr_emplace<HulaComp<WidgetComposite>, std::__1::allocator<HulaComp<WidgetComposite> > >, std::__1::__allocator_destructor<std::__1::allocator<std::__1::__shared_ptr_emplace<HulaComp<WidgetComposite>, std::__1::allocator<HulaComp<WidgetComposite> > > > > >::pointer' (aka 'std::__1::__shared_ptr_emplace<HulaComp<WidgetComposite>, std::__1::allocator<HulaComp<WidgetComposite> > > *')
    __r.__cntrl_ = __hold2.release();
                   ~~~~~~~~^~~~~~~~~
/home/build/rack-plugin-toolchain/local/osxcross/bin/../SDK/MacOSX10.13.sdk/usr/include/c++/v1/memory:4600:29: note: in instantiation of function template specialization 'std::__1::shared_ptr<HulaComp<WidgetComposite> >::make_shared<Hula *>' requested here
    return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
                            ^
src/modules/Hula.cpp:20:21: note: in instantiation of function template specialization 'std::__1::make_shared<HulaComp<WidgetComposite>, Hula *>' requested here
        hula = std::make_shared<Comp> (this);
                    ^
pgatt commented 2 years ago

I can attempt to help building on Mac if you still need it.

curlymorphic commented 2 years ago

@pgatt Thank you for this offer, I shall finish the port to V2 and test the plugin versions this week before you invest any time.

If it is ok, I shall pass you details of a new branch to try and compile.

Thank you

pgatt commented 2 years ago

That’s fine by me!

On 18 Oct 2021, at 5:17 pm, Dave French @.***> wrote:

 @pgatt Thank you for this offer, I shall finish the port to V2 and test the plugin versions this week before you invest any time.

If it is ok, I shall pass you details of a new branch to try and compile.

Thank you

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

curlymorphic commented 2 years ago

@pgatt

Could you please test the branch "v2upgrade" for Mac compiling SHA 780bc53215b93d7bc423e75d39e4825e14cfe9e3

I have currently disabled the module "Iverson" due to very excessive loading times in the module browser, this is work in progress, that may overrun the VCV V2 release date. The remainder of the modules should all be working.

Many thanks for your help.

pgatt commented 2 years ago

Hi there, the plugins built okay, however they could not be loaded inside VCV.

Here's the error:

1.712 warn src/plugin.cpp:199 loadPlugin] Could not load plugin /Users/paulgatt/Documents/Rack2/plugins/StudioSixPlusOne: Failed to load library /Users/paulgatt/Documents/Rack2/plugins/StudioSixPlusOne/plugin.dylib: dlopen(/Users/paulgatt/Documents/Rack2/plugins/StudioSixPlusOne/plugin.dylib, 6): Symbol not found: __ZN4rack6window6WindowC1Ev Referenced from: /Users/paulgatt/Documents/Rack2/plugins/StudioSixPlusOne/plugin.dylib Expected in: /Applications/VCV Rack 2.app/Contents/MacOS/../Resources/libRack.dylib

curlymorphic commented 2 years ago

@pgatt

Many thanks for your time, however, I shall not be continuing with this plugin. I have posted on the VCV community forum, https://community.vcvrack.com/t/plugins-that-are-questionable-whether-there-will-be-v2-updates/14364/58

pgatt commented 2 years ago

That’s a real shame. I reckon we could have got you there without too much extra effort. It built and ran on the SDK build I’m sure you’re not too far off. Would you reconsider adopting if we can get it Re-building and working in the next couple of days? I think it’s awesome having different developers with different points of views and strengths and also the original vision for the modules still involved in the projects and the community should be strong enough to help out, especially considering the same app and code needs to run across three OS’s.

Either way thanks for your time and if you don’t continue please know that your efforts are appreciated.

Thanks, Paul.

On 22 Oct 2021, at 3:30 am, Dave French @.***> wrote:

 @pgatt

Many thanks for your time, however, I shall not be continuing with this plugin. I have posted on the VCV community forum, https://community.vcvrack.com/t/plugins-that-are-questionable-whether-there-will-be-v2-updates/14364/58

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

pgatt commented 2 years ago

Further update in case you were still curious. Not only does your plugin work on the SDK build, but it also works in the latest Community Edition.

curlymorphic commented 2 years ago

Just to confirm, this is on a Mac?

That is good news.

I will finish the upgrade to V2. I had disabled Iverson, what appears to be the most used module in the test build as it had issues with the module browser, and needs some work on the midi, but if all three os's are now possible this looks very promising.

I may not complete in time for the official V2 launch, maybe a couple of weeks late.

Many thanks for your help and encouragement.

Dave.

pgatt commented 2 years ago

I’ve got it building with the help of Andrew Belt and it’s only a few lines of code and should make it more stable across all platforms if my information is correct.

On 26 Oct 2021, at 5:22 pm, Dave French @.***> wrote:

 Just to confirm, this is on a Mac?

That is good news.

I will finish the upgrade to V2. I had disabled Iverson, what appears to be the most used module in the test build as it had issues with the module browser, and needs some work on the midi, but if all three os's are now possible this looks very promising.

I may not complete in time for the official V2 launch, maybe a couple of weeks late.

Many thanks for your help and encouragement.

Dave.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

pgatt commented 2 years ago

And yes, on Mac but it should benefit users on all platforms.

On 26 Oct 2021, at 6:03 pm, (null) (null) @.***> wrote:

 I’ve got it building with the help of Andrew Belt and it’s only a few lines of code and should make it more stable across all platforms if my information is correct.

On 26 Oct 2021, at 5:22 pm, Dave French @.***> wrote:

 Just to confirm, this is on a Mac?

That is good news.

I will finish the upgrade to V2. I had disabled Iverson, what appears to be the most used module in the test build as it had issues with the module browser, and needs some work on the midi, but if all three os's are now possible this looks very promising.

I may not complete in time for the official V2 launch, maybe a couple of weeks late.

Many thanks for your help and encouragement.

Dave.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

pgatt commented 2 years ago

So apparently the bug is: It instantiates a new Window in many places with rack::window::Window(). This means that it’s trying to create many Rack windows which will definitely break things.

It looks like the author is attempting to load an SVG from the existing Window. You can do that with APP->window->loadSvg() or simply Svg::load().

That was what Andrew told me and by only adjusting your code a little got it to build on Mac.

curlymorphic commented 2 years ago

Thank you, this sounds like it could be the issue I was also having with Iverson, where the module browser looks like it was refreshing many times, I suspected once per widget, so about 150 for Iverson and 75 times for Iverson Jr.

Would it be easy for you to make a pull request? This would allow me to start for a build that works on a Mac

pgatt commented 2 years ago

https://www.dropbox.com/s/nqkyh4858qxd7we/rack-modules.zip?dl=0

I was going to tackle not loading fonts or svgs in constructors, next if you weren't going to proceed.

https://github.com/VCVRack/manual/blob/master/Migrate2.md

I'm glad you are keen to re-take them forward.

PS: Andrew Belt seems happy to field questions if you get stuck again.

curlymorphic commented 2 years ago

Thank you.

I hope it ok if I ask for another test mac build once I have finished the update.

yes, there is some work to still do to bring them in line with current guidance, and to take advantage of the new v2 features.

pgatt commented 2 years ago

Oh and also, once I got it building I had a play with Wallenda, I had forgotten how much I liked that module!

curlymorphic commented 2 years ago

It seems like Wallenda, my first published module is more popular than I expected, thanks for the compliment.

pgatt commented 2 years ago

Absolutely fine to ask for as many test builds as you need. Only caveat is I'm probably on the other side of the world to you!

curlymorphic commented 1 year ago

Closing as v2.0 migration is completed