You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Alan <al...@fairlite.co.uk> on 2012/04/25 23:51:10 UTC

Subversion 1.7.4 should use pkg-config for sqlite3 libraries

Hi all,

It seems that subversion just tries linking explicitly with -lsqlite3
during configure, yet sqlite3 itself may be linked against other
libraries which need to be pulled in. And this can fail on some systems.

The configure script should use "pkg-config --libs sqlite3" to obtain a
list of libraries.

Thanks,

Alan.

Re: Subversion 1.7.4 should use pkg-config for sqlite3 libraries

Posted by Alan Hourihane <al...@fairlite.co.uk>.
On 04/27/12 19:38, Alan Hourihane wrote:
> Just to note that subversion should also be using "apr-1-config --libs"
> to determine what libraries libapr needs as well.
>
> It doesn't seem to be doing it here, and the build fails here too. Does
> subversion's configure script do the above ?
>
>
Mmm, I can see that seems to be controlled by the enable-all-static flag.

Not to worry then,

Alan.

Re: Subversion 1.7.4 should use pkg-config for sqlite3 libraries

Posted by Alan Hourihane <al...@fairlite.co.uk>.
Just to note that subversion should also be using "apr-1-config --libs"
to determine what libraries libapr needs as well.

It doesn't seem to be doing it here, and the build fails here too. Does
subversion's configure script do the above ?

Alan.



Re: Subversion 1.7.4 should use pkg-config for sqlite3 libraries

Posted by Alan Hourihane <al...@fairlite.co.uk>.
On 04/26/12 08:41, Daniel Shahaf wrote:
> Alan Hourihane wrote on Thu, Apr 26, 2012 at 08:24:52 +0100:
>> On 04/26/12 04:38, Daniel Shahaf wrote:
>>> Alan Hourihane wrote on Wed, Apr 25, 2012 at 23:41:24 +0100:
>>>> Yes, it doesn't work as you are checking /usr first, yet it should be
>>>> pkg-config first (or only)....
>>> Can't be "only" pkg-config, as that would break the build on systems
>>> that don't have it.
>> Well, you could check to see if pkg-config is available, then if
>> pkg-config with sqlite3 worked, then fallback to specific paths.
> We could, but it won't help you unless you stop passing --with-sqlite=/usr.
>
> Refer to build/ac-macros/sqlite.m4.
>
> I suggest you stop passing --with-sqlite=/usr --- that will make
> configure DTRT on your system.
Right, that's what I'm now doing.

Alan.

Re: Subversion 1.7.4 should use pkg-config for sqlite3 libraries

Posted by Daniel Shahaf <da...@elego.de>.
Alan Hourihane wrote on Thu, Apr 26, 2012 at 08:24:52 +0100:
> On 04/26/12 04:38, Daniel Shahaf wrote:
> > Alan Hourihane wrote on Wed, Apr 25, 2012 at 23:41:24 +0100:
> >> Yes, it doesn't work as you are checking /usr first, yet it should be
> >> pkg-config first (or only)....
> > Can't be "only" pkg-config, as that would break the build on systems
> > that don't have it.
> Well, you could check to see if pkg-config is available, then if
> pkg-config with sqlite3 worked, then fallback to specific paths.

We could, but it won't help you unless you stop passing --with-sqlite=/usr.

Refer to build/ac-macros/sqlite.m4.

I suggest you stop passing --with-sqlite=/usr --- that will make
configure DTRT on your system.

Re: Subversion 1.7.4 should use pkg-config for sqlite3 libraries

Posted by Alan Hourihane <al...@fairlite.co.uk>.
On 04/26/12 04:38, Daniel Shahaf wrote:
> Alan Hourihane wrote on Wed, Apr 25, 2012 at 23:41:24 +0100:
>> Yes, it doesn't work as you are checking /usr first, yet it should be
>> pkg-config first (or only)....
> Can't be "only" pkg-config, as that would break the build on systems
> that don't have it.
Well, you could check to see if pkg-config is available, then if
pkg-config with sqlite3 worked, then fallback to specific paths.

Alan.

Re: Subversion 1.7.4 should use pkg-config for sqlite3 libraries

Posted by Daniel Shahaf <da...@elego.de>.
Alan Hourihane wrote on Wed, Apr 25, 2012 at 23:41:24 +0100:
> Yes, it doesn't work as you are checking /usr first, yet it should be
> pkg-config first (or only)....

Can't be "only" pkg-config, as that would break the build on systems
that don't have it.

Re: Subversion 1.7.4 should use pkg-config for sqlite3 libraries

Posted by Philip Martin <ph...@wandisco.com>.
Alan Hourihane <al...@fairlite.co.uk> writes:

> Yes, it doesn't work as you are checking /usr first, yet it should be
> pkg-config first (or only)....
>
> This is what I get....
>
> configure: checking sqlite library
> checking sqlite3.h usability... yes
> checking sqlite3.h presence... yes
> checking for sqlite3.h... yes
> checking sqlite library version (via header)... okay
> checking for sqlite3_close in -lsqlite3... no
> configure: WARNING: no suitable sqlite found in /usr
>
> Because the check for sqlite3_close in -lsqlite3 fails as it doesn't
> have the extra libraries available to link the test case.

Are you passing --with-sqlite=/usr to configure?  That stops pkg-config
being used.

-- 
Philip

Re: Subversion 1.7.4 should use pkg-config for sqlite3 libraries

Posted by Alan Hourihane <al...@fairlite.co.uk>.
On 04/25/12 23:34, Philip Martin wrote:
> Alan <al...@fairlite.co.uk> writes:
>
>> It seems that subversion just tries linking explicitly with -lsqlite3
>> during configure, yet sqlite3 itself may be linked against other
>> libraries which need to be pulled in. And this can fail on some systems.
>>
>> The configure script should use "pkg-config --libs sqlite3" to obtain a
>> list of libraries.
> Subversion does use pkg-config after first trying /usr.  Are you saying
> this does not work?  If I temporarily remove the library from /usr I see
>
> configure: checking sqlite library
> checking sqlite amalgamation... no
> checking sqlite3.h usability... yes
> checking sqlite3.h presence... yes
> checking for sqlite3.h... yes
> checking sqlite library version (via header)... okay
> checking for sqlite3_close in -lsqlite3... no
> checking sqlite library version (via pkg-config)... 3.7.10
>
>

Yes, it doesn't work as you are checking /usr first, yet it should be
pkg-config first (or only)....

This is what I get....

configure: checking sqlite library
checking sqlite3.h usability... yes
checking sqlite3.h presence... yes
checking for sqlite3.h... yes
checking sqlite library version (via header)... okay
checking for sqlite3_close in -lsqlite3... no
configure: WARNING: no suitable sqlite found in /usr

Because the check for sqlite3_close in -lsqlite3 fails as it doesn't
have the extra libraries available to link the test case.

Alan.

Re: Subversion 1.7.4 should use pkg-config for sqlite3 libraries

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Wed, Apr 25, 2012 at 7:02 PM, Philip Martin
<ph...@wandisco.com>wrote:

> Alan Hourihane <al...@fairlite.co.uk> writes:
>
> > Just to note that I'm passing --with-sqlite=/usr on the configure line
> too.
>
> Specifying a path and using pkg-config are incompatible.
>
>
>
This is why the RPM setup tools are best used with a restricted build
environment, without unnecessary components. I use "mock" to provide this
reliably. Otherwise, you can have adventures with old OS's (like RHEL 4)
that have incompatible versions of neon.

Re: Subversion 1.7.4 should use pkg-config for sqlite3 libraries

Posted by Philip Martin <ph...@wandisco.com>.
Alan Hourihane <al...@fairlite.co.uk> writes:

> Just to note that I'm passing --with-sqlite=/usr on the configure line too.

Specifying a path and using pkg-config are incompatible.

-- 
Philip

Re: Subversion 1.7.4 should use pkg-config for sqlite3 libraries

Posted by Alan Hourihane <al...@fairlite.co.uk>.
On 04/25/12 23:34, Philip Martin wrote:
> Alan <al...@fairlite.co.uk> writes:
>
>> It seems that subversion just tries linking explicitly with -lsqlite3
>> during configure, yet sqlite3 itself may be linked against other
>> libraries which need to be pulled in. And this can fail on some systems.
>>
>> The configure script should use "pkg-config --libs sqlite3" to obtain a
>> list of libraries.
> Subversion does use pkg-config after first trying /usr.  Are you saying
> this does not work?  If I temporarily remove the library from /usr I see
>
> configure: checking sqlite library
> checking sqlite amalgamation... no
> checking sqlite3.h usability... yes
> checking sqlite3.h presence... yes
> checking for sqlite3.h... yes
> checking sqlite library version (via header)... okay
> checking for sqlite3_close in -lsqlite3... no
> checking sqlite library version (via pkg-config)... 3.7.10
>
>
Just to note that I'm passing --with-sqlite=/usr on the configure line too.

Alan.

Re: Subversion 1.7.4 should use pkg-config for sqlite3 libraries

Posted by Philip Martin <ph...@wandisco.com>.
Alan <al...@fairlite.co.uk> writes:

> It seems that subversion just tries linking explicitly with -lsqlite3
> during configure, yet sqlite3 itself may be linked against other
> libraries which need to be pulled in. And this can fail on some systems.
>
> The configure script should use "pkg-config --libs sqlite3" to obtain a
> list of libraries.

Subversion does use pkg-config after first trying /usr.  Are you saying
this does not work?  If I temporarily remove the library from /usr I see

configure: checking sqlite library
checking sqlite amalgamation... no
checking sqlite3.h usability... yes
checking sqlite3.h presence... yes
checking for sqlite3.h... yes
checking sqlite library version (via header)... okay
checking for sqlite3_close in -lsqlite3... no
checking sqlite library version (via pkg-config)... 3.7.10


-- 
Philip