Crash on require
Opened this issue · 2 comments
So I've tried to give this thing a shot, but it doesn't really seem to be working. I've set the PKG_CONFIG_PATH to where mimic is set up as a part of Mycroft and it compiled (albeit with half a dozen warnings), but when including it in an actual program it just crashes instantly:
/home/pi/ros/roscar/src/driver/node_modules/bindings/bindings.js:121
throw e;
^
Error: libttsmimic_lang_cmu_us_kal.so.0: cannot open shared object file: No such file or directory
at Object.Module._extensions..node (internal/modules/cjs/loader.js:807:18)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at bindings (/home/pi/ros/roscar/src/driver/node_modules/bindings/bindings.js:112:48)
at Object.<anonymous> (/home/pi/ros/roscar/src/driver/node_modules/node-mimic/lib/mimic.js:2:37)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
My test code is simply this:
const mimic = require('node-mimic');
Running on a Raspberry Pi 4, with Raspbian Buster. Mimic on its own seems to work perfectly fine through bash and mycroft itself.
Any thoughts?
Hello! Thanks for your report.
How did you build mimic? node-mimic requires mimic to build as a shared library, but some distributions (notably, the PPA that mycroft made for Ubuntu) only package static libraries.
Sometimes, the build fails in that case (complaining about PIE vs non-PIE), and sometimes the build succeeds, but then it fails at runtime.
The best and most recommended configuration is Fedora 30+ with the mimic package from their repo. Second best is building mimic from source, and passing --disable-static --enable-shared
to the configure script.
Ah, that's gotta be it then. I didn't build mimic myself, this is a burned mycroft image with everything preinstalled since it's kind of a pain to get it working on Buster otherwise, and nothing else has the boot drivers for the Pi4.
I'll give it a shot compiling from source, that's mostly worked for other things so far. Thanks for the tip!