zynaddsubfx / zyn-fusion-build

Build Scripts For Zyn-Fusion
Do What The F*ck You Want To Public License
122 stars 39 forks source link

Errors when building cross-compiling to windows #92

Open Shinzui-i opened 2 years ago

Shinzui-i commented 2 years ago

I'm using Pop_OS to try and cross compile the full release to windows. I have run the installation of dependencies and when I try to use the make MODE=release -f Makefile.windows.mk all command, when it gets to the portaudio dependency folder there is a lot of undefined references. I'm not sure how to fix this. I've copied the last couple of undefined reference until the code stopped running. Could I please get some help?

/usr/bin/x86_64-w64-mingw32-ld: src/common/.libs/pa_process.o: in function 'PaUtil_SetInterleavedInputChannels': /home/usr/Documents/zyn-fusion-build/deps/portaudio/src/common/pa_process.c:481: undefined reference to '__assert_fail' /usr/bin/x86_64-w64-mingw32-ld: src/common/.libs/pa_process.o:/home/usr/Documents/zyn-fusion-build/deps/portaudio/src/common/pa_process.c:483: more undefined references to '__assert_fail' follow /usr/bin/x86_64-w64-mingw32-ld: src/common/.libs/pa_process.o: in function 'PaUtil_EndBufferProcessing': /home/usr/Documents/zyn-fusion-build/deps/portaudio/src/common/pa_process.c:1651: undefined reference to '__stack_chk_fail' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:170: lib/libportaudio.la] Error 1 make[1]: Leaving directory '/home/usr/Documents/zyn-fusion-build/deps/portaudio' make: *** [Makefile.windows.mk:73: build_portaudio] Error 2

fundamental commented 2 years ago

Curious. I don't recall encountering this issue in the past. It must be something in relation to a different version of mingw interacting with the port audio build. Have you attempted to change the port audio version to something more recent? I recall we were building a fairly old version. If that doesn't work then there should be something to invoke for port audio which would add the -DNDEBUG flag to the compiler which would optimize away anythin in relation to assert() calls. No idea about the __stack_chk_fail reference though. I'd have to dig through stackoverflow to see where that originated.

jjYBdx4IL commented 2 years ago

Use Ubuntu 21.10 for cross-compilation.