[libvoikko] libvoikko not compiling on MacOS X - r3430

Sjur Moshagen sjurnm at mac.com
Fri Jul 2 11:21:38 EEST 2010


Den 1. jul. 2010 kl. 16.56 skrev Sjur Moshagen:

> Den 1. jul. 2010 kl. 16.50 skrev Harri Pitkänen:
> 
>> On Thursday 01 July 2010, Sjur Moshagen wrote:
>>> When trying to build the (almost) latest source on MacOS X (10.6.3), the
>>> build stops after a while with the following error:
>> 
>> Can you find out which revision was the first broken one?
> 
> I'll try - can't say when, though :/

r3431 is the cause. r3430 builds fine, but the next commit causes the following error on my system:

~/voikko
002608dce4d2:voikko sjur$ ./buildmac.sh 
~/voikko/libvoikko ~/voikko
************************************************************************
*** Configuring libvoikko with --enable-hfst ***
************************************************************************
Command: CFLAGS=-I/Users/sjur/voikko/inst/include -L/Users/sjur/voikko/inst/lib ./configure --enable-static --disable-shared --disable-dependency-tracking --prefix=/Users/sjur/voikko/inst --enable-hfst
************************************************************************
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
...
Making all in src/tools
g++ -DHAVE_CONFIG_H -I. -I../..     -D_THREAD_SAFE  -DHAVE_PTHREAD -g -O2 -fvisibility=hidden -I/usr/local/include/   -Wall -Werror -pedantic -c -o voikkospell-voikkospell.o `test -f 'voikkospell.cpp' || echo './'`voikkospell.cpp
/bin/sh ../../libtool --tag=CXX   --mode=link g++  -D_THREAD_SAFE  -DHAVE_PTHREAD -g -O2 -fvisibility=hidden -I/usr/local/include/   -Wall -Werror -pedantic  -framework CoreFoundation -framework Cocoa -o voikkospell voikkospell-voikkospell.o ../libvoikko.la  
libtool: link: g++ -D_THREAD_SAFE -DHAVE_PTHREAD -g -O2 -fvisibility=hidden -I/usr/local/include/ -Wall -Werror -pedantic -o voikkospell voikkospell-voikkospell.o -Wl,-bind_at_load  ../.libs/libvoikko.a -L/usr/local/lib /usr/local/lib/libhfst.dylib -lpthread -lm -framework Cocoa -framework CoreFoundation
Undefined symbols:
  "libvoikko::setup::LanguageTag::setPrivateUse(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
      libvoikko::setup::DictionaryLoader::dictionaryFromPath(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in libvoikko.a(DictionaryLoader.o)
      libvoikko::setup::DictionaryLoader::load(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in libvoikko.a(DictionaryLoader.o)
      libvoikko::setup::DictionaryLoader::load(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in libvoikko.a(DictionaryLoader.o)
  "libvoikko::setup::LanguageTag::LanguageTag(libvoikko::setup::LanguageTag const&)", referenced from:
      libvoikko::setup::DictionaryLoader::load(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in libvoikko.a(DictionaryLoader.o)
      libvoikko::setup::Dictionary::Dictionary(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, libvoikko::setup::LanguageTag const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in libvoikko.a(Dictionary.o)
      libvoikko::setup::Dictionary::Dictionary(libvoikko::setup::Dictionary const&)in libvoikko.a(Dictionary.o)
  "libvoikko::setup::LanguageTag::getPrivateUse() const", referenced from:
      _voikko_dict_variant in libvoikko.a(lt1-interface.o)


I'm using a shell script that I found on the net to run the build process. It is the following:

export PREFIX=$(pwd)/inst       
export PATH=$PREFIX/bin:$PATH      
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH

build_native() {
pushd $1*
echo "************************************************************************"
echo "*** Configuring $1 with $2 ***"
echo "************************************************************************"
echo "Command: CFLAGS="-I$PREFIX/include -L$PREFIX/lib" ./configure --enable-static --disable-shared --disable-dependency-tracking --prefix=$PREFIX $2"
echo "************************************************************************"
CFLAGS="-I$PREFIX/include -L$PREFIX/lib" ./configure --enable-static --disable-shared --disable-dependency-tracking --prefix=$PREFIX $2
echo "************************************************************************"
echo "*** Making $1 ***"
echo "************************************************************************"
make \
	LINK="gcc -framework CoreFoundation -framework Cocoa" \
	LDFLAGS="-framework CoreFoundation -framework Cocoa" 
echo "************************************************************************"
echo "*** Make install $1 ***"
echo "************************************************************************"
make install \
	LINK="gcc -framework CoreFoundation -framework Cocoa" \
	 LDFLAGS="-framework CoreFoundation -framework Cocoa" 
popd
}

#build_native pkg-config
#build_native gettext
#build_native glib
#build_native malaga
#pushd suomimalaga
#	make voikko
#	make voikko-install DESTDIR=$PREFIX/lib/voikko
#popd
build_native libvoikko --enable-hfst

I'm not sure it is needed, but it has simplified the building for me. As far as I have been able to test, the compilation errors are independent of the use of this shell script, but I included it here just to be sure.

Sjur




More information about the Libvoikko mailing list