Picon

xapian-config --libs output on Suse 10.1


On Suse 10.1, xapian-config --libs outputs the following:

-L/usr/lib -lxapian -L/usr/lib -lstdc++ -lm -lgcc_s -lc -lgcc_s -lm -lgcc_s -lc -lgcc_s

The usual output on other linuxes seems to be like 
 -L/where/is/lib/ -lxapian

This causes a problem when trying to perform a static link with xapian,
because there does not seem to exist a libgcc_s.a 

Actually, I am not quite sure about what "xapian-config --libs" is supposed
to be used for (it's not too clear in the manual page), so I don't even
know if this is a bug or a feature. I'm only sure it causes problems with
the way I use it.

Regards,

J.F. Dockes
James Aylett | 2 Oct 14:58

Re: xapian-config --libs output on Suse 10.1

On Mon, Oct 02, 2006 at 02:32:13PM +0200, Jean-Francois Dockes wrote:

> On Suse 10.1, xapian-config --libs outputs the following:
> 
> -L/usr/lib -lxapian -L/usr/lib -lstdc++ -lm -lgcc_s -lc -lgcc_s -lm -lgcc_s -lc -lgcc_s
> 
> The usual output on other linuxes seems to be like 
>  -L/where/is/lib/ -lxapian
> 
> This causes a problem when trying to perform a static link with xapian,
> because there does not seem to exist a libgcc_s.a 

Hmm. It's coming out a lot, which suggests that pretty much every time
we try to detect stuff in configure (which I think is effectively
where this list of options is figured out - it ends up in a
libtool-generated file based on compile options) it thinks -lgcc_s is
important.

You need it on Solaris for various reasons, but that's only (I think)
because GCC isn't the standard compiler - I'd have thought it was on Suse.

Do you have the config.log file from xapian-core? Actually, your
libxapian.la might be more helpful - it'll be in /usr/lib judging by
the above output.

> Actually, I am not quite sure about what "xapian-config --libs" is supposed
> to be used for (it's not too clear in the manual page), so I don't even
> know if this is a bug or a feature. I'm only sure it causes problems with
> the way I use it.

(Continue reading)

Olly Betts | 2 Oct 15:32
Favicon
Gravatar

Re: xapian-config --libs output on Suse 10.1

On Mon, Oct 02, 2006 at 01:58:42PM +0100, James Aylett wrote:
> On Mon, Oct 02, 2006 at 02:32:13PM +0200, Jean-Francois Dockes wrote:
> 
> > On Suse 10.1, xapian-config --libs outputs the following:
> > 
> > -L/usr/lib -lxapian -L/usr/lib -lstdc++ -lm -lgcc_s -lc -lgcc_s -lm -lgcc_s -lc -lgcc_s
> > 
> > The usual output on other linuxes seems to be like 
> >  -L/where/is/lib/ -lxapian
> > 
> > This causes a problem when trying to perform a static link with xapian,
> > because there does not seem to exist a libgcc_s.a 

I believe this library contain stuff which needs to be in a shared
library so that you can't get mismatching versions - even if a program
is statically linked, it could still dlopen() modules.  I think it's
related to exception handling.

> Hmm. It's coming out a lot, which suggests that pretty much every time
> we try to detect stuff in configure (which I think is effectively
> where this list of options is figured out - it ends up in a
> libtool-generated file based on compile options) it thinks -lgcc_s is
> important.

I have access to a SuSE 10 box and this is actually mostly coming from
libstdc++.la.  These shouldn't be pulled in at all, since Linux
automatically pulls in shared library dependencies.  Looks like libtool
might be misdetecting this or something.  I'll investigate and see
what's going on.

(Continue reading)

James Aylett | 2 Oct 16:03

Re: xapian-config --libs output on Suse 10.1

[Please keep correspondance on-list.]

On Mon, Oct 02, 2006 at 03:25:47PM +0200, Jean-Francois Dockes wrote:

> On Solaris, xapian-config --libs just prints "-L/usr/local/lib -lxapian". 
> Can you mix g++ and Sun CC c++ objects anyway ? If you are linking
> with g++, I think it can figure out about libgcc_s

You can't mix g++ and Sun Forte C++ afaik due to different name
mangling conventions. I've had -lgcc_s issues before on Solaris (with
Berkeley DB), which is why I mentioned it. (But there it did
automatically figure it out, yes.)

>  > Do you have the config.log file from xapian-core? Actually, your
>  > libxapian.la might be more helpful - it'll be in /usr/lib judging by
>  > the above output.
> 
> I am attaching libxapian.la, and libstdc++.la because the flags seem to be
> coming from there.

As Olly says, libxapian.la shouldn't be referencing this at all. If
you edit it out, do things compile smoothly for you?

J

--

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james <at> tartarus.org                               uncertaintydivision.org
(Continue reading)

Picon

Re: xapian-config --libs output on Suse 10.1

James Aylett writes:
 > On Mon, Oct 02, 2006 at 02:32:13PM +0200, Jean-Francois Dockes wrote:
 > [snip]
 > > This causes a problem when trying to perform a static link with xapian,
 > > because there does not seem to exist a libgcc_s.a 
 > 
 > Hmm. It's coming out a lot, which suggests that pretty much every time
 > we try to detect stuff in configure (which I think is effectively
 > where this list of options is figured out - it ends up in a
 > libtool-generated file based on compile options) it thinks -lgcc_s is
 > important.
 > 
 > You need it on Solaris for various reasons, but that's only (I think)
 > because GCC isn't the standard compiler - I'd have thought it was on Suse.

Of course, gcc is the standard compiler on Suse Linux.

On Solaris, xapian-config --libs just prints "-L/usr/local/lib -lxapian". 
Can you mix g++ and Sun CC c++ objects anyway ? If you are linking
with g++, I think it can figure out about libgcc_s

 > Do you have the config.log file from xapian-core? Actually, your
 > libxapian.la might be more helpful - it'll be in /usr/lib judging by
 > the above output.

I am attaching libxapian.la, and libstdc++.la because the flags seem to be
coming from there.

 > xapian-config --libs outputs the complete set of flags to pass through
 > to your linker when building an application that uses Xapian. So it
(Continue reading)

Picon

Re: xapian-config --libs output on Suse 10.1

Olly Betts writes:
 > [snip]
 > But as to your actual problem, if you're wanting to force a static link
 > with xapian, it would probably be better to provide an option to
 > xapian-config.  I doubt you really want to statically link libc, etc
 > anyway.

Sure, I don't want a static libc.

I am currently having the following as part of the link command when I want
a static libxapian:

  -Wl,-Bstatic `xapian-config --libs` -Wl,-Bdynamic

It usually works well as far as xapian-config --libs does not import
things I don't want. 

I am quite aware that this may not be the normal usage for the current
--libs, maybe there is a need for something like --static-libs, but don't
bother, I'll find a workaround, I was just surprised by the different
behaviour on Suse.

J.F. Dockes
Picon

Re: xapian-config --libs output on Suse 10.1

James Aylett writes:
 > [snip]
 > As Olly says, libxapian.la shouldn't be referencing this at all. If
 > you edit it out, do things compile smoothly for you?

Yes, if I remove the reference to libstdc++.la from libxapian.la, then
xapian-config --libs output comes back to the usual "-L/usr/lib -lxapian",
I don't know if this is desirable for normal usage or not.

jf
Roman | 3 Oct 04:25
Picon

MSVC project file


Does there exist a MSVC [7,8] project/solution file for Xapian? If yes, can
anyone share it please?
Thank you.

-Roman
--

-- 
View this message in context: http://www.nabble.com/MSVC-project-file-tf2373705.html#a6613244
Sent from the Xapian - Devel mailing list archive at Nabble.com.
Olly Betts | 3 Oct 08:12
Favicon
Gravatar

Re: MSVC project file

On Mon, Oct 02, 2006 at 07:25:42PM -0700, Roman wrote:
> Does there exist a MSVC [7,8] project/solution file for Xapian? If yes, can
> anyone share it please?

Yes, there's a link on the download page (right at the bottom):

http://www.xapian.org/download.php

Cheers,
    Olly
Roman | 3 Oct 09:11
Picon

Re: MSVC project file


Olly Betts wrote:
> 
> On Mon, Oct 02, 2006 at 07:25:42PM -0700, Roman wrote:
>> Does there exist a MSVC [7,8] project/solution file for Xapian? If yes,
>> can
>> anyone share it please?
> 
> Yes, there's a link on the download page (right at the bottom):
> 
> http://www.xapian.org/download.php
> 

Hi Olly,

Thank you.
I am aware about win32 makefiles I can get from the download page. I am
looking for something like *.vcproj/*.sln files for MSVC 7 or 8.

-Roman

--

-- 
View this message in context: http://www.nabble.com/MSVC-project-file-tf2373705.html#a6615327
Sent from the Xapian - Devel mailing list archive at Nabble.com.

Gmane