DISTRHO / DISTRHO-Ports

Linux audio plugins and LV2 ports
http://distrho.sourceforge.net/ports
252 stars 44 forks source link

Cross compile on qemu results in pthread fail #29

Closed guysoft closed 7 months ago

guysoft commented 6 years ago

Hey, From the zynthian project, we are trying to compile under qemu, and its seems like running lv2_ttl_generator fails. It seems to fail because of multi-threads in TAL-Filter-2. Is there a way to make it run on a single thread?

Error attached:

zynthianOS:/home/pi/zynthian-sw/plugins/DISTRHO-Ports/bin/lv2/TAL-Filter-2.lv2# file TAL-Filter-2.so 
TAL-Filter-2.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=639b75241c7e0853af9d97af5ffda944cb6433a8, stripped
root@zynthianOS:/home/pi/zynthian-sw/plugins/DISTRHO-Ports/bin/lv2/TAL-Filter-2.lv2#  /home/pi/zynthian-sw/plugins/DISTRHO-Ports/bin/../libs/lv2_ttl_generator ./TAL-Filter-2.so 
Generate ttl data for './TAL-Filter-2.so', basename: 'TAL-Filter-2'
Writing manifest.ttl... done!
Writing TAL-Filter-2.ttl... done!
Writing presets.ttl...
Saving preset 1/17...
Saving preset 2/17...
Saving preset 3/17...
Saving preset 4/17...
Saving preset 5/17...
Saving preset 6/17...
Saving preset 7/17...
Saving preset 8/17...
Saving preset 9/17...
Saving preset 10/17...
Saving preset 11/17...
Saving preset 12/17...
Saving preset 13/17...
Saving preset 14/17...
Saving preset 15/17...
Saving preset 16/17... done!
lv2_ttl_generator: pthread_mutex_lock.c:81: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted

Thanks, part of https://github.com/zynthian/zynthian-sys/issues/59

guysoft commented 6 years ago

Also reported to qemu: https://bugs.launchpad.net/qemu/+bug/1776478

falkTX commented 6 years ago

did you try using a cross-compiler?

guysoft commented 6 years ago

Yes, and this compilation works also on a raspberrypi. It seems pthead is called at some point from TAL-Filter-2.ttl, and its implemented differently in qemu. But I can't see where its used in the pReset generation.

guysoft commented 6 years ago

Note - compilation passes its lv2_ttl_generator that crashes.

guysoft commented 5 years ago

Hey, So update, I got as far as coss-compile debugging this thanks to help in qemu bug report, now what I am missing is debug symbols on lv2_ttl_generator and TAL-Filter-2.so, if anyone has pointers on that it would help!

falkTX commented 7 months ago

This is solved with latest git, and CI actions are in place to detect build issues on Linux ARM now too.

guysoft commented 7 months ago

Ok, was closed in Zynthian around 2021 because they moved to KXStudio. https://github.com/zynthian/zynthian-sys/issues/59#issuecomment-767624399

FYI @jofemodo