0

Everything worked well with boost1.53, but when with boost 1.46, the project won't compile. I do understand there is no dependency between boost1.46 and icu, but it's weird that the same code could work normally with a higher version boost which relies on icu.


Invoking: GCC C++ Linker
g++  -o "CPPTest"  ./worker/statistical_based_extraction.o  ./common/utf8/icu_utf8_sequence.o  ./common/tokenizer/indo_european_tokenizer.o ./common/features/indo_european_token_shape_feature_extractor.o  ./common/crfpp_tagger.o  ./crftest.o   -lcrfpp -licuuc -lpython2.7
./worker/statistical_based_extraction.o: In function `GetLocale':
/home/tilney/workspace/CPPTest/Debug/../worker/statistical_based_extraction.h:25: undefined reference to `icu_54::Locale::Locale(char const*, char const*, char const*, char const*)'
/home/tilney/workspace/CPPTest/Debug/../worker/statistical_based_extraction.h:25: undefined reference to `icu_54::Locale::~Locale()'

Tried to configure icu with --disable-renaming, no luck.


tilney@tilney:/apps/nlp$ ls /usr/local/lib/libicu
libicudata.so       libicui18n.so       libicuio.so         libicule.so         libiculx.so         libicutest.so       libicutu.so         libicuuc.so
libicudata.so.54 libicui18n.so.54 libicuio.so.54 libicule.so.54 libiculx.so.54 libicutest.so.54 libicutu.so.54 libicuuc.so.54
libicudata.so.54.1 libicui18n.so.54.1 libicuio.so.54.1 libicule.so.54.1 libiculx.so.54.1 libicutest.so.54.1 libicutu.so.54.1 libicuuc.so.54.1
Tilney
  • 318
  • 2
  • 17
  • possible duplicate of [How to debug linker errors? Getting undefined reference errors when statically linking ICU](http://stackoverflow.com/questions/13253017/how-to-debug-linker-errors-getting-undefined-reference-errors-when-statically-l) – Ken White Feb 27 '15 at 04:04
  • Yes, I read that post before, but I don't have a order problem here because I only work with icuuc. Besides, I tried to add all the icu libs but still didn't compile. – Tilney Feb 27 '15 at 04:08
  • If you have an undefined reference, you clearly didn't add all of the necessary libs or code units. if you had, the references would be defined. The solution is to figure out where the references are defined, and then include those libraries or source files. – Ken White Feb 27 '15 at 04:09
  • It could be a icu build error, according to http://stackoverflow.com/questions/14875047/linking-error-undefined-reference-to-icu-50unicodestringunicodestring, which I believe there must be something wrong with the icu config options. – Tilney Feb 27 '15 at 04:13

1 Answers1

0

Although Boost 1.46 doesn't provide Boost.Locale api, it DOES RELY on icu48, when you use apt-get to install boost, the corresponding icu would also be installed, which conflicts with the hand-installed icu. As for higher version boost, it was hand-installed so it didn't install any additional package.

Tilney
  • 318
  • 2
  • 17