Closed cschol closed 2 years ago
Thanks for checking this out! All the missing objects should be compiled into libchowdsp.a, which does look like it's getting linked in. That library should be built during the make dep
step. Would it be possible to share the logs from that step?
Here is the make dep
log from the Windows build:
make: warning: -j8 forced in submake: resetting jobserver mode.
cd /home/build/plugin-src && make clean
make[1]: Entering directory '/home/build/plugin-src'
rm -rfv build plugin.dll dist
make[1]: Leaving directory '/home/build/plugin-src'
cd /home/build/plugin-src && make cleandep
make[1]: Entering directory '/home/build/plugin-src'
rm -rfv dep
removed directory 'dep'
make[1]: Leaving directory '/home/build/plugin-src'
cd /home/build/plugin-src && make dep
make[1]: Entering directory '/home/build/plugin-src'
echo /home/build/plugin-src
/home/build/plugin-src
cd libs && cmake -G 'MSYS Makefiles' -DCMAKE_INSTALL_PREFIX="/home/build/plugin-src/dep" -DCMAKE_INSTALL_LIBDIR=lib -Bbuild-libs
CMake Error: Could not create named generator MSYS Makefiles
Generators
* Unix Makefiles = Generates standard UNIX makefiles.
Green Hills MULTI = Generates Green Hills MULTI files
(experimental, work-in-progress).
Ninja = Generates build.ninja files.
Watcom WMake = Generates Watcom WMake makefiles.
CodeBlocks - Ninja = Generates CodeBlocks project files.
CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
CodeLite - Ninja = Generates CodeLite project files.
CodeLite - Unix Makefiles = Generates CodeLite project files.
Sublime Text 2 - Ninja = Generates Sublime Text 2 project files.
Sublime Text 2 - Unix Makefiles
= Generates Sublime Text 2 project files.
Kate - Ninja = Generates Kate project files.
Kate - Unix Makefiles = Generates Kate project files.
Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files.
Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.
make[1]: *** [libs/libs.mk:21: libs/build-libs/libchowdsp.a] Error 1
make[1]: Leaving directory '/home/build/plugin-src'
make: *** [Makefile:164: plugin-build-win] Error 2
make: *** [Makefile:253: docker-plugin-build-win] Error 2
The other problem is that Rack's make depclean
step does not remove the libchowdsp.a
.
When building multiple platforms, the first platform will build libchowdsp.a
(in this case macOS) and the subsequent platform (in this case Windows) will not rebuild it, but try to use the previously built one.
It is better to install the built library into the dep
directory (via make install
) and link it in from there. Then the make depclean
step will ensure to remove the build artifact before building the next platform.
EDIT: This does not fix the above problem with the library not being built on Windows.
Gotcha, that makes sense. I'll switch the library make command to use make install
.
I'm not sure I understand how to fix the library build failure. Using 'MSYS Makefiles' as the CMake generator is being chosen by Rack's environment, but I guess I should override that with "Unix Makefiles"? It seems a little odd to have to override Rack's chosen generator.
The MSYS Makefiles
generator issue is actually an issue in dep.mk
that will be fixed in the next Rack SDK release. Upon investigation, the current implementation only works in the actual native MSYS
shell. It does not work in the cross-compilation environment of the rack-plugin-toolchain
. So far, noone seem to have used cmake
for building dependencies, so we didn't notice. I have verified that with that SDK fix, the Windows build works correctly on its own.
Now we just need to manage the dep
directory removal as discussed above and we should be good.
Cool, good to know! I think I've got make cleandep
working as expected now, so hopefully everything will be good to go for making builds.
Confirmed that latest changes work and all platforms build successfully. Closing issue. Thank you!
Looks like a linker error on the Windows platform: