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.
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?
Has anyone seen something like this and knows a workaround or fix?
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
make: Fatal error: Command failed for target `libxapian.la'
Current working directory /usr/local/src/xapian-core-1.0.9
*** Error code 1
The following command caused the error:
failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
case $f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='. docs tests'; for subdir in $list; do \
echo "Making $target in $subdir"; \
if test "$subdir" = "."; then \
dot_seen=yes; \
local_target="$target-am"; \
else \
local_target="$target"; \
fi; \
(cd $subdir && make $local_target) \
|| eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
make "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /usr/local/src/xapian-core-1.0.9
*** Error code 1
=
I'd guess I'd rather have the gcc option work for me, but if a solution
to the Sun Studio 11 compiler is available, I'll go with that.
Regards,
Hal Huntley
Quoting "Hal Huntley" <hal.huntley at sri.com>:> 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. > *** ./configure CXX=/opt/bin/c++I could be wrong, but it looks like you don't have g++ (GNU's C++ compiler) installed. Check with: % g++ g++: no input files <-- should see something like this You'll either need to install g++, or if SUN has renamed g++ to something else (maybe c++?), use the appropriate ./configure line as above. The last time I played with GNU on SUN was, .../thinks/..., 12+ years ago :o. dammit, I refuse to feel old. Cheers Henry
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 1With 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