[Xapian-discuss] Mac OS X building...

Chris McDonough chrism at plope.com
Sun Oct 2 17:16:14 BST 2005


Hi Olly,

>> The failure presents itself as:
>>
>> g++  -o .libs/_xapian.so -bundle  .libs/xapian_wrap.o  /Users/chrism/
>> tmp/xap1/lib/libxapian.dylib
>> /usr/bin/ld: Undefined symbols:
>> _PyArg_ParseTuple
>> .... <and so on>
>>
>
> What's the few lines before this (i.e. the libtool command that the
> Makefile actually runs, which then runs this g++ command)?

If I compile the svn6375 core with './configure --prefix=/Users/ 
chrism/tmp/xap1; make; make install' and make the Python bindings  
without MACOSX_DEPLOYMENT_TARGET set at all, I get:

$ XAPIAN_CONFIG=/Users/chrism/tmp/xap1/bin/xapian-config ./configure \
   --without-php --without-tcl --without-guile --without-csharp -- 
without-java
$ make
... <snip> ...
/bin/sh ../libtool --tag=CXX --mode=link g++ -Wall -Wno-unused -Wno- 
uninitialized -I/Users/chrism/tmp/xap1/include -g -O2   -o _xapian.la  
-rpath /System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
python2.3/site-packages -avoid-version -module -no-undefined  
xapian_wrap.lo /Users/chrism/tmp/xap1/lib/libxapian.la
g++  -o .libs/_xapian.so -bundle  .libs/xapian_wrap.o  /Users/chrism/ 
tmp/xap1/lib/libxapian.dylib
/usr/bin/ld: Undefined symbols:
_PyArg_ParseTuple
...<snip>...

If I set MACOSX_DEPLOYMENT_TARGET=10.3 during the bindings make step,  
the same error occurs.

>
>> Maybe I could help if I knew which files to play around with.  I'm an
>> automake/autoconfigure dummy but I could probably help fix it with a
>> bit of a shove in the right direction.
>>
>
> Could you send the output of these commands (from the
> xapian-core-0.9.2_svn6375 directory):
>
> ./config.guess

powerpc-apple-darwin8.2.0

> grep host_os config.log

host_os='darwin8.2.0'

> grep allow_undefined_flag libtool

archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \ 
$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \ 
$verstring"

archive_expsym_cmds="sed -e \\\"s,#.*,,\\\" -e \\\"s,^[    ]*,,\\\" - 
e \\\"s,^\\\\(..*\\\\),_&,\\\" < \$export_symbols > \$output_objdir/\$ 
{libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \ 
$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\ 
$soname \$verstring~nmedit -s \$output_objdir/\${libname}- 
symbols.expsym \${lib}"

module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \ 
$deplibs\$compiler_flags"

module_expsym_cmds="sed -e \\\"s,#.*,,\\\" -e \\\"s,^[    ]*,,\\\" -e  
\\\"s,^\\\\(..*\\\\),_&,\\\" < \$export_symbols > \$output_objdir/\$ 
{libname}-symbols.expsym~\$CC \$allow_undefined_flag  -o \$lib - 
bundle \$libobjs \$deplibs\$compiler_flags~nmedit -s \$output_objdir/\ 
${libname}-symbols.expsym \${lib}"

allow_undefined_flag="\${wl}-flat_namespace \${wl}-undefined \${wl} 
suppress"
           if test "$allow_undefined_flag" = unsupported; then
           allow_undefined_flag="$no_undefined_flag"

archive_cmds="\$CC -dynamiclib -single_module \$allow_undefined_flag - 
o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\ 
$soname \$verstring"

archive_expsym_cmds="sed -e \\\"s,#.*,,\\\" -e \\\"s,^[    ]*,,\\\" - 
e \\\"s,^\\\\(..*\\\\),_&,\\\" < \$export_symbols > \$output_objdir/\$ 
{libname}-symbols.expsym~\$CC -dynamiclib -single_module \ 
$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags - 
install_name \$rpath/\$soname \$verstring~nmedit -s \$output_objdir/\$ 
{libname}-symbols.expsym \${lib}"

module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \ 
$deplibs\$compiler_flags"

module_expsym_cmds="sed -e \\\"s,#.*,,\\\" -e \\\"s,^[    ]*,,\\\" -e  
\\\"s,^\\\\(..*\\\\),_&,\\\" < \$export_symbols > \$output_objdir/\$ 
{libname}-symbols.expsym~\$CC \$allow_undefined_flag  -o \$lib - 
bundle \$libobjs \$deplibs\$compiler_flags~nmedit -s \$output_objdir/\ 
${libname}-symbols.expsym \${lib}"

allow_undefined_flag="\${wl}-flat_namespace \${wl}-undefined \${wl} 
suppress"


> grep MACOSX libtool

<no results>

Thanks again,

- C




More information about the Xapian-discuss mailing list