VCVRack / VCV-Prototype

Other
130 stars 22 forks source link

[makefile] Update supercollider to v3.12 #59

Closed SteveRussell33 closed 1 year ago

SteveRussell33 commented 2 years ago

Updates supercollider to v3.12 instead of using old vcv-prototype-support branch. Fixes https://github.com/VCVRack/VCV-Prototype/issues/54#issuecomment-923109721

clwe commented 2 years ago

Nice, make dep works now. But I'm still getting an error while building the plugin with make:

g++ -std=c++11 -Wsuggest-override  -Idep/include -Idep/supercollider/include -Idep/supercollider/include/common -Idep/supercollider/lang -Idep/supercollider/common -Idep/supercollider/include/plugin_interface -Idep/vult -Idep/include/libpd -DHAVE_LIBDL -DPD_INTERNAL -Ofast -DINTERP -fPIC -I../Rack-SDK-1.1.6//include -I../Rack-SDK-1.1.6//dep/include -MMD -MP -g -O3 -march=nocona -funsafe-math-optimizations -Wall -Wextra -Wno-unused-parameter -DARCH_WIN -D_USE_MATH_DEFINES  -c -o build/src/SuperColliderEngine.cpp.o src/SuperColliderEngine.cpp
In file included from src/SuperColliderEngine.cpp:4:
dep/supercollider/lang/LangSource/SC_LanguageConfig.hpp:28:10: fatal error: boost/filesystem/path.hpp: No such file or directory
   28 | #include <boost/filesystem/path.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [../Rack-SDK-1.1.6//compile.mk:69: build/src/SuperColliderEngine.cpp.o] Error 1

Do I have to install Boost via pacman, maybe?

clwe commented 2 years ago

Installing Boost via pacman works: pacman -S mingw-w64-x86_64-boost So that builds successfully. But maybe we should include the Boost header directory via the build command, since it's already "bundled" within the supercollider build directory?

clwe commented 2 years ago

Some other obseravtions:

So make fails to recognize that the library was already built and tries to rebuild it, which fails, because the build folder is already there.

mxa commented 2 years ago

Installing Boost via pacman works: pacman -S mingw-w64-x86_64-boost So that builds successfully. But maybe we should include the Boost header directory via the build command, since it's already "bundled" within the supercollider build directory?

Related: https://github.com/VCVRack/VCV-Prototype/issues/52#issuecomment-865115318

clwe commented 2 years ago

I just read your other https://github.com/VCVRack/VCV-Prototype/issues/54#issuecomment-923109721 about the boost headers. That helped! I think we can also add -Idep/supercollider/external_libraries/boost/ to the FLAGSvariable to use the boost that is used to build libsclang.a.

While that resolves the error in https://github.com/VCVRack/VCV-Prototype/pull/59#issuecomment-923900319, (so boost/filesystem works) it throws new errors about the flags -lasound and -ludev. I guess they are part of the full boost package when I install it with pacman, but maybe they are not part of the built-in boost?

So when compiling with FLAGS += ... -Idep/supercollider/external_libraries/boost/ I'm getting this right now:

$ make
g++ -o plugin.dll build/src/Prototype.cpp.o build/src/SuperColliderEngine.cpp.o dep/lib/libefsw-static-release.a dep/supercollider/build/lang/liblibsclang.a dep/supercollider/build/external_libraries/libtlsf.a dep/supercollider/build/external_libraries/hidapi/windows/libhidapi.a dep/supercollider/build/external_libraries/hidapi/hidapi_parser/libhidapi_parser.a dep/supercollider/build/external_libraries/libboost_thread_lib.a dep/supercollider/build/external_libraries/libboost_system_lib.a dep/supercollider/build/external_libraries/libboost_regex_lib.a dep/supercollider/build/external_libraries/libboost_filesystem_lib.a dep/supercollider/build/external_libraries/libyaml.a -lpthread -lasound -ludev -shared -L../Rack-SDK-1.1.6/ -lRack
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lasound
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -ludev
collect2.exe: error: ld returned 1 exit status
make: *** [../Rack-SDK-1.1.6//compile.mk:59: plugin.dll] Error 1

When I remove those flags, I get linker errors, so I guess those libraries are really needed.

SteveRussell33 commented 2 years ago

What I can tell from my cursory searches is that asound is a linux package related to Advanced Linux Sound Architecture (ALSA). dep\supercollider\external_libraries\portaudio\portaudio_submodule\CMakeLists.txt line 314

udev is another Linux package "libudev-dev" needed by hidapi test program (remove?) dep\supercollider\external_libraries\hidapi\testgui\Makefile.linux line 17