AriaSalvatrice / AriaModules

Aria Salvatrice's Signature Series - Cool and Nice virtual synthesizer modules
https://aria.dog/modules/
GNU General Public License v3.0
61 stars 14 forks source link

Build failure on multiple platforms #46

Closed cschol closed 4 years ago

cschol commented 4 years ago

Build fails on multiple platforms when compiling QuickJS using an environment like the official build system.

Unfortunately, I don't have time today to troubleshoot this further.

I am attaching the build log: aria.log

AriaSalvatrice commented 4 years ago

Thank you.

I am using (as far as I can tell) almost the exact same method VCV-Prototype does, and I'm also using the same fork. Does Prototype use the same build system as the rest of the library?

Is the library build environment described somewhere to reproduce locally?

JerrySievert commented 4 years ago

@cschol what version of macOS is the build system running, or is it using a cross-compiler?

I'm able to build on macOS 10.14, targeting 10.7, but the errors and warnings I'm seeing your log look like gcc messages.

JerrySievert commented 4 years ago

also compiled on the vm that all SV Modular modules are built on (ubuntu 16.04) and getting a clean build except for these warnings:

qjs.c: In function ‘main’:
qjs.c:471:28: warning: ‘best[3]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                 if (i == 0 || best[j] > ms)
                            ^
qjs.c:471:28: warning: ‘best[2]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
qjs.c:471:28: warning: ‘best[1]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
qjs.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-format-truncation’

which can safely be ignored since the qjs binary is not being used in this case

AriaSalvatrice commented 4 years ago

FWIW I'm getting it to build successfully from scratch on Windows Msys2, Ubuntu Studio 19.10, and via Azure continuous integration (macos-10.14, vs2017-win2016, ubuntu-16.04). I don't think the problem is on my end and am not experienced enough with build issues to have a clue what's breaking.

cschol commented 4 years ago

@JerrySievert I am cross-compiling with osxcross just like the build system does.

I think the problem is that the QuickJS build is not integrated into the build system correctly. It is invoked as a Makefile target and build with gcc always instead of using the osxcross cross-compiler for the Mac platform. We are cross-compiling for Mac and Windows platforms. Only Linux builds are native.

@AriaSalvatrice I won't be able to look into this until late Sunday. I will be traveling over the weekend starting today.

JerrySievert commented 4 years ago

@cschol hm. I'm wondering what vcv-prototype uses for a build then.

cschol commented 4 years ago

@AriaSalvatrice @JerrySievert Andrew says he is building VCV Prototype on 3 different native systems (no cross-compile). I think we need to figure out how to properly cross-compile this dependency. I am happy to help, but it will be next week before I can get to it.

AriaSalvatrice commented 4 years ago

Thanks! Seeing that it'd be a big 25GB Xcode install (that I'm not sure I can obtain legally without a mac capable of running the current version) to do inside a VM makes it really difficult to fix on my end (especially since even if I got the environment going, I have little clue where to start diagnosing why it goes wrong).

In the meantime, my automatic system is building binaries successfully, so people who want the new toys can install them manually.

JerrySievert commented 4 years ago

thinking further about it, you might be able to change https://github.com/AriaSalvatrice/AriaVCVModules/blob/master/Makefile#L31

and add CC=$(CC) for it to pass the cross-compiler in. just a thought.

cschol commented 4 years ago

The Rack SDK already defines that. I can't quite figure out yet why it uses gcc instead of the cross-compiler.

AriaSalvatrice commented 4 years ago

Solved by https://github.com/AriaSalvatrice/AriaVCVModules/commit/02741337c9d41ea36a1fded23fc7783918fec7df