Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ruby gem fails to install, charlock_holmes
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message

Joined: 31 May 2011
Posts: 1248
Location: 42.68n 85.41w

PostPosted: Thu Feb 21, 2013 1:29 am    Post subject: ruby gem fails to install, charlock_holmes Reply with quote :evil:
Back to top
View user's profile Send private message

Joined: 20 Jan 2013
Posts: 4

PostPosted: Mon Mar 25, 2013 9:58 am    Post subject: Reply with quote

Same here while upgrading to Gitlab 4.2. Found nothing @ googlesearch.

g++ version: g++ (Gentoo 4.6.3 p1.11, pie-0.5.2) 4.6.3
make version: GNU Make 3.82
ruby version: ruby 1.9.3p392 (2013-02-22 revision 39386)
bundler version: 1.3.4
Back to top
View user's profile Send private message

Joined: 24 Oct 2005
Posts: 248
Location: Berkeley, California

PostPosted: Tue Jul 22, 2014 2:55 pm    Post subject: Reply with quote

I am having the same problem.

Trying to install gitlab, I am stuck at charlock_holmes.

Has anyone successfully setup gitlab on gentoo?

Below I describe my install procedure, up to the failure, followed by my emerge --info.

# checkout gitlab
sudo -u git -H git clone ~/gitlab
Cloning into 'gitlab'...
remote: Counting objects: 85480, done.
remote: Compressing objects: 100% (23422/23422), done.
remote: Total 85480 (delta 64776), reused 81511 (delta 60810)
Receiving objects: 100% (85480/85480), 72.63 MiB | 2.13 MiB/s, done.
Resolving deltas: 100% (64776/64776), done.
Checking connectivity... done.

# change to checkout directory
cd ~git/gitlab

# list branches
sudo -u git -H git branch -a

    * master
      remotes/origin/HEAD -> origin/master

# Switch branches
sudo -u git -H git checkout -b 7-0-stable origin/7-0-stable

    Branch 7-0-stable set up to track remote branch 7-0-stable from origin.
    Switched to a new branch '7-0-stable'

# Copy the example GitLab config
sudo -u git -H cp config/gitlab.yml.example config/gitlab.yml
sed -i "s|/home/git|$(echo ~git)|" config/gitlab.yml

# Make sure GitLab can write to the log/ and tmp/ directories
sudo chown -R git log/
sudo chown -R git tmp/
sudo chmod -R u+rwX log/
sudo chmod -R u+rwX tmp/

# Create directory for satellites
sudo -u git -H mkdir ~git/gitlab-satellites
sudo chmod u+rwx,g=rx,o-rwx ~git/gitlab-satellites

# Make sure GitLab can write to the tmp/pids/ and tmp/sockets/ directories
sudo chmod -R u+rwX tmp/pids/
sudo chmod -R u+rwX tmp/sockets/

# Make sure GitLab can write to the public/uploads/ directory
sudo chmod -R u+rwX public/uploads

# Copy the example Unicorn config
sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb
sed -i "s|/home/git|$(echo ~git)|" config/unicorn.rb

# Copy the example Rack attack config
sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
sed -i "s|/home/git|$(echo ~git)|" config/initializers/rack_attack.rb

# MySQL only:
sudo -u git cp config/database.yml.mysql config/database.yml

# need to install gem bundler
emerge dev-ruby/bundler

sudo -u git -H bundle install --deployment --without development test postgres aws
Fetching source index from                                                                                                   
Using rake (10.3.2)                                                                                                                                             
Using ace-rails-ap (2.0.1)                                                                                                                                                   
Using i18n (0.6.9)                                                                                                                                                                 
Using json (1.8.1)
Using minitest (5.3.4)
Using thread_safe (0.3.4)
Using tzinfo (1.2.1)
Using activesupport (4.1.1)
Using builder (3.2.2)
Using erubis (2.7.0)
Using actionview (4.1.1)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using actionpack (4.1.1)
Using mime-types (1.25.1)
Using polyglot (0.3.4)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (4.1.1)
Using activemodel (4.1.1)
Using arel (
Using activerecord (4.1.1)
Using bundler (1.3.5)
Using thor (0.19.1)
Using railties (4.1.1)
Using hike (1.2.3)
Using multi_json (1.10.1)
Using tilt (1.4.1)
Using sprockets (2.11.0)
Using sprockets-rails (2.1.3)
Using rails (4.1.1)
Using acts-as-taggable-on (2.4.1)
Using asciidoctor (0.1.4)
Using descendants_tracker (0.0.3)
Using ice_nine (0.10.0)
Using axiom-types (0.0.5)
Using bcrypt-ruby (3.1.2)
Using sass (3.2.19)
Using bootstrap-sass (
Using carrierwave (0.9.0)
Using timers (1.1.0)
Using celluloid (0.15.2)
Installing charlock_holmes (
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby19 extconf.rb
checking for main() in -licui18n... yes
checking for main() in -licui18n... yes
checking for unicode/ucnv.h... yes
  -- tar zxvf file-5.08.tar.gz
  -- ./configure --prefix=/var/lib/gitolite/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes- --disable-shared --enable-static --with-pic
  -- patch -p0 < ../file-soft-check.patch
  -- make -C src install
  -- make -C magic install
checking for main() in -lmagic_ext... yes
checking for magic.h... yes
creating Makefile

compiling ext.c
In file included from ext.c:1:0:
common.h:14:14: warning: ‘charlock_new_enc_str’ defined but not used [-Wunused-function]
common.h:23:14: warning: ‘charlock_new_str’ defined but not used [-Wunused-function]
common.h:32:14: warning: ‘charlock_new_str2’ defined but not used [-Wunused-function]
compiling encoding_detector.c
In file included from encoding_detector.c:3:0:
common.h:14:14: warning: ‘charlock_new_enc_str’ defined but not used [-Wunused-function]
compiling converter.c
In file included from converter.c:2:0:
common.h:23:14: warning: ‘charlock_new_str’ defined but not used [-Wunused-function]
common.h:32:14: warning: ‘charlock_new_str2’ defined but not used [-Wunused-function]
compiling transliterator.cpp
In file included from transliterator.cpp:1:0:
common.h:14:14: warning: ‘VALUE charlock_new_enc_str(const char*, size_t, void*)’ defined but not used [-Wunused-function]
common.h:32:14: warning: ‘VALUE charlock_new_str2(const char*)’ defined but not used [-Wunused-function]
linking shared-object charlock_holmes/
encoding_detector.o: In function `rb_get_supported_encodings':
encoding_detector.c:(.text+0xa0): undefined reference to `uenum_count'
encoding_detector.c:(.text+0xc5): undefined reference to `uenum_next'
encoding_detector.c:(.text+0x12a): undefined reference to `uenum_next'
encoding_detector.c:(.text+0x168): undefined reference to `uenum_next'
encoding_detector.c:(.text+0x1a6): undefined reference to `uenum_next'
encoding_detector.c:(.text+0x1ed): undefined reference to `uenum_next'
encoding_detector.o:encoding_detector.c:(.text+0x22a): more undefined references to `uenum_next' follow
encoding_detector.o: In function `rb_encdec__alloc':
encoding_detector.c:(.text+0x73d): undefined reference to `u_errorName'
converter.o: In function `rb_converter_convert':
converter.c:(.text+0xb4): undefined reference to `ucnv_convert'
converter.c:(.text+0xf4): undefined reference to `ucnv_convert'
converter.c:(.text+0x18e): undefined reference to `u_errorName'
transliterator.o: In function `rb_transliterator_id_list':
transliterator.cpp:(.text+0x158): undefined reference to `u_errorName'
transliterator.o: In function `rb_transliterator_transliterate':
transliterator.cpp:(.text+0x2dd): undefined reference to `icu::UnicodeString::Uni[code]code[/code]String(char const*, int)'
transliterator.cpp:(.text+0x305): undefined reference to `icu::UnicodeString::~UnicodeString()'
transliterator.cpp:(.text+0x31b): undefined reference to `icu::UMemory::operator new(unsigned long)'
transliterator.cpp:(.text+0x331): undefined reference to `icu::UnicodeString::UnicodeString(char const*, int)'
transliterator.cpp:(.text+0x36a): undefined reference to `icu::UnicodeString::toUTF8(icu::ByteSink&) const'
transliterator.cpp:(.text+0x3b6): undefined reference to `icu::ByteSink::~ByteSink()'
transliterator.cpp:(.text+0x405): undefined reference to `u_errorName'
transliterator.cpp:(.text+0x472): undefined reference to `icu::UMemory::operator delete(void*)'
transliterator.cpp:(.text+0x4a6): undefined reference to `icu::UnicodeString::~UnicodeString()'
transliterator.o: In function `icu::StringByteSink<std::string>::~StringByteSink()':
transliterator.cpp:(.text._ZN3icu14StringByteSinkISsED2Ev[_ZN3icu14StringByteSinkISsED5Ev]+0xf): undefined reference to `icu::ByteSink::~ByteSink()'
transliterator.o: In function `icu::StringByteSink<std::string>::~StringByteSink()':
transliterator.cpp:(.text._ZN3icu14StringByteSinkISsED0Ev[_ZN3icu14StringByteSinkISsED0Ev]+0x13): undefined reference to `icu::ByteSink::~ByteSink()'
transliterator.cpp:(.text._ZN3icu14StringByteSinkISsED0Ev[_ZN3icu14StringByteSinkISsED0Ev]+0x1c): undefined reference to `icu::UMemory::operator delete(void*)'
transliterator.o:([_ZTVN3icu14StringByteSinkISsEE]+0x28): undefined reference to `icu::ByteSink::GetAppendBuffer(int, int, char*, int, int*)'
transliterator.o:([_ZTVN3icu14StringByteSinkISsEE]+0x30): undefined reference to `icu::ByteSink::Flush()'
transliterator.o:([_ZTIN3icu14StringByteSinkISsEE]+0x10): undefined reference to `typeinfo for icu::ByteSink'
./libmagic_ext.a(compress.o): In function `uncompressgzipped':
/var/lib/gitolite/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes- undefined reference to `inflateInit2_'
/var/lib/gitolite/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes- undefined reference to `inflate'
/var/lib/gitolite/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes- undefined reference to `inflateEnd'
collect2: error: ld returned 1 exit status
make: *** [] Error 1

Gem files will remain installed in /var/lib/gitolite/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes- for inspection.
Results logged to /var/lib/gitolite/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes-
An error occurred while installing charlock_holmes (, and Bundler cannot continue.
Make sure that `gem install charlock_holmes -v ''` succeeds before bundling.

emerge --info
Portage 2.2.8-r1 (default/linux/amd64/13.0, gcc-4.7.3, glibc-2.17, 3.12.13-gentoo x86_64)
System uname: Linux-3.12.13-gentoo-x86_64-Intel-R-_Core-TM-_i7-4770T_CPU_@_2.50GHz-with-gentoo-2.2
KiB Mem:    16285768 total,    827380 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Tue, 01 Jul 2014 12:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.3.3
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.4_p6-r1, 1.5-r1, 1.6.3-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo mother-stilen-com
CFLAGS="-march=core-avx2 -O2 -pipe"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/qmail/alias /var/qmail/control /var/spool/munin-async/.ssh /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=core-avx2 -O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="3dnow a52 aac acl alsa amd64 apache2 authdaemond berkdb bzip2 cli cracklib crypt cxx dbus device-mapper dri dvd encode fam fortran gdbm gnutls hald iconv imagemagick imap ipv6 jpeg kde kde-meta lame lm_sensors maildir mmx modules mp3 mpeg multilib mysql ncurses nls nptl ogg opengl openmp oss pam pcre policykit qmail qmail-spp qt3support readline semantic-desktop session sockets spamassassin sse sse2 ssl static-libs tcpd tiff unicode valias vhosts vorbis xcomposite xml xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="access authz_host auth auth_basic authn_file authz_default authz_groupfile authz_user auth_dbm auth_anon auth_digest alias file-cache echo charset-lite cache disk-cache mem-cache ext-filter case_filter case-filter-in filter deflate mime-magic cern-meta expires headers usertrack unique-id proxy proxy-connect proxy-ftp proxy-http info include cgi cgid dav dav-fs vhost-alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions unique_id userdir so" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5 php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev vesa vga intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

eselect ruby list
Available Ruby profiles:
  [1]   ruby19 (with Rubygems) *
  [2]   ruby20 (with Rubygems)
Back to top
View user's profile Send private message

Joined: 18 Jan 2007
Posts: 1002
Location: Massachusetts USA

PostPosted: Tue Jul 22, 2014 4:38 pm    Post subject: Reply with quote

See and
Back to top
View user's profile Send private message

Joined: 24 Oct 2005
Posts: 248
Location: Berkeley, California

PostPosted: Wed Jul 23, 2014 7:31 am    Post subject: Reply with quote

Both of those links are pretty old.

If I run this it works:
gem install charlock_holmes
Fetching: charlock_holmes-0.7.3.gem (100%)
Building native extensions.  This could take a while...
Successfully installed charlock_holmes-0.7.3
Parsing documentation for charlock_holmes-0.7.3
Installing ri documentation for charlock_holmes-0.7.3
Done installing documentation for charlock_holmes after 0 seconds
1 gem installed

I don't really understand why gitlab uses charlock_holmes-

I see there is an update (7-1-stable), however it still uses

Is it OK if I edit Gemfile.lock, insisting on charlock_holmes-0.7.3 instead?

After editing Gemfile.lock, this finished:

sudo -u git -H bundle install --deployment --without development test postgres aws

I can move on with the install directions and see if this work.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum