Skip to contentSkip to conversation

apr fixes

PATCH In review Paul Eggleton 3 participants 9 messages Jun 28, 2012 – Jun 29, 2012

lore
Share & tools
lore
#0 lore raw

cover apr fixes

Several fixes for apr that have come out of the work to get Apache working properly.

The following changes since commit b26dda2d1e839ea461485236028e1af53b839d34:

local.conf.sample.extended: Add accidentally missed features (2012-06-28 16:30:32 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib paule/apr-fixes
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/apr-fixes

Joe MacDonald (1):
apr: Install apr-local libtool in build dir

Paul Eggleton (2):
apr: add util-linux to DEPENDS for libuuid
apr: fix incorrect size of pid_t

 meta/recipes-support/apr/apr_1.4.6.bb |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/3 apr: Install apr-local libtool in build dir

From: Joe MacDonald <[email protected]>

Building apache with this version of apr would blow up on the results from:

   apr_config --apr-libtool

Errors of the form:

/bin/sh: /media/large/tmp/sysroots/x86_64-linux/usr/share/build-1/libtool: No such file or directory

Fix that by ensuring libtool from apr's build lands in .../usr/share/build-1/.

---
 meta/recipes-support/apr/apr_1.4.6.bb |    2 ++
 1 file changed, 2 insertions(+)
meta/recipes-support/apr/apr_1.4.6.bb +2 -0
index c0ab4f1..6cd37f1 100644
@@ -39,6 +39,8 @@ do_configure_append() {
 
 do_install_append() {
 	oe_multilib_header apr.h
+	install -d ${D}${datadir}/apr
+	cp ${S}/${HOST_SYS}-libtool ${D}${datadir}/build-1/libtool
 }
 
 SSTATE_SCAN_FILES += "apr_rules.mk"
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/3 apr: add util-linux to DEPENDS for libuuid

In reply to Paul Eggleton

apr will use libuuid if it is present, and thus we should require that it is there so that we have a deterministic build.

---
 meta/recipes-support/apr/apr_1.4.6.bb |    1 +
 1 file changed, 1 insertion(+)
meta/recipes-support/apr/apr_1.4.6.bb +1 -0
index 6cd37f1..54c47fe 100644
@@ -1,6 +1,7 @@
 DESCRIPTION = "Apache Portable Runtime (APR) library"
 HOMEPAGE = "http://apr.apache.org/"
 SECTION = "libs"
+DEPENDS = "util-linux"
 
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=0c35ff3c4c83b89d2f076e315caac28b \
Signature · 1 line
1.7.9.5
#3 lore raw

Re: [PATCH 2/3] apr: add util-linux to DEPENDS for libuuid

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 7 lines · Paul Eggleton

apr will use libuuid if it is present, and thus we should require that it is there so that we have a deterministic build.

meta/recipes-support/apr/apr_1.4.6.bb | 1 + 1 file changed, 1
insertion(+)

Quoted 7 lines
(quoted diff) +0 -0

b/meta/recipes-support/apr/apr_1.4.6.bb index 6cd37f1..54c47fe 100644 --- a/meta/recipes-support/apr/apr_1.4.6.bb +++ b/meta/recipes-support/apr/apr_1.4.6.bb @@ -1,6 +1,7 @@ DESCRIPTION = "Apache Portable Runtime (APR) library" HOMEPAGE = "http://apr.apache.org/" SECTION = "libs" +DEPENDS = "util-linux"

interesting. I wonder if there is configure option to denote this feature. May be its better to enable it explicitly along with this change

Quoted 3 lines

LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=0c35ff3c4c83b89d2f076e315caac28b \

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEUEARECAAYFAk/tF48ACgkQuwUzVZGdMxQydQCUCdoOXb+AV2vPY7OAcc0fiecF sgCfRbcwcMIZfoVjZ+XCsh3H0cgzmOE=
=8BAs
-----END PGP SIGNATURE-----

#4 lore raw

Re: [PATCH 2/3] apr: add util-linux to DEPENDS for libuuid

Quoted 11 lines · On Thursday 28 June 2012 19:48:47 Khem Raj wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 7 lines · Paul Eggleton

apr will use libuuid if it is present, and thus we should require that it is there so that we have a deterministic build.

meta/recipes-support/apr/apr_1.4.6.bb | 1 + 1 file changed, 1
insertion(+)

Quoted 9 lines
Quoted 6 lines
(quoted diff) +0 -0

b/meta/recipes-support/apr/apr_1.4.6.bb index 6cd37f1..54c47fe 100644 --- a/meta/recipes-support/apr/apr_1.4.6.bb +++ b/meta/recipes-support/apr/apr_1.4.6.bb @@ -1,6 +1,7 @@ DESCRIPTION = "Apache Portable Runtime (APR) library" HOMEPAGE = "http://apr.apache.org/" SECTION = "libs" +DEPENDS = "util-linux"

interesting. I wonder if there is configure option to denote this feature. May be its better to enable it explicitly along with this change

There's no documented option - I can force ac_cv_osuuid but that doesn't actually have the desired effect (i.e. it does not make it fail if uuid isn't actually provided).

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#5 lore raw

PATCH 3/3 apr: fix incorrect size of pid_t

In reply to Paul Eggleton

If cross-compiling, apr's configure script assumes that pid_t is 64-bit which is wrong - it appears that 32-bit is a safe assumption for Linux, so use that instead.

This fixes Apache writing garbage to its pid file when built using apr produced from this recipe.

---
 meta/recipes-support/apr/apr_1.4.6.bb |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-support/apr/apr_1.4.6.bb +3 -1
index 54c47fe..8af5411 100644
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0c35ff3c4c83b89d2f076e315caac28b \
 
 BBCLASSEXTEND = "native"
 
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
            file://configure_fixes.patch \
@@ -23,6 +23,8 @@ inherit autotools lib_package binconfig multilib_header
 
 OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
 
+EXTRA_OECONF_append_class-target = " ac_cv_sizeof_pid_t=4"
+
 do_configure_prepend() {
 	cd ${S}
 	./buildconf
Signature · 1 line
1.7.9.5
#6 lore raw

Re: [PATCH 3/3] apr: fix incorrect size of pid_t

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 22 lines · Paul Eggleton

If cross-compiling, apr's configure script assumes that pid_t is 64-bit which is wrong - it appears that 32-bit is a safe assumption for Linux, so use that instead.

This fixes Apache writing garbage to its pid file when built using apr produced from this recipe.

meta/recipes-support/apr/apr_1.4.6.bb | 4 +++- 1 file changed, 3
insertions(+), 1 deletion(-)

(quoted diff) +0 -0

b/meta/recipes-support/apr/apr_1.4.6.bb index 54c47fe..8af5411 100644 --- a/meta/recipes-support/apr/apr_1.4.6.bb +++ b/meta/recipes-support/apr/apr_1.4.6.bb @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0c35ff3c4c83b89d2f076e315caac28b \

BBCLASSEXTEND = "native"

-PR = "r0" +PR = "r1"

Quoted 8 lines

SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
file://configure_fixes.patch \ @@ -23,6 +23,8 @@ inherit autotools lib_package binconfig multilib_header

OE_BINCONFIG_EXTRA_MANGLE = " -e
's:location=source:location=installed:'"

+EXTRA_OECONF_append_class-target = " ac_cv_sizeof_pid_t=4" +

I think this may not be correct thing for 64bit targets. You are better of adding this to appropriate site files.

Quoted 2 lines

do_configure_prepend() { cd ${S} ./buildconf

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/tF0MACgkQuwUzVZGdMxSXNACfUhw2qkbBYBL/mBIvJ5zwIla7 ojoAoICsjsBSRzJlS7s6Qg3i8Ze+NBQo
=yxut
-----END PGP SIGNATURE-----

#7 lore raw

Re: [PATCH 3/3] apr: fix incorrect size of pid_t

Quoted 2 lines · On Thursday 28 June 2012 19:47:31 Khem Raj wrote:

I think this may not be correct thing for 64bit targets. You are better of adding this to appropriate site files.

pid_t is apparently always an int on Linux and our siteinfo files state that ac_cv_sizeof_int is 4 for every target. Nevertheless, if we see the need to define ac_cv_sizeof_int even though the value isn't currently different anywhere, it seems at least consistent to set ac_cv_sizeof_pid_t there as well.

However, I can't help feeling that these files are a bit of a mess and it's not totally clear to me where I should be putting this value. Should it go in common-linux? Or do I have to add it to the specific site file for every arch?

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#8 lore raw

Re: [PATCH 3/3] apr: fix incorrect size of pid_t

Quoted 10 lines · Paul Eggleton
Quoted 2 lines · On Thursday 28 June 2012 19:47:31 Khem Raj wrote:

I think this may not be correct thing for 64bit targets. You are better of adding this to appropriate site files.

pid_t is apparently always an int on Linux and our siteinfo files state that ac_cv_sizeof_int is 4 for every target. Nevertheless, if we see the need to define ac_cv_sizeof_int even though the value isn't currently different anywhere, it seems at least consistent to set ac_cv_sizeof_pid_t there as well.

Quoted 3 lines

However, I can't help feeling that these files are a bit of a mess and it's not totally clear to me where I should be putting this value. Should it go in common-linux? Or do I have to add it to the specific site file for every arch?

common-linux sounds like the right place to me.

Cheers,

Richard