Closed rasgo-cc closed 1 year ago
Was able to overcome this by building "fat" binaries for leveldown and manually copying them (the build folder) into node_modules/leveldown/build
(this, on macOS arm64).
Reference: https://github.com/Level/leveldown/issues/766#issuecomment-907793537
For reference:
Setting buildDependenciesFromSource=true
should also work.
@rasgo-cc buildDependenciesFromSource=true
does not work when I build on arm64 and run on x64. Can you help me with adding prebuild leveldown into my project? https://github.com/Level/leveldown/issues/766#issuecomment-907793537 I am using PouchDB and leveldown is a dependency of it. I have no idea how to do this.
My app has
leveldown
as a dependency (throughpouchdb
) and it seems that whenever building it on macOS arm64 and for x64, the binaries picked are still the ones for arm64. When running the app on x64, the app never really starts and I get this error on Sentry (not sure how I could get it any other way as the stdout/stderr doesn't show this):While building the app this is what I get:
From here it looks like it picks the arch correctly but in practice the arm64 binaries are still used?
On arm64 I get a build directory on
node_modules/leveldown/build/Release
but on x64 that directory is not created, not sure if that helps.Initially I was trying to build for
arch=universal
but figured that simply building for x64 from arm64 would yield the same result.Any idea what's going wrong?