x**3な人生

基本的にはメモ

redland-bindings pythonのインストールメモ

OSXにredland-bindings-1.0.8.1のpythonインターフェースをインストールしようとしてつまづいたところのメモ。
対処はあくまで暫定的です。

まずはmakeまで。

$ cd redland-bindings-1.0.8.1
$ configure --with-python
$ cd python
$ make

でこける。こんな感じのエラーが表示される。

Undefined symbols:
  "_raptor_version_string", referenced from:
      _raptor_version_string$non_lazy_ptr in Redland_wrap.so
  "_raptor_unicode_char_to_utf8", referenced from:
      _librdf_python_unicode_to_bytes in Redland_wrap.so
  "_raptor_version_release", referenced from:
      _raptor_version_release$non_lazy_ptr in Redland_wrap.so
  "_raptor_version_decimal", referenced from:
      _raptor_version_decimal$non_lazy_ptr in Redland_wrap.so
  "_raptor_version_minor", referenced from:
      _raptor_version_minor$non_lazy_ptr in Redland_wrap.so
  "_rasqal_version_minor", referenced from:
      _rasqal_version_minor$non_lazy_ptr in Redland_wrap.so
  "_raptor_locator_byte", referenced from:
      _librdf_python_logger_handler in Redland_wrap.so
      __wrap_raptor_locator_byte in Redland_wrap.so
  "_raptor_locator_file", referenced from:
      _librdf_python_logger_handler in Redland_wrap.so
      __wrap_raptor_locator_file in Redland_wrap.so
....................

原因はMakefileにてライブラリのパスが設定されていないため。

よって、MakefileのLIBRDF_LDFLAGSとAM_LDFLAGSを以下の様に修正する。

..............
LIBRDF_LDFLAGS =   -L/usr/local/lib -lrdf -lraptor -lrasqal
..............
AM_LDFLAGS =   -L/usr/local/lib -lrdf -lraptor -lrasqal $(MEM_LIBS)
..............

あとは

$ make
$ sudo make install

でOK。

※ ちなみに1.0.6.1でも試してみたところ、同じようなエラーが発生。でもって、同じような対処で回避しました。