Open cwilling opened 7 months ago
@cwilling to help me tie down the issue, can you confirm if this is broken in the released versions? I know you were testing with some unreleased binaries.
On a fresh machine, a git clone (after pull of #131), submodule update & npm install results in a simpleble.node dated Aug 23 i.e. the old version. If I replace it with the artifacts version from earlier today (Dec 2 05:30), all works OK. Also OK if I do npm run build:all
- a good version of simpleble.node is produced.
The problem is therefore that npm install
doesn't pull the correct simpleble.node. I see that I have a file ~/.npm/_prebuilds/673995-webbluetooth-v3.1.0-napi-v6-linux-x64.tar.gz
which I presume is what provides the (wrong) simpleble.node.
However back on my normal machine with glibc-2.33, even the newer artifacts version fails because it wants glibc-2.34. In that case the only solution is to rebuild simpleble.node locally.
I'm not sure there's anything you can do about that - probably a result of ubunt-latest in your workflow.
OK, I think the best fix for this will be to use prebuildify-cross
in a similar way to how we do it in node-usb.
This will require prebuildify to support cmake-js, which I'll look in to.
When running any example, the supplied simpleble.node generates an error:
I can fix this locally by running
npm run build:all
which generates a new simpleble.node and everything works fine.I initially thought the error would be due to your build machine having a glibc version which is too recent for what I have on the machine I'm using. I see in your .github/workflows/prebuild.yml that linux-x64 jobs run on ubuntu-latest and maybe that is a problem for other systems out in the wild (not everyone wants/is able to run the very latest). However I also tried all this on another machine running Ubuntu 22.04 (full updated) and had the same issue so I'm a bit confused.