Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Apple Silicon run-time error #177

Closed
buu700 opened this issue Aug 14, 2021 · 9 comments · Fixed by #181
Closed

Apple Silicon run-time error #177

buu700 opened this issue Aug 14, 2021 · 9 comments · Fixed by #181
Labels
bug Something isn't working

Comments

@buu700
Copy link

buu700 commented Aug 14, 2021

After successfully installing a version of rocksdb with #171 patched in (buu700/rocksdb-tmp), I ran into the following error on macOS 11.5.1:

[ 3:10PM] buu700@Cyph:~$ node
Welcome to Node.js v16.1.0.
Type ".help" for more information.
> require('rocksdb')
dyld: lazy symbol binding failed: Symbol not found: __Z20crc32c_runtime_checkv
  Referenced from: /Users/buu700/node_modules/rocksdb/build/Release/leveldown.node
  Expected in: flat namespace

dyld: Symbol not found: __Z20crc32c_runtime_checkv
  Referenced from: /Users/buu700/node_modules/rocksdb/build/Release/leveldown.node
  Expected in: flat namespace

Abort trap: 6

Edit: Looks like facebook/rocksdb#7710 was the issue, in which case simply updating RocksDB should resolve this.

@vweevers
Copy link
Member

Duplicate of #169, fixed by #171, will be released soon.

@vweevers
Copy link
Member

vweevers commented Aug 14, 2021

Sorry, misread, you already tried with #171.

@vweevers vweevers reopened this Aug 14, 2021
@vweevers vweevers added the bug Something isn't working label Aug 14, 2021
@vweevers
Copy link
Member

Looks like facebook/rocksdb#7710 was the issue, in which case simply updating RocksDB should resolve this.

We're at v6.17.3, which already has that fix (facebook/rocksdb@ee4bd47)

@buu700
Copy link
Author

buu700 commented Aug 14, 2021

Ah okay, guess my assumption there was wrong.

@buu700
Copy link
Author

buu700 commented Aug 17, 2021

I'm not sure if this is related or needs to be a new ticket, but I'm also getting the following error in an Electron app (same patched version of rocksdb, built with electron-builder on x86 macOS).

Screen Shot 2021-08-17 at 2 15 45 PM

@ghost
Copy link

ghost commented Aug 20, 2021

Hello there,
Thanks for the info, I was desperately tearing my hair out :)
Do you know when the patch will be available in this lib ?

@Nazgolze
Copy link
Contributor

Nazgolze commented Sep 5, 2021

I'm running into the problem that @buu700 described.
I haven't looked too deeply into it yet, but I think it's the lack of facebook/rocksdb#7883 in rocksdb v6.17.3

Will look into this more this week

@Nazgolze
Copy link
Contributor

I tried the following:

diff --git a/deps/rocksdb/rocksdb.gyp b/deps/rocksdb/rocksdb.gyp
index c5f6663..9c604eb 100644
--- a/deps/rocksdb/rocksdb.gyp
+++ b/deps/rocksdb/rocksdb.gyp
@@ -166,6 +166,7 @@
                   , '-stdlib=libc++'
                   , '-fno-omit-frame-pointer'
                   , '-momit-leaf-frame-pointer'
+                  , '-march=armv8-a+crc+crypto'
                 ]
 # , 'OTHER_LDFLAGS': ['-stdlib=libc++']
                 , 'GCC_ENABLE_CPP_RTTI': 'YES'

and it made no difference.

So much for my theory 😅

@Nazgolze
Copy link
Contributor

aaaahh, I didn't add , 'rocksdb/util/crc32c_arm64.cc', I will give this another try

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants