charlock_holmes failing to install on fresh GDK install
Overview
gdk reconfigure is failing on installing the charlock_holmes gem. I'm able to install it just fine on its own (see command output below). And these directories already exist. I do have issues with the gem pristine commands for re2 and charlock_holmes@0.7.6 (see commands below) depending on the situation.
/Users/eric/.rvm/gems/ruby-2.6.6/gems/charlock_holmes-0.7.6/Users/eric/.rvm/gems/ruby-2.6.6/gems/charlock_holmes-0.7.7
My problems could be stemming from a broken initial install: #1016 (closed)
There are a couple other discussions on Slack:
-
https://gitlab.slack.com/archives/C02PF508L/p1591304623100100
- This one describes installing it on its own which I can do fine. Their solution was
sudo gem install charlock_holmes -v=0.7.6 -- --with-icu-dir=/usr/local/Cellar/icu4c --with-cxxflags='-Wno-reserved-user-defined-literal -std=c++11'-- @johncai
- This one describes installing it on its own which I can do fine. Their solution was
Searching for brew re2 in Slack, I see the following discussions. Initially I was seeing a problem with re2 not being installed but I used gem install re2 -v '1.2.0' --source 'https://rubygems.org/'. I did have brew install re2 from the prerequisites though
- #992 (closed)
-
https://gitlab.slack.com/archives/C2Z9A056E/p1593462602356800
- "FYI the most common issue I've seen so far is that upgrading to PostgreSQL 11 via Homebrew often requires reinstalling everything that depended on libicu since PostgreSQL 11 forces that upgrade. Maybe we need to automatically run
brew reinstall postgresql@10,brew unpin node@12; brew reinstall node@12,gem pristine re2,gem pristine charlock_holmes, etc. somewhere if we detect the libicu symbol error." -- @stanhu
- "FYI the most common issue I've seen so far is that upgrading to PostgreSQL 11 via Homebrew often requires reinstalling everything that depended on libicu since PostgreSQL 11 forces that upgrade. Maybe we need to automatically run
Related threads (similar problems):
- (no resolution documented) https://gitlab.slack.com/archives/C2Z9A056E/p1595368307308900
- (no resolution documented) https://gitlab.slack.com/archives/C2Z9A056E/p1595444980324700
Failing gdk reconfigure
$ gdk reconfigure
------------------------------------------------------------
Installing gitlab-org/gitlab Ruby gems
------------------------------------------------------------
Ignoring charlock_holmes-0.7.7 because its extensions are not built. Try: gem pristine charlock_holmes --version 0.7.7
Ignoring charlock_holmes-0.7.6 because its extensions are not built. Try: gem pristine charlock_holmes --version 0.7.6
[...]
creating Makefile
current directory:
/Users/eric/.rvm/gems/ruby-2.6.6/gems/charlock_holmes-0.7.6/ext/charlock_holmes
make "DESTDIR=" clean
current directory:
/Users/eric/.rvm/gems/ruby-2.6.6/gems/charlock_holmes-0.7.6/ext/charlock_holmes
make "DESTDIR="
compiling converter.c
compiling encoding_detector.c
compiling ext.c
compiling transliterator.cpp
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h:413:31:
error: invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wreserved-user-defined-literal]
#define RUBY_ARCH "universal-"RUBY_PLATFORM_OS
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h:414:35:
error: invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wreserved-user-defined-literal]
#define RUBY_PLATFORM "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h:414:55:
error: invalid suffix on literal; C++11 requires a space between literal and
identifier [-Wreserved-user-defined-literal]
#define RUBY_PLATFORM "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS
^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:2111:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/intern.h:56:19:
warning: 'register' storage class specifier is deprecated and incompatible with
C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/intern.h:56:36:
warning: 'register' storage class specifier is deprecated and incompatible with
C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
^~~~~~~~~
2 warnings and 3 errors generated.
make[1]: *** [transliterator.o] Error 1
make failed, exit code 2
Gem files will remain installed in
/Users/eric/.rvm/gems/ruby-2.6.6/gems/charlock_holmes-0.7.6 for inspection.
Results logged to
/Users/eric/.rvm/gems/ruby-2.6.6/extensions/universal-darwin-19/2.6.0/charlock_holmes-0.7.6/gem_make.out
An error occurred while installing charlock_holmes (0.7.6), and Bundler cannot
continue.
Make sure that `gem install charlock_holmes -v '0.7.6' --source
'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
charlock_holmes
make: *** [.gitlab-bundle] Error 5
(❌) Error: Failed to reconfigure.
-------------------------------------------------------
You can try the following that may be of assistance:
- Run 'gdk doctor'.
- Visit the troubleshooting documentation:
https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/master/doc/troubleshooting.md.
- Visit https://gitlab.com/gitlab-org/gitlab-development-kit/-/issues to
see if there are known issues.
-------------------------------------------------------
charlock_holmes installs just fine outside of gdk commands
$ gem install charlock_holmes -v '0.7.6' --source 'https://rubygems.org/'
Building native extensions. This could take a while...
Successfully installed charlock_holmes-0.7.6
Parsing documentation for charlock_holmes-0.7.6
Done installing documentation for charlock_holmes after 0 seconds
1 gem installed
$ gem pristine charlock_holmes --version 0.7.6
ERROR: While executing gem ... (Gem::Exception)
Failed to find gems ["charlock_holmes"] = 0.7.6
$ gem pristine charlock_holmes --version 0.7.7
Restoring gems to pristine condition...
Building native extensions with: '--with-icu-dir=/opt/local --with-cxxflags=-Wno-reserved-user-defined-literal'
This could take a while...
Restored charlock_holmes-0.7.7
$ gem pristine re2
ERROR: While executing gem ... (Gem::Exception)
Failed to find gems ["re2"] >= 0
$ gem install re2 -v '1.2.0' --source 'https://rubygems.org/'
Building native extensions. This could take a while...
Successfully installed re2-1.2.0
Parsing documentation for re2-1.2.0
Done installing documentation for re2 after 0 seconds
1 gem installed
$ gem pristine re2
Restoring gems to pristine condition...
Building native extensions. This could take a while...
Restored re2-1.2.0
Failing to run rails migrations
$ bundle exec rails db:migrate
Could not find charlock_holmes-0.7.6 in any of the sources
Run `bundle install` to install missing gems.
$ bundle install
[...]
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/eric/.rvm/gems/ruby-2.6.6/gems/charlock_holmes-0.7.6/ext/charlock_holmes
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20200731-31578-nkfu91.rb extconf.rb
checking for -licui18n... no
checking for -licui18n... yes
checking for unicode/ucnv.h... yes
checking for -lz... yes
checking for -licuuc... yes
checking for -licudata... yes
creating Makefile
current directory: /Users/eric/.rvm/gems/ruby-2.6.6/gems/charlock_holmes-0.7.6/ext/charlock_holmes
make "DESTDIR=" clean
current directory: /Users/eric/.rvm/gems/ruby-2.6.6/gems/charlock_holmes-0.7.6/ext/charlock_holmes
make "DESTDIR="
compiling converter.c
compiling encoding_detector.c
compiling ext.c
compiling transliterator.cpp
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h:413:31:
error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
#define RUBY_ARCH "universal-"RUBY_PLATFORM_OS
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h:414:35:
error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
#define RUBY_PLATFORM "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h:414:55:
error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
#define RUBY_PLATFORM "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS
^
In file included from transliterator.cpp:1:
In file included from ./common.h:9:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
In file included from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:2111:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/intern.h:56:19:
warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/intern.h:56:36:
warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
^~~~~~~~~
2 warnings and 3 errors generated.
make: *** [transliterator.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/eric/.rvm/gems/ruby-2.6.6/gems/charlock_holmes-0.7.6 for inspection.
Results logged to /Users/eric/.rvm/gems/ruby-2.6.6/extensions/universal-darwin-19/2.6.0/charlock_holmes-0.7.6/gem_make.out
An error occurred while installing charlock_holmes (0.7.6), and Bundler cannot continue.
Make sure that `gem install charlock_holmes -v '0.7.6' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
charlock_holmes
$ ls -al /usr/local/Cellar/icu4c
total 0
drwxr-xr-x 3 eric staff 96 Jul 30 19:31 .
drwxrwxr-x 101 eric admin 3232 Jul 30 19:47 ..
drwxr-xr-x 12 eric staff 384 Jul 30 19:30 67.1
Proposal (optional)
Just looking for some more debugging steps and how to solve this problem.
Environment (optional)
- Operating System: macOS 10.15.3
- The contents of your
gdk.yml - Ruby version:
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-darwin19] - GDK version:
b3c07c29git rev-parse --short HEAD