Skip to contentSkip to conversation

pseudo: fix sqlite path and package missing files

PATCH In review Constantin Musca 4 participants 11 messages Feb 4, 2013 – Feb 5, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pseudo: fix sqlite path and package missing files

- replace --enable-sqlite-static with --with-sqlite-static=.. in order to pass ${baselib} to configure (/lib doesn't work for the multilib lib32 build)
- use ${exec_prefix}/lib instead of ${libdir} because pseudo always uses /usr/lib

---
 .../pseudo/files/modify-static-sqlite-option.patch | 31 ++++++++++++++++++++++
 meta/recipes-devtools/pseudo/pseudo.inc            |  9 ++++---
 meta/recipes-devtools/pseudo/pseudo_1.4.1.bb       |  2 +-
 meta/recipes-devtools/pseudo/pseudo_git.bb         |  2 +-
 4 files changed, 38 insertions(+), 6 deletions(-)
 create mode 100644 meta/recipes-devtools/pseudo/files/modify-static-sqlite-option.patch
meta/recipes-devtools/pseudo/files/modify-static-sqlite-option.patch new file +31 -0
new file mode 100644
index 0000000..e34da73
@@ -0,0 +1,31 @@
+Replace --enable-static-sqlite with --with-static-sqlite=... so that
+the user can pass the sqlite location
+
+Upstream-Status: Pending
+Signed-off-by: Constantin Musca <[email protected]>
+
+Index: pseudo-1.4.1/configure
+===================================================================
+--- pseudo-1.4.1.orig/configure
++++ pseudo-1.4.1/configure
+@@ -36,7 +36,7 @@ usage()
+     echo >&2 "           [--libdir=...]"
+     echo >&2 "           [--suffix=...]"
+     echo >&2 "           [--with-sqlite=...]"
+-    echo >&2 "           [--enable-static-sqlite]"
++    echo >&2 "           [--with-static-sqlite=...]"
+     echo >&2 "           [--with-rpath=...|--without-rpath]"
+     echo >&2 "           [--cflags='']"
+     echo >&2 "           [--bits=32|64]"
+@@ -58,8 +58,9 @@ do
+     --libdir=*)
+         opt_libdir=${arg#--libdir=}
+         ;;
+-    --enable-static-sqlite)
+-        sqlite_ldarg='$(SQLITE)/lib/libsqlite3.a'
++    --with-static-sqlite=*)
++        opt_static_sqlite=${arg#--with-static-sqlite=}
++        sqlite_ldarg='$(SQLITE)'/${opt_static_sqlite}
+         use_maybe_rpath=false
+         ;;
+     --with-sqlite=*)
meta/recipes-devtools/pseudo/pseudo.inc +5 -4
index 98f706c..596f490 100644
@@ -12,9 +12,10 @@ DEPENDS = "sqlite3"
 SRC_URI_append_class-nativesdk = " file://symver.patch"
 
 SRC_URI_append_class-native = " file://symver.patch"
+SRC_URI_append = " file://modify-static-sqlite-option.patch"
 
-FILES_${PN} = "${libdir}/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
-FILES_${PN}-dbg += "${libdir}/pseudo/lib*/.debug"
+FILES_${PN} = "${exec_prefix}/lib/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
+FILES_${PN}-dbg += "${exec_prefix}/lib/pseudo/lib*/.debug"
 PROVIDES += "virtual/fakeroot"
 
 MAKEOPTS = ""
@@ -30,9 +31,9 @@ NO32LIBS ??= "1"
 # Compile for the local machine arch...
 do_compile () {
 	if [ "${SITEINFO_BITS}" = "64" ]; then
-	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --with-static-sqlite=${baselib}/libsqlite3.a --without-rpath
 	else
-	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --with-static-sqlite=${baselib}/libsqlite3.a --without-rpath
 	fi
 	oe_runmake ${MAKEOPTS}
 }
meta/recipes-devtools/pseudo/pseudo_1.4.1.bb +1 -1
index 70fe9c0..8367a34 100644
@@ -1,6 +1,6 @@
 require pseudo.inc
 
-PR = "r13"
+PR = "r14"
 
 SRC_URI = "http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2"
 
meta/recipes-devtools/pseudo/pseudo_git.bb +1 -1
index e394ffb..c8ec5ad 100644
@@ -2,7 +2,7 @@ require pseudo.inc
 
 SRCREV = "398a264490713c912b4ce465251a8a82a7905f45"
 PV = "1.4.1+git${SRCPV}"
-PR = "r28"
+PR = "r29"
 
 DEFAULT_PREFERENCE = "-1"
 
Signature · 1 line
1.7.11.7
#1 lore raw
Quoted 3 lines · On Mon, 4 Feb 2013 13:33:26 +0200 Constantin Musca…

- replace --enable-sqlite-static with --with-sqlite-static=.. in order to pass ${baselib} to configure (/lib doesn't work for the multilib lib32 build)

This looks eerily similar to, yet subtly different from, the changes I made for pseudo-1.4.2/1.4.3. I'd spelled that as "--with-static-sqlite=" for specifying an exact path to libsqlite.a, but I eventually changed it to --with-sqlite-lib to allow an override because bitbake's design seems to want libsqlite3.a to always be in (host sysroot)/usr/lib, regardless of whether that's 64-bit or 32-bit.

Quoted 2 lines

- use ${exec_prefix}/lib instead of ${libdir} because pseudo always uses /usr/lib

This seems right, but I hadn't done it in the recent submission of 1.4.3, and things were working anyway. So now I want to know why...

Anyway, I think these changes are probably redundant with the changes I submitted over the weekend.

-s

Signature · 1 line
Listen, get this.  Nobody with a good compiler needs to be justified.
#2 lore raw
Quoted 14 lines · Peter Seebach
Quoted 3 lines · On Mon, 4 Feb 2013 13:33:26 +0200 Constantin Musca…

- replace --enable-sqlite-static with --with-sqlite-static=.. in order to pass ${baselib} to configure (/lib doesn't work for the multilib lib32 build)

This looks eerily similar to, yet subtly different from, the changes I made for pseudo-1.4.2/1.4.3. I'd spelled that as "--with-static-sqlite=" for specifying an exact path to libsqlite.a, but I eventually changed it to --with-sqlite-lib to allow an override because bitbake's design seems to want libsqlite3.a to always be in (host sysroot)/usr/lib, regardless of whether that's 64-bit or 32-bit.

Quoted 8 lines
Quoted 2 lines

- use ${exec_prefix}/lib instead of ${libdir} because pseudo always uses /usr/lib

This seems right, but I hadn't done it in the recent submission of 1.4.3, and things were working anyway. So now I want to know why...

Anyway, I think these changes are probably redundant with the changes I submitted over the weekend.

I suspect not since we don't always use "lib", we might use something different in various multilib configurations for example. Using ${baselib} in the target configurations will therefore give us less problems.

Cheers,

Richard

#3 lore raw
Quoted 4 lines · On Mon, 4 Feb 2013 23:21:51 +0000 Richard Purdie…

I suspect not since we don't always use "lib", we might use something different in various multilib configurations for example. Using ${baselib} in the target configurations will therefore give us less problems.

Oh, point. Yeah, that's probably true.

I think the pseudo-itself changes are probably not needed (since they are basically the same as the with-static-sqlite), but the recipe changes may well be desireable, then. I think my --with-sqlite-lib=lib may need to be altered in the case where we're not using "lib". It's right for the *normal* bitbake native/sdk case, but possibly not for other cases.

-s

Signature · 1 line
Listen, get this.  Nobody with a good compiler needs to be justified.
#4 lore raw
Quoted 8 lines · Peter Seebach
Quoted 4 lines · On Mon, 4 Feb 2013 23:21:51 +0000 Richard Purdie…

I suspect not since we don't always use "lib", we might use something different in various multilib configurations for example. Using ${baselib} in the target configurations will therefore give us less problems.

Quoted 8 lines

Oh, point. Yeah, that's probably true.

I think the pseudo-itself changes are probably not needed (since they are basically the same as the with-static-sqlite), but the recipe changes may well be desireable, then. I think my --with-sqlite-lib=lib may need to be altered in the case where we're not using "lib". It's right for the *normal* bitbake native/sdk case, but possibly not for other cases.

Agreed. Can someone send me a patch which makes it all work please? :)

Cheers,

Richard

#5 lore raw
Quoted 1 line · On Mon, 4 Feb 2013 23:37:59 +0000 Richard Purdie…

Agreed. Can someone send me a patch which makes it all work please? :)

I probably can. I think the 1.4.3 patch I sent out recently (sgw was looking at it, but the binaries weren't up on the downloads server yet) probably covers most of it, but not the case where sqlite-libdir isn't lib, which is probably (??) a target-only case.

Can someone show me a test case where it fails, so I can add that to my pile of pseudo test cases, and then stare at it for a while?

-s

Signature · 1 line
Listen, get this.  Nobody with a good compiler needs to be justified.
#6 lore raw
Quoted 9 lines · Peter Seebach
Quoted 1 line · On Mon, 4 Feb 2013 23:37:59 +0000 Richard Purdie…

Agreed. Can someone send me a patch which makes it all work please? :)

I probably can. I think the 1.4.3 patch I sent out recently (sgw was looking at it, but the binaries weren't up on the downloads server yet) probably covers most of it, but not the case where sqlite-libdir isn't lib, which is probably (??) a target-only case.

Quoted 4 lines

Can someone show me a test case where it fails, so I can add that to my pile of pseudo test cases, and then stare at it for a while?

-s

Here's a test case:
1. local.conf:
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

2. build pseudo

Cheers,
Constantin

#7 lore raw
Quoted 15 lines · On Tue, 5 Feb 2013 09:37:50 +0200 Constantin Musca…
Quoted 10 lines · Peter Seebach
Quoted 2 lines · On Mon, 4 Feb 2013 23:37:59 +0000 Richard Purdie…

Agreed. Can someone send me a patch which makes it all work please? :)

I probably can. I think the 1.4.3 patch I sent out recently (sgw was looking at it, but the binaries weren't up on the downloads server yet) probably covers most of it, but not the case where sqlite-libdir isn't lib, which is probably (??) a target-only case.

Quoted 4 lines

Can someone show me a test case where it fails, so I can add that to my pile of pseudo test cases, and then stare at it for a while?

-s

Quoted 8 lines

Here's a test case:
1. local.conf:
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

2. build pseudo

*pulls off mask, revealing he was the pseudo maintainer all along*

And I would have gotten away with it, too, if it hadn't been for you meddling multilibs!

Okay, got a tentative fix for this in my tree, will probably resend my pseudo 1.4.3 patch with this changed, once it makes it through my ever-growing collection of pseudo tests.

The guts of the change:

[...]
+SQLITE_LIB = "${baselib}"
+SQLITE_LIB_native = "lib"
+
# Compile for the local machine arch...

 do_compile () { 
        if [ "${SITEINFO_BITS}" = "64" ]; then

- ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+ ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite-lib=${SQLITE_LIB} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
else

This appears to be working for all the cases I've tried.

-s

Signature · 1 line
Listen, get this.  Nobody with a good compiler needs to be justified.
#8 lore raw
Quoted 39 lines · Peter Seebach
Quoted 15 lines · On Tue, 5 Feb 2013 09:37:50 +0200 Constantin Musca…
Quoted 10 lines · Peter Seebach
Quoted 2 lines · On Mon, 4 Feb 2013 23:37:59 +0000 Richard Purdie…

Agreed. Can someone send me a patch which makes it all work please? :)

I probably can. I think the 1.4.3 patch I sent out recently (sgw was looking at it, but the binaries weren't up on the downloads server yet) probably covers most of it, but not the case where sqlite-libdir isn't lib, which is probably (??) a target-only case.

Quoted 4 lines

Can someone show me a test case where it fails, so I can add that to my pile of pseudo test cases, and then stare at it for a while?

-s

Quoted 8 lines

Here's a test case:
1. local.conf:
MACHINE = "qemux86-64"
require conf/multilib.conf MULTILIBS = "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

2. build pseudo

*pulls off mask, revealing he was the pseudo maintainer all along*

And I would have gotten away with it, too, if it hadn't been for you meddling multilibs!

Okay, got a tentative fix for this in my tree, will probably resend my pseudo 1.4.3 patch with this changed, once it makes it through my ever-growing collection of pseudo tests.

The guts of the change:

[...]

Review

Quoted 3 lines
(quoted diff) +3 -0
+SQLITE_LIB = "${baselib}"
+SQLITE_LIB_native = "lib"
+

Do you really mean _class-native here?

Sau!

Quoted 11 lines
  # Compile for the local machine arch...
  do_compile () {
         if [ "${SITEINFO_BITS}" = "64" ]; then
(quoted diff) +1 -1
-         ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+         ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite-lib=${SQLITE_LIB} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
         else

This appears to be working for all the cases I've tried.

-s

#9 lore raw
Quoted 1 line · On Tue, 5 Feb 2013 11:37:05 -0800 Saul Wold <[email protected]> wrote:

Do you really mean _class-native here?

I probably do. Which means that my test that appeared to work is probably broken in some way.

-s

Signature · 1 line
Listen, get this.  Nobody with a good compiler needs to be justified.
#10 lore raw
In reply to Saul Wold
Quoted 4 lines · On Tue, 5 Feb 2013 11:37:05 -0800 Saul Wold <[email protected]> wrote:

Review

Quoted 3 lines
(quoted diff) +3 -0
+SQLITE_LIB = "${baselib}"
+SQLITE_LIB_native = "lib"
+  

Do you really mean _class-native here?

Well, I did, but it turns out that since baselib is "lib" in native to begin with, this was overthinking the problem anyway. Simplified to be closer to Constantin's patch, will resubmit as v2 of the 1.4.3 change.

-s

Signature · 1 line
Listen, get this.  Nobody with a good compiler needs to be justified.