Kautenja / PotatoChips

Eurorack modules based on programmable sound chip emulation.
Other
45 stars 4 forks source link

undefined symbol _ZN15WaveTableEditorIhE11ColorBorderE on armv7l #48

Closed hexdump0815 closed 3 years ago

hexdump0815 commented 3 years ago

Describe the bug

i'm maintaining armv7l (32bit) and aarch64 (64bit) builds of vcvrack and the open source plugins at https://github.com/hexdump0815/vcvrack-dockerbuild-v1 - when i build the PotatoChips plugin it compiles fine on armv7l but when i start rack i get "undefined symbol _ZN15WaveTableEditorIaE11ColorBorderE" and the plugin will not load - the same build works fine on aarch64 and x86-64 ... i guess this is a armv7l specific problem and not really a problem of your plugin, but maybe you have an idea where it might come from ... could it be a 32 vs 64 bit issue maybe? any help would be welcome as i'm not that familiar with the c++ details

To Reproduce

build and run the latest version of your plugin on armv7l

Expected behavior

it works

Screenshots

not needed

Environment

Additional context

already given in the initial description

hexdump0815 commented 3 years ago

some updates:

armv7l$ nm -g plugin.so | grep WaveTableEditor 0002b358 W _ZN15WaveTableEditorIaE10onDragMoveERKN4rack5event8DragMoveE 00060790 u _ZN15WaveTableEditorIaE11ColorBorderE 0002b47c W _ZN15WaveTableEditorIaE4drawERKN4rack6widget6Widget8DrawArgsE 0002b668 W _ZN15WaveTableEditorIaE8onButtonERKN4rack5event6ButtonE 0002b330 W _ZN15WaveTableEditorIaED0Ev 0002b310 W _ZN15WaveTableEditorIaED1Ev 0002b310 W _ZN15WaveTableEditorIaED2Ev 0002402c W _ZN15WaveTableEditorIhE10onDragMoveERKN4rack5event8DragMoveE 000602a8 u _ZN15WaveTableEditorIhE11ColorBorderE 00024150 W _ZN15WaveTableEditorIhE4drawERKN4rack6widget6Widget8DrawArgsE 00024448 W _ZN15WaveTableEditorIhE8onButtonERKN4rack5event6ButtonE 00023ee4 W _ZN15WaveTableEditorIhED0Ev 00023ec4 W _ZN15WaveTableEditorIhED1Ev 00023ec4 W _ZN15WaveTableEditorIhED2Ev 0007689c V _ZTI15WaveTableEditorIaE 000760c4 V _ZTI15WaveTableEditorIhE 000606f8 V _ZTS15WaveTableEditorIaE 000600d4 V _ZTS15WaveTableEditorIhE 000769a4 V _ZTV15WaveTableEditorIaE 000765cc V _ZTV15WaveTableEditorIhE

Kautenja commented 3 years ago

Hey thanks for bringing this to my attention. I hadn't tried to compile for ARM, so hadn't come across this. I patched a fix in the master branch, but haven't tried to compile for ARM. I believe the problem was due to my usage of class level static constexpr variables, which have now been removed. Let me know if there are still compilations issues.

hexdump0815 commented 3 years ago

thanks a lot for the quick response - your fix looks good and compiles well on arm: the symbols are correct and i guess that it will load now ... will test for real tomorrow

hexdump0815 commented 3 years ago

i can confirm that works for real now - closing the issue

thanks a lot and best wishes - hexdump

Kautenja commented 3 years ago

Awesome! happy to help get things working on ARM. How do you go about compiling VCV Rack for ARM? I use Travis CI to run tests on each commit on GitHub and they have an ARM platform, but I ran into some compilation issues from the Rack SDK. Namely, it appears that

  1. --arch=nocona is invalid in the rack makefile (and should either be omitted for ARM or else set to the appropriate ARM architecture like armv7) when I try compiling on my raspberry pi
  2. when I manually resolve (1) I get blocked by fatal error: pmmintrin.h: No such file or directory and have not found a solution

If you could share the details about how you get VCV Rack compiled for ARM architectures that would be awesome! Then my test platform would guarantee the ARM builds are passing when I make new commits (very useful for future projects).

hexdump0815 commented 3 years ago

to compile vcvrack and the plugins on arm i have a bunch of patches to make it compile nicely here in this repo: https://github.com/hexdump0815/vcvrack-dockerbuild-v1 ... i do all the builds in a docker container (to have a well defined environment) via some script also in that repo, there are also other scripts to setup everything for compilation etc. ... for translating the intel sse etc. simd instructions (where used) to arm neon i'm using the simde project ... with all this i have vcvrack and all open source plugins i could find so far (currently 165!) compiling perfectly on both 32bit and 64bit arm ... as far as i can see nearly all of them are also working perfectly fine - i of course cannot really test all the resulting 1750 modules i have in there currently :)

p.s.: in case you want to play around wih vcvrack on your raspberry pi, you might have a look at my sonaremin project: https://github.com/hexdump0815/sonaremin which is a ready run vcvrack system for various arm systems - one just needs to write the corresponding image to an sd card, maybe some minimal config adjustments are required and then it will boot directly into a fully working vcvrack ... documentation is sadly lacking a bit ... there is even a headless mode where the sonaremin will start vcvrack with a predefined patch

Kautenja commented 3 years ago

Oh sweet I'll snag the docker environments and build against those, thanks! Also, Sonaremin looks gnarly :O I'll definitely be playing around with that this week.