Closed delphaber closed 2 years ago
Reinstalling cld3 is a good call, but it is to rebuild the extension rather than to clear the Bootsnap cache. It is common that updating protocol buffer breaks the ABI compatibility, requiring the extension to be rebuilt for the new ABI.
I suggest to check if /Users/faber/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cld3-3.4.4/lib/cld3/../../ext/cld3/libcld3.bundle
is rebuilt after bundle pristine
. Also you may check the log of Bundler and RubyGems.
To reinstall only cld3, you may run: bundle exec gem pristine cld3
hi @akihikodaki thanks for the fast reply!
I've reinstalled protobuf@3
with homebrew (protobuf
recipe is pointing to version 21
, so I had to use protobuf@3
, which points to version 3.20.1
)
$ brew reinstall protobuf@3
$ brew link protobuf@3 # to make sure compiler can find the library
I've tried to run gem pristine cld3
to make sure the bundle is compiled again
[09:16]
↳ $ gem pristine cld3
Restoring gems to pristine condition...
Building native extensions. This could take a while...
Restored cld3-3.4.1
[09:16]
↳ $ ls -la /Users/faber/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cld3-3.4.1/lib/../ext/cld3/libcld3.bundle
-rwxr-xr-x 1 faber staff 837K Jul 19 09:16 /Users/faber/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cld3-3.4.1/lib/../ext/cld3/libcld3.bundle*
[09:17]
↳ $ gem pristine cld3
Restoring gems to pristine condition...
Building native extensions. This could take a while...
Restored cld3-3.4.1
[09:17]
↳ $ ls -la /Users/faber/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cld3-3.4.1/lib/../ext/cld3/libcld3.bundle
-rwxr-xr-x 1 faber staff 837K Jul 19 09:17 /Users/faber/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cld3-3.4.1/lib/../ext/cld3/libcld3.bundle*
You can see the timestamps from ls -la
changing.
Unfortunately I still get symbol not found in flat namespace '__ZN6google8protobuf8internal16InternalMetadataD1Ev'
when running rails c
(or any other rails/rake command that load the bundle)
I've also cleared my bootsnap cache, I've stropped spring and I've reboot my mac 😅
Update
I've tried with cld3 v3.4.4, but I've got the same result
I'm running into this same issue as well.
I have just published version 3.5.0, removing protocol buffers dependency! It has always been a problem since the release of this gem. Hopefully it eliminates this class of problems once for all...
thank you @akihikodaki ! I'm gonna try this tomorrow!
Upgrading to 3.5.0
worked for me. Thank you @akihikodaki
Thanks it works for me too!
Hello :)
thanks for this gem!
After an upgrade to protobuf,
rails console
raises this errorI'm using these versions at the moment:
I've tried to reinstall cld3 with
bundle pristine
, to deletetmp/cache/bootsnap
but got the same error.Any suggestion?
Thank you!