[Xapian-discuss] compile problems with solaris 10

Olly Betts olly at survex.com
Sat Dec 6 10:18:47 GMT 2008


On Fri, Dec 05, 2008 at 04:09:12PM -0800, Hal Huntley wrote:
> I have a couple of problems compiling xapian-core on a Solaris 10  sparc 
> T5220 box.
> 
> I have gcc 3.4.6 from sunfreeware.com on the system.

Including the C++ compiler?

> First, I tried to start with "./configure",  but I get the following error:
> 
> ==
> checking whether g++ is a working C++ compiler...no
> configure: error:
> *** You need a working C++ compiler to compile Xapian, but configure 
> failed to
> *** find one.  If you have a working C++ compiler, you can tell 
> configure where
> *** to find it by invoking it like so:
> ***
> *** ./configure CXX=/opt/bin/c++
> ==
> 
> I've never seen that error before with a standard Gnu compiler. Is it 
> possible there is a bug in the configure script for xapian?

This error means that "g++" failed to successfully compile a C++
program consisting of:

int main() {}

So either g++ isn't installed, or it's not working well at all!  You can
look at config.log to see what happened in detail.

> We have Sun Studio 11 compiler as well and I tried the configure option 
> listed in the error message by doing:
>     ./configure CXX=/opt/SUNWspro/bin/CC
> 
> It gets through the configure process ok, but when I do the make, it 
> goes to do some linking and I get:
> ==
> 
> /opt/SUNWspro/bin/CC -G -zdefs -hlibxapian.so.15 -o .libs/libxapian.so.15.6.0   api/.libs/editdistance.o api/.libs/error.o api/.libs/errorhandler.o api/.libs/expanddecider.o api/.lib
> .... LOTS OF files then ending with...
> /.libs/tclUniData.o unicode/.libs/utf8itor.o  -library=stlport4 -lrt -lz -lnsl -lsocket -library=Cstd -library=Crun -lc  
> Undefined                       first referenced
>  symbol                             in file
> log                                 expand/.libs/expandweight.o  (symbol belongs to implicit dependency /lib/libm.so.1)
> ceil                                api/.libs/omqueryinternal.o  (symbol belongs to implicit dependency /lib/libm.so.1)
> fabs                                api/.libs/omqueryinternal.o  (symbol belongs to implicit dependency /lib/libm.so.1)
> sqrt                                api/.libs/omqueryinternal.o  (symbol belongs to implicit dependency /lib/libm.so.1)
> ld: fatal: Symbol referencing errors. No output written to .libs/libxapian.so.15.6.0
> *** Error code 1

With Xapian 1.0.x you may need to explicitly specify to link with -lm for
the Sun compilers:

./configure CXX=/opt/SUNWspro/bin/CC LIBS=-lm

(I've had a report that this was needed, but I believe James has managed
to build with Sun compilers on Solaris without doing this, so maybe it
depends on the version of the compiler or something...)

Cheers,
    Olly



More information about the Xapian-discuss mailing list