brianmario/charlock_holmes — Issue #10: fails to build
Author: mookie-
Created: 2012-02-26 20:53:22+00:00
State: open

Hi,
I have the following problem build charlock_holmes.

I'm using Gentoo with ruby 1.9.3p125.

Can someone please tell me what I'm doing wrong or whats missing.

```
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=/home/gitlab/.gem/ruby/1.9.1/gems/charlock_holmes-0.6.8/ext/charlock_holmes/dst/ --disable-shared --enable-static --with-pic
-- make -C src install
-- make -C magic install
checking for main() in -lmagic_ext... yes
checking for magic.h... yes
creating Makefile

make
compiling converter.c
common.h:23:14: warning: ‘charlock_new_str’ defined but not used
common.h:32:14: warning: ‘charlock_new_str2’ defined but not used
compiling encoding_detector.c
common.h:14:14: warning: ‘charlock_new_enc_str’ defined but not used
compiling ext.c
common.h:14:14: warning: ‘charlock_new_enc_str’ defined but not used
common.h:23:14: warning: ‘charlock_new_str’ defined but not used
common.h:32:14: warning: ‘charlock_new_str2’ defined but not used
linking shared-object charlock_holmes.so
converter.o: In function `rb_converter_convert':
converter.c:(.text+0x80): undefined reference to `ucnv_convert_48'
converter.c:(.text+0xc0): undefined reference to `ucnv_convert_48'
converter.c:(.text+0x139): undefined reference to `u_errorName_48'
encoding_detector.o: In function `rb_get_supported_encodings':
encoding_detector.c:(.text+0x9f): undefined reference to `uenum_count_48'
encoding_detector.c:(.text+0xca): undefined reference to `uenum_next_48'
encoding_detector.c:(.text+0x12e): undefined reference to `uenum_next_48'
encoding_detector.c:(.text+0x16d): undefined reference to `uenum_next_48'
encoding_detector.c:(.text+0x1b1): undefined reference to `uenum_next_48'
encoding_detector.c:(.text+0x1fd): undefined reference to `uenum_next_48'
encoding_detector.o:encoding_detector.c:(.text+0x23e): more undefined references to `uenum_next_48' follow
encoding_detector.o: In function `rb_encdec__alloc':
encoding_detector.c:(.text+0x774): undefined reference to `u_errorName_48'
./libmagic_ext.a(compress.o): In function `uncompressgzipped':
/home/gitlab/.gem/ruby/1.9.1/gems/charlock_holmes-0.6.8/ext/charlock_holmes/src/file-5.08/src/compress.c:357: undefined reference to `inflateInit2_'
/home/gitlab/.gem/ruby/1.9.1/gems/charlock_holmes-0.6.8/ext/charlock_holmes/src/file-5.08/src/compress.c:363: undefined reference to `inflate'
/home/gitlab/.gem/ruby/1.9.1/gems/charlock_holmes-0.6.8/ext/charlock_holmes/src/file-5.08/src/compress.c:370: undefined reference to `inflateEnd'
collect2: ld returned 1 exit status
make: *** [charlock_holmes.so] Error 1
```