charlock_holmes icon indicating copy to clipboard operation
charlock_holmes copied to clipboard

Make failed with exit code 2 (Windows XP, ruby 1.9.3)

Open xiconet opened this issue 9 years ago • 1 comments

Another failure to build the C extension

gem install charlock_holmes -- --with-icu-dir=C:/icu --with-icui18nlib=icuin --with-icudatalib=icudt   --with-opt-dir=C:/temp/zlib-1.2.3-lib --with-opt-lib=C:/temp/zlib-1.2.3-lib/lib --with-opt-include==C:/temp/zlib-1.2.3-lib/include
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-icu-dir=C:/icu --with-icui18nlib=icuin
--with-icudatalib=icudt --with-opt-dir=C:/temp/zlib-1.2.3-lib --with-opt-lib=C:/temp/zlib-1.2.3-lib/lib --with-opt-include==C:/temp/zlib-1.2.3-lib/include'
This could take a while...
ERROR:  Error installing charlock_holmes:
        ERROR: Failed to build gem native extension.

    C:/Ruby193/bin/ruby.exe extconf.rb --with-icu-dir=C:/icu --with-icui18nlib=icuin --with-icudatalib=icudt --with-opt-dir=C:/temp/zlib-1.2.3-lib --with-opt-lib=C:/temp/zlib-1.2.3-lib/lib --with-opt-include==C:/temp/zlib-1.2.3-lib/include
checking for main() in -licuin... yes
checking for main() in -licuin... yes
checking for unicode/ucnv.h... yes
checking for main() in -lz... yes
checking for main() in -licuuc... yes
checking for main() in -licudt... yes
creating Makefile

make  clean

make
generating charlock_holmes-i386-mingw32.def
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
compiling transliterator.cpp
cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus.exe: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++
common.h:14:14: warning: 'VALUE charlock_new_enc_str(const char*, size_t, void*)' defined but not used
common.h:32:14: warning: 'VALUE charlock_new_str2(const char*)' defined but not
used
linking shared-object charlock_holmes/charlock_holmes.so
transliterator.o: In function `rb_transliterator_id_list':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\charlock_holmes-0.7.3\ext\charlock_holmes/transliterator.cpp:47: undefined reference to `icu_55::Transliterator::getAvailableIDs(UErrorCode&)'
transliterator.o: In function `rb_transliterator_transliterate':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\charlock_holmes-0.7.3\ext\charlock_holmes/transliterator.cpp:101: undefined reference to `icu_55::UnicodeString::UnicodeString(char const*, int)'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\charlock_holmes-0.7.3\ext\charlock_holmes/transliterator.cpp:101: undefined reference to `icu_55::Transliterator::createInstance(icu_55::UnicodeString const&, UTransDirection, UParseError&, UErrorCode&)'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\charlock_holmes-0.7.3\ext\charlock_holmes/transliterator.cpp:101: undefined reference to `icu_55::UnicodeString::~UnicodeString()'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\charlock_holmes-0.7.3\ext\charlock_holmes/transliterator.cpp:106: undefined reference to `icu_55::UMemory::operator new(unsigned int)'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\charlock_holmes-0.7.3\ext\charlock_holmes/transliterator.cpp:106: undefined reference to `icu_55::UnicodeString::UnicodeString(char const*, int)'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\charlock_holmes-0.7.3\ext\charlock_holmes/transliterator.cpp:109: undefined reference to `icu_55::UnicodeString::toUTF8(icu_55::ByteSink&) const'
transliterator.o: In function `~StringByteSink':
C:/icu/include/unicode/bytestream.h:231: undefined reference to `icu_55::ByteSink::~ByteSink()'
C:/icu/include/unicode/bytestream.h:231: undefined reference to `icu_55::ByteSink::~ByteSink()'
transliterator.o: In function `rb_transliterator_transliterate':
C:\Ruby193\lib\ruby\gems\1.9.1\gems\charlock_holmes-0.7.3\ext\charlock_holmes/transliterator.cpp:106: undefined reference to `icu_55::UMemory::operator delete(void*)'
C:\Ruby193\lib\ruby\gems\1.9.1\gems\charlock_holmes-0.7.3\ext\charlock_holmes/transliterator.cpp:101: undefined reference to `icu_55::UnicodeString::~UnicodeString()'
transliterator.o: In function `~StringByteSink':
C:/icu/include/unicode/bytestream.h:231: undefined reference to `icu_55::ByteSink::~ByteSink()'
C:/icu/include/unicode/bytestream.h:231: undefined reference to `icu_55::ByteSink::~ByteSink()'
C:/icu/include/unicode/bytestream.h:231: undefined reference to `icu_55::UMemory::operator delete(void*)'
transliterator.o:transliterator.cpp:(.rdata$_ZTVN6icu_5514StringByteSinkISsEE[vtable for icu_55::StringByteSink<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >]+0x14): undefined reference to `icu_55::ByteSink::GetAppendBuffer(int, int, char*, int, int*)'
transliterator.o:transliterator.cpp:(.rdata$_ZTVN6icu_5514StringByteSinkISsEE[vtable for icu_55::StringByteSink<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >]+0x18): undefined reference to `icu_55::ByteSink::Flush()'
collect2: ld returned 1 exit status
make: *** [charlock_holmes.so] Error 1

make failed, exit code 2

Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/charlock_holmes-0.7.3 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/charlock_holmes-0.7.3/gem_make.out

Wish I knew C

xiconet avatar May 07 '15 16:05 xiconet

I have pretty much the same error for Windows 8, ICU 4.2, Ruby 1.9.3, and charlock_holmes 0.7.3.

cezarykluczynski avatar Dec 20 '15 18:12 cezarykluczynski