diff options
Diffstat (limited to 'meta/recipes-support/apr')
14 files changed, 247 insertions, 411 deletions
diff --git a/meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch b/meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch deleted file mode 100644 index 57e7453312..0000000000 --- a/meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch +++ /dev/null | |||
@@ -1,135 +0,0 @@ | |||
1 | From 6b638fa9afbeb54dfa19378e391465a5284ce1ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Wed, 12 Sep 2018 17:16:36 +0800 | ||
4 | Subject: [PATCH] Fix error handling in gdbm | ||
5 | |||
6 | Only check for gdbm_errno if the return value of the called gdbm_* | ||
7 | function says so. This fixes apr-util with gdbm 1.14, which does not | ||
8 | seem to always reset gdbm_errno. | ||
9 | |||
10 | Also make the gdbm driver return error codes starting with | ||
11 | APR_OS_START_USEERR instead of always returning APR_EGENERAL. This is | ||
12 | what the berkleydb driver already does. | ||
13 | |||
14 | Also ensure that dsize is 0 if dptr == NULL. | ||
15 | |||
16 | Upstream-Status: Backport[https://svn.apache.org/viewvc? | ||
17 | view=revision&revision=1825311] | ||
18 | |||
19 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
20 | --- | ||
21 | dbm/apr_dbm_gdbm.c | 47 +++++++++++++++++++++++++++++------------------ | ||
22 | 1 file changed, 29 insertions(+), 18 deletions(-) | ||
23 | |||
24 | diff --git a/dbm/apr_dbm_gdbm.c b/dbm/apr_dbm_gdbm.c | ||
25 | index 749447a..1c86327 100644 | ||
26 | --- a/dbm/apr_dbm_gdbm.c | ||
27 | +++ b/dbm/apr_dbm_gdbm.c | ||
28 | @@ -36,13 +36,25 @@ | ||
29 | static apr_status_t g2s(int gerr) | ||
30 | { | ||
31 | if (gerr == -1) { | ||
32 | - /* ### need to fix this */ | ||
33 | - return APR_EGENERAL; | ||
34 | + if (gdbm_errno == GDBM_NO_ERROR) | ||
35 | + return APR_SUCCESS; | ||
36 | + return APR_OS_START_USEERR + gdbm_errno; | ||
37 | } | ||
38 | |||
39 | return APR_SUCCESS; | ||
40 | } | ||
41 | |||
42 | +static apr_status_t gdat2s(datum d) | ||
43 | +{ | ||
44 | + if (d.dptr == NULL) { | ||
45 | + if (gdbm_errno == GDBM_NO_ERROR || gdbm_errno == GDBM_ITEM_NOT_FOUND) | ||
46 | + return APR_SUCCESS; | ||
47 | + return APR_OS_START_USEERR + gdbm_errno; | ||
48 | + } | ||
49 | + | ||
50 | + return APR_SUCCESS; | ||
51 | +} | ||
52 | + | ||
53 | static apr_status_t datum_cleanup(void *dptr) | ||
54 | { | ||
55 | if (dptr) | ||
56 | @@ -53,22 +65,15 @@ static apr_status_t datum_cleanup(void *dptr) | ||
57 | |||
58 | static apr_status_t set_error(apr_dbm_t *dbm, apr_status_t dbm_said) | ||
59 | { | ||
60 | - apr_status_t rv = APR_SUCCESS; | ||
61 | |||
62 | - /* ### ignore whatever the DBM said (dbm_said); ask it explicitly */ | ||
63 | + dbm->errcode = dbm_said; | ||
64 | |||
65 | - if ((dbm->errcode = gdbm_errno) == GDBM_NO_ERROR) { | ||
66 | + if (dbm_said == APR_SUCCESS) | ||
67 | dbm->errmsg = NULL; | ||
68 | - } | ||
69 | - else { | ||
70 | - dbm->errmsg = gdbm_strerror(gdbm_errno); | ||
71 | - rv = APR_EGENERAL; /* ### need something better */ | ||
72 | - } | ||
73 | - | ||
74 | - /* captured it. clear it now. */ | ||
75 | - gdbm_errno = GDBM_NO_ERROR; | ||
76 | + else | ||
77 | + dbm->errmsg = gdbm_strerror(dbm_said - APR_OS_START_USEERR); | ||
78 | |||
79 | - return rv; | ||
80 | + return dbm_said; | ||
81 | } | ||
82 | |||
83 | /* -------------------------------------------------------------------------- | ||
84 | @@ -107,7 +112,7 @@ static apr_status_t vt_gdbm_open(apr_dbm_t **pdb, const char *pathname, | ||
85 | NULL); | ||
86 | |||
87 | if (file == NULL) | ||
88 | - return APR_EGENERAL; /* ### need a better error */ | ||
89 | + return APR_OS_START_USEERR + gdbm_errno; /* ### need a better error */ | ||
90 | |||
91 | /* we have an open database... return it */ | ||
92 | *pdb = apr_pcalloc(pool, sizeof(**pdb)); | ||
93 | @@ -141,10 +146,12 @@ static apr_status_t vt_gdbm_fetch(apr_dbm_t *dbm, apr_datum_t key, | ||
94 | if (pvalue->dptr) | ||
95 | apr_pool_cleanup_register(dbm->pool, pvalue->dptr, datum_cleanup, | ||
96 | apr_pool_cleanup_null); | ||
97 | + else | ||
98 | + pvalue->dsize = 0; | ||
99 | |||
100 | /* store the error info into DBM, and return a status code. Also, note | ||
101 | that *pvalue should have been cleared on error. */ | ||
102 | - return set_error(dbm, APR_SUCCESS); | ||
103 | + return set_error(dbm, gdat2s(rd)); | ||
104 | } | ||
105 | |||
106 | static apr_status_t vt_gdbm_store(apr_dbm_t *dbm, apr_datum_t key, | ||
107 | @@ -201,9 +208,11 @@ static apr_status_t vt_gdbm_firstkey(apr_dbm_t *dbm, apr_datum_t *pkey) | ||
108 | if (pkey->dptr) | ||
109 | apr_pool_cleanup_register(dbm->pool, pkey->dptr, datum_cleanup, | ||
110 | apr_pool_cleanup_null); | ||
111 | + else | ||
112 | + pkey->dsize = 0; | ||
113 | |||
114 | /* store any error info into DBM, and return a status code. */ | ||
115 | - return set_error(dbm, APR_SUCCESS); | ||
116 | + return set_error(dbm, gdat2s(rd)); | ||
117 | } | ||
118 | |||
119 | static apr_status_t vt_gdbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey) | ||
120 | @@ -221,9 +230,11 @@ static apr_status_t vt_gdbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey) | ||
121 | if (pkey->dptr) | ||
122 | apr_pool_cleanup_register(dbm->pool, pkey->dptr, datum_cleanup, | ||
123 | apr_pool_cleanup_null); | ||
124 | + else | ||
125 | + pkey->dsize = 0; | ||
126 | |||
127 | /* store any error info into DBM, and return a status code. */ | ||
128 | - return set_error(dbm, APR_SUCCESS); | ||
129 | + return set_error(dbm, gdat2s(rd)); | ||
130 | } | ||
131 | |||
132 | static void vt_gdbm_freedatum(apr_dbm_t *dbm, apr_datum_t data) | ||
133 | -- | ||
134 | 2.7.4 | ||
135 | |||
diff --git a/meta/recipes-support/apr/apr-util/0001-test_transformation-Check-if-transform-is-supported-.patch b/meta/recipes-support/apr/apr-util/0001-test_transformation-Check-if-transform-is-supported-.patch new file mode 100644 index 0000000000..261b78736f --- /dev/null +++ b/meta/recipes-support/apr/apr-util/0001-test_transformation-Check-if-transform-is-supported-.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 3a97f58cfb40fc1911bbfd067e8457a472613d75 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 18 Apr 2023 22:58:00 -0700 | ||
4 | Subject: [PATCH] test_transformation: Check if transform is supported before | ||
5 | using it | ||
6 | |||
7 | This helps in excluding these tests on systems where these are not | ||
8 | available e.g. musl | ||
9 | |||
10 | Upstream-Status: Submitted [https://bz.apache.org/bugzilla/show_bug.cgi?id=66570] | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | test/testxlate.c | 8 ++++++-- | ||
14 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/test/testxlate.c b/test/testxlate.c | ||
17 | index 6981eff..de00fa4 100644 | ||
18 | --- a/test/testxlate.c | ||
19 | +++ b/test/testxlate.c | ||
20 | @@ -116,8 +116,12 @@ static void test_transformation(abts_case *tc, void *data) | ||
21 | } | ||
22 | |||
23 | /* 4. Transformation using charset aliases */ | ||
24 | - one_test(tc, "UTF-8", "UTF-7", test_utf8, test_utf7, p); | ||
25 | - one_test(tc, "UTF-7", "UTF-8", test_utf7, test_utf8, p); | ||
26 | + if (is_transform_supported(tc, "UTF-8", "UTF-7", p)) { | ||
27 | + one_test(tc, "UTF-8", "UTF-7", test_utf8, test_utf7, p); | ||
28 | + } | ||
29 | + if (is_transform_supported(tc, "UTF-7", "UTF-8", p)) { | ||
30 | + one_test(tc, "UTF-7", "UTF-8", test_utf7, test_utf8, p); | ||
31 | + } | ||
32 | } | ||
33 | |||
34 | #endif /* APR_HAS_XLATE */ | ||
35 | -- | ||
36 | 2.40.0 | ||
37 | |||
diff --git a/meta/recipes-support/apr/apr-util_1.6.1.bb b/meta/recipes-support/apr/apr-util_1.6.3.bb index 4e183ca374..1371e262dd 100644 --- a/meta/recipes-support/apr/apr-util_1.6.1.bb +++ b/meta/recipes-support/apr/apr-util_1.6.3.bb | |||
@@ -12,12 +12,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=158aa0b1efe0c12f23d4b007ddb9a5db \ | |||
12 | SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \ | 12 | SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \ |
13 | file://configfix.patch \ | 13 | file://configfix.patch \ |
14 | file://configure_fixes.patch \ | 14 | file://configure_fixes.patch \ |
15 | file://0001-test_transformation-Check-if-transform-is-supported-.patch \ | ||
15 | file://run-ptest \ | 16 | file://run-ptest \ |
16 | file://0001-Fix-error-handling-in-gdbm.patch \ | 17 | " |
17 | " | ||
18 | 18 | ||
19 | SRC_URI[md5sum] = "bd502b9a8670a8012c4d90c31a84955f" | 19 | SRC_URI[sha256sum] = "2b74d8932703826862ca305b094eef2983c27b39d5c9414442e9976a9acf1983" |
20 | SRC_URI[sha256sum] = "b65e40713da57d004123b6319828be7f1273fbc6490e145874ee1177e112c459" | ||
21 | 20 | ||
22 | EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \ | 21 | EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \ |
23 | --without-odbc \ | 22 | --without-odbc \ |
@@ -32,35 +31,35 @@ MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apu-1-config" | |||
32 | 31 | ||
33 | OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'" | 32 | OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'" |
34 | 33 | ||
35 | do_configure_append() { | 34 | do_configure:append() { |
36 | if [ "${CLASSOVERRIDE}" = "class-target" ]; then | 35 | if [ "${CLASSOVERRIDE}" = "class-target" ]; then |
37 | cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk | 36 | cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk |
38 | sed -i -e 's#^CFLAGS=.*#CFLAGS=${TARGET_CFLAGS}#g' ${B}/build/rules.mk | 37 | sed -i -e 's#^CFLAGS=.*#CFLAGS=${TARGET_CFLAGS}#g' ${B}/build/rules.mk |
39 | fi | 38 | fi |
40 | } | 39 | } |
41 | do_configure_prepend_class-native() { | 40 | do_configure:prepend:class-native() { |
42 | mkdir ${B}/build | 41 | mkdir ${B}/build |
43 | cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${B}/build/rules.mk | 42 | cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${B}/build/rules.mk |
44 | } | 43 | } |
45 | do_configure_append_class-native() { | 44 | do_configure:append:class-native() { |
46 | sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk | 45 | sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk |
47 | # sometimes there isn't SHELL | 46 | # sometimes there isn't SHELL |
48 | sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk | 47 | sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk |
49 | } | 48 | } |
50 | 49 | ||
51 | do_configure_prepend_class-nativesdk() { | 50 | do_configure:prepend:class-nativesdk() { |
52 | cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk | 51 | cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk |
53 | sed -i -e 's#^CFLAGS=.*#CFLAGS=${TARGET_CFLAGS}#g' ${S}/build/rules.mk | 52 | sed -i -e 's#^CFLAGS=.*#CFLAGS=${TARGET_CFLAGS}#g' ${S}/build/rules.mk |
54 | } | 53 | } |
55 | 54 | ||
56 | do_configure_append_class-nativesdk() { | 55 | do_configure:append:class-nativesdk() { |
57 | sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk | 56 | sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk |
58 | sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk | 57 | sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk |
59 | sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk | 58 | sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk |
60 | sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${B}/build/rules.mk | 59 | sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${B}/build/rules.mk |
61 | } | 60 | } |
62 | 61 | ||
63 | do_install_append_class-target() { | 62 | do_install:append:class-target() { |
64 | sed -i -e 's,${STAGING_DIR_HOST},,g' \ | 63 | sed -i -e 's,${STAGING_DIR_HOST},,g' \ |
65 | -e 's,APU_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \ | 64 | -e 's,APU_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \ |
66 | -e 's,APU_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apu-1-config | 65 | -e 's,APU_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apu-1-config |
@@ -73,16 +72,16 @@ PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_DIR_HOST}${prefix},--without- | |||
73 | PACKAGECONFIG[gdbm] = "--with-dbm=gdbm --with-gdbm=${STAGING_DIR_HOST}${prefix},--without-gdbm,gdbm" | 72 | PACKAGECONFIG[gdbm] = "--with-dbm=gdbm --with-gdbm=${STAGING_DIR_HOST}${prefix},--without-gdbm,gdbm" |
74 | 73 | ||
75 | #files ${libdir}/apr-util-1/*.so are not symlinks but loadable modules thus they are packaged in ${PN} | 74 | #files ${libdir}/apr-util-1/*.so are not symlinks but loadable modules thus they are packaged in ${PN} |
76 | FILES_${PN} += "${libdir}/apr-util-1/apr*${SOLIBS} ${libdir}/apr-util-1/apr*${SOLIBSDEV}" | 75 | FILES:${PN} += "${libdir}/apr-util-1/apr*${SOLIBS} ${libdir}/apr-util-1/apr*${SOLIBSDEV}" |
77 | FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/*.la" | 76 | FILES:${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/*.la" |
78 | FILES_${PN}-staticdev += "${libdir}/apr-util-1/*.a" | 77 | FILES:${PN}-staticdev += "${libdir}/apr-util-1/*.a" |
79 | 78 | ||
80 | INSANE_SKIP_${PN} += "dev-so" | 79 | INSANE_SKIP:${PN} += "dev-so" |
81 | 80 | ||
82 | inherit ptest | 81 | inherit ptest |
83 | 82 | ||
84 | RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7" | 83 | RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7" |
85 | RDEPENDS_${PN}-ptest += "libgcc" | 84 | RDEPENDS:${PN}-ptest += "libgcc" |
86 | 85 | ||
87 | do_compile_ptest() { | 86 | do_compile_ptest() { |
88 | cd ${B}/test | 87 | cd ${B}/test |
diff --git a/meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch b/meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch index abff4e9331..b46dc76a86 100644 --- a/meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch +++ b/meta/recipes-support/apr/apr/0001-Add-option-to-disable-timed-dependant-tests.patch | |||
@@ -1,14 +1,15 @@ | |||
1 | From 2bbe20b4f69e84e7a18bc79d382486953f479328 Mon Sep 17 00:00:00 2001 | 1 | From 225abf37cd0b49960664b59f08e515a4c4ea5ad0 Mon Sep 17 00:00:00 2001 |
2 | From: Jeremy Puhlman <jpuhlman@mvista.com> | 2 | From: Jeremy Puhlman <jpuhlman@mvista.com> |
3 | Date: Thu, 26 Mar 2020 18:30:36 +0000 | 3 | Date: Thu, 26 Mar 2020 18:30:36 +0000 |
4 | Subject: [PATCH] Add option to disable timed dependant tests | 4 | Subject: [PATCH] Add option to disable timed dependant tests |
5 | 5 | ||
6 | The disabled tests rely on timing to pass correctly. On a virtualized | 6 | The disabled tests rely on timing to pass correctly. On a virtualized |
7 | system under heavy load, these tests randomly fail because they miss | 7 | system under heavy load, these tests randomly fail because they miss |
8 | a timer or other timing related issues. | 8 | a timer or other timing related issues. |
9 | 9 | ||
10 | Upstream-Status: Pending | 10 | Upstream-Status: Submitted [https://github.com/apache/apr/pull/54] |
11 | Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> | 11 | Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> |
12 | |||
12 | --- | 13 | --- |
13 | configure.in | 6 ++++++ | 14 | configure.in | 6 ++++++ |
14 | include/apr.h.in | 1 + | 15 | include/apr.h.in | 1 + |
@@ -16,10 +17,10 @@ Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> | |||
16 | 3 files changed, 9 insertions(+), 2 deletions(-) | 17 | 3 files changed, 9 insertions(+), 2 deletions(-) |
17 | 18 | ||
18 | diff --git a/configure.in b/configure.in | 19 | diff --git a/configure.in b/configure.in |
19 | index d9f32d6..f0c5661 100644 | 20 | index bfd488b..3663220 100644 |
20 | --- a/configure.in | 21 | --- a/configure.in |
21 | +++ b/configure.in | 22 | +++ b/configure.in |
22 | @@ -2886,6 +2886,12 @@ AC_ARG_ENABLE(timedlocks, | 23 | @@ -3023,6 +3023,12 @@ AC_ARG_ENABLE(timedlocks, |
23 | ) | 24 | ) |
24 | AC_SUBST(apr_has_timedlocks) | 25 | AC_SUBST(apr_has_timedlocks) |
25 | 26 | ||
@@ -45,10 +46,10 @@ index ee99def..c46a5f4 100644 | |||
45 | #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@ | 46 | #define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@ |
46 | 47 | ||
47 | diff --git a/test/testlock.c b/test/testlock.c | 48 | diff --git a/test/testlock.c b/test/testlock.c |
48 | index a43f477..6233d0b 100644 | 49 | index e3437c1..04e01b9 100644 |
49 | --- a/test/testlock.c | 50 | --- a/test/testlock.c |
50 | +++ b/test/testlock.c | 51 | +++ b/test/testlock.c |
51 | @@ -396,13 +396,13 @@ abts_suite *testlock(abts_suite *suite) | 52 | @@ -535,7 +535,7 @@ abts_suite *testlock(abts_suite *suite) |
52 | abts_run_test(suite, threads_not_impl, NULL); | 53 | abts_run_test(suite, threads_not_impl, NULL); |
53 | #else | 54 | #else |
54 | abts_run_test(suite, test_thread_mutex, NULL); | 55 | abts_run_test(suite, test_thread_mutex, NULL); |
@@ -56,6 +57,8 @@ index a43f477..6233d0b 100644 | |||
56 | +#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS | 57 | +#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS |
57 | abts_run_test(suite, test_thread_timedmutex, NULL); | 58 | abts_run_test(suite, test_thread_timedmutex, NULL); |
58 | #endif | 59 | #endif |
60 | abts_run_test(suite, test_thread_nestedmutex, NULL); | ||
61 | @@ -543,7 +543,7 @@ abts_suite *testlock(abts_suite *suite) | ||
59 | abts_run_test(suite, test_thread_rwlock, NULL); | 62 | abts_run_test(suite, test_thread_rwlock, NULL); |
60 | abts_run_test(suite, test_cond, NULL); | 63 | abts_run_test(suite, test_cond, NULL); |
61 | abts_run_test(suite, test_timeoutcond, NULL); | 64 | abts_run_test(suite, test_timeoutcond, NULL); |
@@ -63,7 +66,4 @@ index a43f477..6233d0b 100644 | |||
63 | +#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS | 66 | +#if APR_HAS_TIMEDLOCKS && APR_HAVE_TIME_DEPENDANT_TESTS |
64 | abts_run_test(suite, test_timeoutmutex, NULL); | 67 | abts_run_test(suite, test_timeoutmutex, NULL); |
65 | #endif | 68 | #endif |
66 | #endif | 69 | #ifdef WIN32 |
67 | -- | ||
68 | 2.23.0 | ||
69 | |||
diff --git a/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch b/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch new file mode 100644 index 0000000000..a78b16284f --- /dev/null +++ b/meta/recipes-support/apr/apr/0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From 316b81c462f065927d7fec56aadd5c8cb94d1cf0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 26 Aug 2022 00:28:08 -0700 | ||
4 | Subject: [PATCH] configure: Remove runtime test for mmap that can map | ||
5 | /dev/zero | ||
6 | |||
7 | This never works for cross-compile moreover it ends up disabling | ||
8 | ac_cv_file__dev_zero which then results in compiler errors in shared | ||
9 | mutexes | ||
10 | |||
11 | Upstream-Status: Inappropriate [Cross-compile specific] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | |||
14 | --- | ||
15 | configure.in | 30 ------------------------------ | ||
16 | 1 file changed, 30 deletions(-) | ||
17 | |||
18 | diff --git a/configure.in b/configure.in | ||
19 | index 3663220..dce9789 100644 | ||
20 | --- a/configure.in | ||
21 | +++ b/configure.in | ||
22 | @@ -1303,36 +1303,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm_unlink shmget shmat shmdt shmctl \ | ||
23 | APR_CHECK_DEFINE(MAP_ANON, sys/mman.h) | ||
24 | AC_CHECK_FILE(/dev/zero) | ||
25 | |||
26 | -# Not all systems can mmap /dev/zero (such as HP-UX). Check for that. | ||
27 | -if test "$ac_cv_func_mmap" = "yes" && | ||
28 | - test "$ac_cv_file__dev_zero" = "yes"; then | ||
29 | - AC_CACHE_CHECK([for mmap that can map /dev/zero], | ||
30 | - [ac_cv_mmap__dev_zero], | ||
31 | - [AC_TRY_RUN([#include <sys/types.h> | ||
32 | -#include <sys/stat.h> | ||
33 | -#include <fcntl.h> | ||
34 | -#ifdef HAVE_SYS_MMAN_H | ||
35 | -#include <sys/mman.h> | ||
36 | -#endif | ||
37 | - int main() | ||
38 | - { | ||
39 | - int fd; | ||
40 | - void *m; | ||
41 | - fd = open("/dev/zero", O_RDWR); | ||
42 | - if (fd < 0) { | ||
43 | - return 1; | ||
44 | - } | ||
45 | - m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); | ||
46 | - if (m == (void *)-1) { /* aka MAP_FAILED */ | ||
47 | - return 2; | ||
48 | - } | ||
49 | - if (munmap(m, sizeof(void*)) < 0) { | ||
50 | - return 3; | ||
51 | - } | ||
52 | - return 0; | ||
53 | - }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])]) | ||
54 | -fi | ||
55 | - | ||
56 | # Now we determine which one is our anonymous shmem preference. | ||
57 | haveshmgetanon="0" | ||
58 | havemmapzero="0" | ||
diff --git a/meta/recipes-support/apr/apr/0001-dso-Check-for-NULL-handle-in-apr_dso_sym.patch b/meta/recipes-support/apr/apr/0001-dso-Check-for-NULL-handle-in-apr_dso_sym.patch new file mode 100644 index 0000000000..8ba181b887 --- /dev/null +++ b/meta/recipes-support/apr/apr/0001-dso-Check-for-NULL-handle-in-apr_dso_sym.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From a25be1aaa92a6d2e7f4cc3fdfbb92e5a10b63035 Mon Sep 17 00:00:00 2001 | ||
2 | From: Greg Beard <gmbeard@googlemail.com> | ||
3 | Date: Sat, 25 Mar 2023 08:31:36 +0000 | ||
4 | Subject: [PATCH] dso: Check for NULL handle in apr_dso_sym | ||
5 | |||
6 | Upstream-Status: Backport [https://github.com/apache/apr/pull/40/commits/0efce00093b1ba405d91c7f0eab9755c8527eead] | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- | ||
9 | dso/unix/dso.c | 12 ++++++++++++ | ||
10 | 1 file changed, 12 insertions(+) | ||
11 | |||
12 | diff --git a/dso/unix/dso.c b/dso/unix/dso.c | ||
13 | index fdd56f1..583d5de 100644 | ||
14 | --- a/dso/unix/dso.c | ||
15 | +++ b/dso/unix/dso.c | ||
16 | @@ -173,6 +173,18 @@ APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym, | ||
17 | apr_dso_handle_t *handle, | ||
18 | const char *symname) | ||
19 | { | ||
20 | + /* This is necessary for `testdso.c`. For some reason, musl | ||
21 | + * builds fail the `test_unload_library` test if the below | ||
22 | + * check isn't in place. `test_unload_library` unloads the | ||
23 | + * library and then immediately calls this function. Maybe | ||
24 | + * musl's `dlsym()` assumes the handle is never NULL and | ||
25 | + * some UB is being invoked here... | ||
26 | + */ | ||
27 | + if (handle->handle == NULL) { | ||
28 | + handle->errormsg = "library not loaded"; | ||
29 | + return APR_ESYMNOTFOUND; | ||
30 | + } | ||
31 | + | ||
32 | #if defined(DSO_USE_SHL) | ||
33 | void *symaddr = NULL; | ||
34 | int status; | ||
35 | -- | ||
36 | 2.42.0 | ||
37 | |||
diff --git a/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch b/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch index 72e706f966..d63423f3a1 100644 --- a/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch +++ b/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch | |||
@@ -1,8 +1,7 @@ | |||
1 | From 5925b20da8bbc34d9bf5a5dca123ef38864d43c6 Mon Sep 17 00:00:00 2001 | 1 | From 689a8db96a6d1e1cae9cbfb35d05ac82140a6555 Mon Sep 17 00:00:00 2001 |
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
3 | Date: Tue, 30 Jan 2018 09:39:06 +0800 | 3 | Date: Tue, 30 Jan 2018 09:39:06 +0800 |
4 | Subject: [PATCH 2/7] apr: Remove workdir path references from installed apr | 4 | Subject: [PATCH] apr: Remove workdir path references from installed apr files |
5 | files | ||
6 | 5 | ||
7 | Upstream-Status: Inappropriate [configuration] | 6 | Upstream-Status: Inappropriate [configuration] |
8 | 7 | ||
@@ -14,20 +13,23 @@ packages at target run time, the workdir path caused confusion. | |||
14 | Rebase to 1.6.3 | 13 | Rebase to 1.6.3 |
15 | 14 | ||
16 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | 15 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
16 | |||
17 | --- | 17 | --- |
18 | apr-config.in | 26 ++------------------------ | 18 | apr-config.in | 32 ++------------------------------ |
19 | 1 file changed, 2 insertions(+), 24 deletions(-) | 19 | 1 file changed, 2 insertions(+), 30 deletions(-) |
20 | 20 | ||
21 | diff --git a/apr-config.in b/apr-config.in | 21 | diff --git a/apr-config.in b/apr-config.in |
22 | index 84b4073..bbbf651 100644 | 22 | index bed47ca..47874e5 100644 |
23 | --- a/apr-config.in | 23 | --- a/apr-config.in |
24 | +++ b/apr-config.in | 24 | +++ b/apr-config.in |
25 | @@ -152,14 +152,7 @@ while test $# -gt 0; do | 25 | @@ -164,16 +164,7 @@ while test $# -gt 0; do |
26 | flags="$flags $LDFLAGS" | 26 | flags="$flags $LDFLAGS" |
27 | ;; | 27 | ;; |
28 | --includes) | 28 | --includes) |
29 | - if test "$location" = "installed"; then | 29 | - if test "$location" = "installed"; then |
30 | flags="$flags -I$includedir $EXTRA_INCLUDES" | 30 | flags="$flags -I$includedir $EXTRA_INCLUDES" |
31 | - elif test "$location" = "crosscompile"; then | ||
32 | - flags="$flags -I$APR_TARGET_DIR/$includedir $EXTRA_INCLUDES" | ||
31 | - elif test "$location" = "source"; then | 33 | - elif test "$location" = "source"; then |
32 | - flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES" | 34 | - flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES" |
33 | - else | 35 | - else |
@@ -37,13 +39,15 @@ index 84b4073..bbbf651 100644 | |||
37 | ;; | 39 | ;; |
38 | --srcdir) | 40 | --srcdir) |
39 | echo $APR_SOURCE_DIR | 41 | echo $APR_SOURCE_DIR |
40 | @@ -181,29 +174,14 @@ while test $# -gt 0; do | 42 | @@ -197,33 +188,14 @@ while test $# -gt 0; do |
41 | exit 0 | 43 | exit 0 |
42 | ;; | 44 | ;; |
43 | --link-ld) | 45 | --link-ld) |
44 | - if test "$location" = "installed"; then | 46 | - if test "$location" = "installed"; then |
45 | - ### avoid using -L if libdir is a "standard" location like /usr/lib | 47 | - ### avoid using -L if libdir is a "standard" location like /usr/lib |
46 | - flags="$flags -L$libdir -l${APR_LIBNAME}" | 48 | - flags="$flags -L$libdir -l${APR_LIBNAME}" |
49 | - elif test "$location" = "crosscompile"; then | ||
50 | - flags="$flags -L$APR_TARGET_DIR/$libdir -l${APR_LIBNAME}" | ||
47 | - else | 51 | - else |
48 | - ### this surely can't work since the library is in .libs? | 52 | - ### this surely can't work since the library is in .libs? |
49 | - flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}" | 53 | - flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}" |
@@ -62,6 +66,8 @@ index 84b4073..bbbf651 100644 | |||
62 | - # Since the user is specifying they are linking with libtool, we | 66 | - # Since the user is specifying they are linking with libtool, we |
63 | - # *know* that -R will be recognized by libtool. | 67 | - # *know* that -R will be recognized by libtool. |
64 | - flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}" | 68 | - flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}" |
69 | - elif test "$location" = "crosscompile"; then | ||
70 | - flags="$flags -L${APR_TARGET_DIR}/$libdir -l${APR_LIBNAME}" | ||
65 | - else | 71 | - else |
66 | - flags="$flags $LA_FILE" | 72 | - flags="$flags $LA_FILE" |
67 | - fi | 73 | - fi |
@@ -69,6 +75,3 @@ index 84b4073..bbbf651 100644 | |||
69 | ;; | 75 | ;; |
70 | --shlib-path-var) | 76 | --shlib-path-var) |
71 | echo "$SHLIBPATH_VAR" | 77 | echo "$SHLIBPATH_VAR" |
72 | -- | ||
73 | 1.8.3.1 | ||
74 | |||
diff --git a/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch b/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch deleted file mode 100644 index 4dd53bd8eb..0000000000 --- a/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From d5028c10f156c224475b340cfb1ba025d6797243 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Fri, 2 Feb 2018 15:51:42 +0800 | ||
4 | Subject: [PATCH 3/7] Makefile.in/configure.in: support cross compiling | ||
5 | |||
6 | While cross compiling, the tools/gen_test_char could not | ||
7 | be executed at build time, use AX_PROG_CC_FOR_BUILD to | ||
8 | build native tools/gen_test_char | ||
9 | |||
10 | Upstream-Status: Submitted [https://github.com/apache/apr/pull/8] | ||
11 | |||
12 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
13 | --- | ||
14 | Makefile.in | 10 +++------- | ||
15 | configure.in | 3 +++ | ||
16 | 2 files changed, 6 insertions(+), 7 deletions(-) | ||
17 | |||
18 | diff --git a/Makefile.in b/Makefile.in | ||
19 | index 5fb760e..8675f90 100644 | ||
20 | --- a/Makefile.in | ||
21 | +++ b/Makefile.in | ||
22 | @@ -46,7 +46,7 @@ LT_VERSION = @LT_VERSION@ | ||
23 | |||
24 | CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \ | ||
25 | build/apr_rules.out tools/gen_test_char@EXEEXT@ \ | ||
26 | - tools/gen_test_char.o tools/gen_test_char.lo \ | ||
27 | + tools/gen_test_char.o \ | ||
28 | include/private/apr_escape_test_char.h | ||
29 | DISTCLEAN_TARGETS = config.cache config.log config.status \ | ||
30 | include/apr.h include/arch/unix/apr_private.h \ | ||
31 | @@ -131,13 +131,9 @@ check: $(TARGET_LIB) | ||
32 | etags: | ||
33 | etags `find . -name '*.[ch]'` | ||
34 | |||
35 | -OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS) | ||
36 | -tools/gen_test_char.lo: tools/gen_test_char.c | ||
37 | +tools/gen_test_char@EXEEXT@: tools/gen_test_char.c | ||
38 | $(APR_MKDIR) tools | ||
39 | - $(LT_COMPILE) | ||
40 | - | ||
41 | -tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char) | ||
42 | - $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS) | ||
43 | + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@ | ||
44 | |||
45 | include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@ | ||
46 | $(APR_MKDIR) include/private | ||
47 | diff --git a/configure.in b/configure.in | ||
48 | index 719f331..361120f 100644 | ||
49 | --- a/configure.in | ||
50 | +++ b/configure.in | ||
51 | @@ -183,6 +183,9 @@ dnl can only be used once within a configure script, so this prevents a | ||
52 | dnl preload section from invoking the macro to get compiler info. | ||
53 | AC_PROG_CC | ||
54 | |||
55 | +dnl Check build CC for gen_test_char compiling which is executed at build time. | ||
56 | +AX_PROG_CC_FOR_BUILD | ||
57 | + | ||
58 | dnl AC_PROG_SED is only avaliable in recent autoconf versions. | ||
59 | dnl Use AC_CHECK_PROG instead if AC_PROG_SED is not present. | ||
60 | ifdef([AC_PROG_SED], | ||
61 | -- | ||
62 | 1.8.3.1 | ||
63 | |||
diff --git a/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch b/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch deleted file mode 100644 index d1a2ebe881..0000000000 --- a/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | From 49661ea3858cf8494926cccf57d3e8c6dcb47117 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dengke Du <dengke.du@windriver.com> | ||
3 | Date: Wed, 14 Dec 2016 18:13:08 +0800 | ||
4 | Subject: [PATCH] apr: fix off_t size doesn't match in glibc when cross | ||
5 | compiling | ||
6 | |||
7 | In configure.in, it contains the following: | ||
8 | |||
9 | APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8) | ||
10 | |||
11 | the macro "APR_CHECK_SIZEOF_EXTENDED" was defined in build/apr_common.m4, | ||
12 | it use the "AC_TRY_RUN" macro, this macro let the off_t to 8, when cross | ||
13 | compiling enable. | ||
14 | |||
15 | So it was hardcoded for cross compiling, we should detect it dynamic based on | ||
16 | the sysroot's glibc. We change it to the following: | ||
17 | |||
18 | AC_CHECK_SIZEOF(off_t) | ||
19 | |||
20 | The same for the following hardcoded types for cross compiling: | ||
21 | |||
22 | pid_t 8 | ||
23 | ssize_t 8 | ||
24 | size_t 8 | ||
25 | off_t 8 | ||
26 | |||
27 | Change the above correspondingly. | ||
28 | |||
29 | Signed-off-by: Dengke Du <dengke.du@windriver.com> | ||
30 | |||
31 | Upstream-Status: Pending | ||
32 | |||
33 | --- | ||
34 | configure.in | 8 ++++---- | ||
35 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
36 | |||
37 | diff --git a/configure.in b/configure.in | ||
38 | index 27b8539..fb408d1 100644 | ||
39 | --- a/configure.in | ||
40 | +++ b/configure.in | ||
41 | @@ -1801,7 +1801,7 @@ else | ||
42 | socklen_t_value="int" | ||
43 | fi | ||
44 | |||
45 | -APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], pid_t, 8) | ||
46 | +AC_CHECK_SIZEOF(pid_t) | ||
47 | |||
48 | if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then | ||
49 | pid_t_fmt='#define APR_PID_T_FMT "hd"' | ||
50 | @@ -1873,7 +1873,7 @@ APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned long, lu, [size_t_fmt="lu"], [ | ||
51 | APR_CHECK_TYPES_FMT_COMPATIBLE(size_t, unsigned int, u, [size_t_fmt="u"]) | ||
52 | ]) | ||
53 | |||
54 | -APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8) | ||
55 | +AC_CHECK_SIZEOF(ssize_t) | ||
56 | |||
57 | dnl the else cases below should no longer occur; | ||
58 | AC_MSG_CHECKING([which format to use for apr_ssize_t]) | ||
59 | @@ -1891,7 +1891,7 @@ fi | ||
60 | |||
61 | ssize_t_fmt="#define APR_SSIZE_T_FMT \"$ssize_t_fmt\"" | ||
62 | |||
63 | -APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8) | ||
64 | +AC_CHECK_SIZEOF(size_t) | ||
65 | |||
66 | # else cases below should no longer occur; | ||
67 | AC_MSG_CHECKING([which format to use for apr_size_t]) | ||
68 | @@ -1909,7 +1909,7 @@ fi | ||
69 | |||
70 | size_t_fmt="#define APR_SIZE_T_FMT \"$size_t_fmt\"" | ||
71 | |||
72 | -APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8) | ||
73 | +AC_CHECK_SIZEOF(off_t) | ||
74 | |||
75 | if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then | ||
76 | # Enable LFS | ||
diff --git a/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch b/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch deleted file mode 100644 index 8760b0140c..0000000000 --- a/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From c6afc4a4a766478cb6aa6b43a50051881b6318d7 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> | ||
3 | Date: Fri, 3 Mar 2017 22:24:17 +0100 | ||
4 | Subject: [PATCH 7/7] explicitly link libapr against phtread to make gold happy | ||
5 | on test | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | | ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_init' | ||
11 | | ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_settype' | ||
12 | | ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_destroy' | ||
13 | | ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutex_trylock' | ||
14 | | ../.libs/libapr-1.so: error: undefined reference to 'pthread_attr_setstacksize' | ||
15 | | ../.libs/libapr-1.so: error: undefined reference to 'pthread_create' | ||
16 | | ../.libs/libapr-1.so: error: undefined reference to 'pthread_join' | ||
17 | | ../.libs/libapr-1.so: error: undefined reference to 'pthread_detach' | ||
18 | | ../.libs/libapr-1.so: error: undefined reference to 'pthread_sigmask' | ||
19 | | ../.libs/libapr-1.so: error: undefined reference to 'pthread_once' | ||
20 | | ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_create' | ||
21 | | ../.libs/libapr-1.so: error: undefined reference to 'pthread_getspecific' | ||
22 | | ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_delete' | ||
23 | | ../.libs/libapr-1.so: error: undefined reference to 'pthread_setspecific' | ||
24 | | collect2: error: ld returned 1 exit status | ||
25 | | Makefile:114: recipe for target 'globalmutexchild' failed | ||
26 | | make[1]: *** [globalmutexchild] Error 1 | ||
27 | | make[1]: Leaving directory '/home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/apr/1.5.2-r0/apr-1.5.2/test' | ||
28 | |||
29 | Upstream-Status: Pending | ||
30 | |||
31 | Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> | ||
32 | --- | ||
33 | configure.in | 1 + | ||
34 | 1 file changed, 1 insertion(+) | ||
35 | |||
36 | diff --git a/configure.in b/configure.in | ||
37 | index a227e72..cbc0f90 100644 | ||
38 | --- a/configure.in | ||
39 | +++ b/configure.in | ||
40 | @@ -784,6 +784,7 @@ else | ||
41 | APR_PTHREADS_CHECK_RESTORE ] ) | ||
42 | fi | ||
43 | if test "$pthreadh" = "1"; then | ||
44 | + APR_ADDTO(LIBS,[-lpthread]) | ||
45 | APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS | ||
46 | APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG | ||
47 | APR_CHECK_PTHREAD_RECURSIVE_MUTEX | ||
48 | -- | ||
49 | 1.8.3.1 | ||
50 | |||
diff --git a/meta/recipes-support/apr/apr/autoconf-2.73.patch b/meta/recipes-support/apr/apr/autoconf-2.73.patch new file mode 100644 index 0000000000..a8b7a77566 --- /dev/null +++ b/meta/recipes-support/apr/apr/autoconf-2.73.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | To work with autoconf 2.73, tweak the macro ordering in configure.in. | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
5 | |||
6 | Index: apr-1.7.2/configure.in | ||
7 | =================================================================== | ||
8 | --- apr-1.7.2.orig/configure.in | ||
9 | +++ apr-1.7.2/configure.in | ||
10 | @@ -430,6 +430,8 @@ if test "$host" = "i586-pc-beos"; then | ||
11 | ) dnl | ||
12 | fi | ||
13 | |||
14 | +APR_CHECK_DEFINE(LOCK_EX, sys/file.h) | ||
15 | + | ||
16 | # this is the place to put specific options for platform/compiler | ||
17 | # combinations | ||
18 | case "$host:$CC" in | ||
19 | @@ -2384,7 +2386,6 @@ AC_MSG_RESULT([$msg]) | ||
20 | AC_SUBST(have_union_semun) | ||
21 | |||
22 | dnl Checks for libraries. | ||
23 | -APR_CHECK_DEFINE(LOCK_EX, sys/file.h) | ||
24 | APR_CHECK_DEFINE(F_SETLK, fcntl.h) | ||
25 | APR_CHECK_DEFINE(SEM_UNDO, sys/sem.h) | ||
26 | |||
diff --git a/meta/recipes-support/apr/apr/autoconf270.patch b/meta/recipes-support/apr/apr/autoconf270.patch deleted file mode 100644 index 9f7b5c624c..0000000000 --- a/meta/recipes-support/apr/apr/autoconf270.patch +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | With autoconf 2.70 confdefs.h is already included. Including it twice generates | ||
2 | compiler warnings and since this macros is to error on warnings, it breaks. | ||
3 | |||
4 | Fix by not including the file. | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | RP - 2021/1/28 | ||
8 | |||
9 | Index: apr-1.7.0/build/apr_common.m4 | ||
10 | =================================================================== | ||
11 | --- apr-1.7.0.orig/build/apr_common.m4 | ||
12 | +++ apr-1.7.0/build/apr_common.m4 | ||
13 | @@ -505,8 +505,7 @@ AC_DEFUN([APR_TRY_COMPILE_NO_WARNING], | ||
14 | fi | ||
15 | AC_COMPILE_IFELSE( | ||
16 | [AC_LANG_SOURCE( | ||
17 | - [#include "confdefs.h" | ||
18 | - ] | ||
19 | + [] | ||
20 | [[$1]] | ||
21 | [int main(int argc, const char *const *argv) {] | ||
22 | [[$2]] | ||
diff --git a/meta/recipes-support/apr/apr/libtoolize_check.patch b/meta/recipes-support/apr/apr/libtoolize_check.patch index 740792e6b0..80ce43caa4 100644 --- a/meta/recipes-support/apr/apr/libtoolize_check.patch +++ b/meta/recipes-support/apr/apr/libtoolize_check.patch | |||
@@ -1,6 +1,7 @@ | |||
1 | From 17835709bc55657b7af1f7c99b3f572b819cf97e Mon Sep 17 00:00:00 2001 | ||
1 | From: Helmut Grohne <helmut@subdivi.de> | 2 | From: Helmut Grohne <helmut@subdivi.de> |
2 | Subject: check for libtoolize rather than libtool | 3 | Date: Tue, 7 Feb 2023 07:04:00 +0000 |
3 | Last-Update: 2014-09-19 | 4 | Subject: [PATCH] check for libtoolize rather than libtool |
4 | 5 | ||
5 | libtool is now in package libtool-bin, but apr only needs libtoolize. | 6 | libtool is now in package libtool-bin, but apr only needs libtoolize. |
6 | 7 | ||
@@ -8,14 +9,22 @@ Upstream-Status: Pending [ from debian: https://sources.debian.org/data/main/a/a | |||
8 | 9 | ||
9 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | 10 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> |
10 | 11 | ||
11 | --- apr.orig/build/buildcheck.sh | 12 | --- |
12 | +++ apr/build/buildcheck.sh | 13 | build/buildcheck.sh | 10 ++++------ |
13 | @@ -39,11 +39,11 @@ fi | 14 | 1 file changed, 4 insertions(+), 6 deletions(-) |
15 | |||
16 | diff --git a/build/buildcheck.sh b/build/buildcheck.sh | ||
17 | index 44921b5..08bc8a8 100755 | ||
18 | --- a/build/buildcheck.sh | ||
19 | +++ b/build/buildcheck.sh | ||
20 | @@ -39,13 +39,11 @@ fi | ||
14 | # ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a | 21 | # ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a |
15 | # output is multiline from 1.5 onwards | 22 | # output is multiline from 1.5 onwards |
16 | 23 | ||
17 | -# Require libtool 1.4 or newer | 24 | -# Require libtool 1.4 or newer |
18 | -libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14` | 25 | -if test -z "$libtool"; then |
26 | - libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14` | ||
27 | -fi | ||
19 | -lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'` | 28 | -lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'` |
20 | +# Require libtoolize 1.4 or newer | 29 | +# Require libtoolize 1.4 or newer |
21 | +libtoolize=`build/PrintPath glibtoolize1 glibtoolize libtoolize libtoolize15 libtoolize14` | 30 | +libtoolize=`build/PrintPath glibtoolize1 glibtoolize libtoolize libtoolize15 libtoolize14` |
diff --git a/meta/recipes-support/apr/apr_1.7.0.bb b/meta/recipes-support/apr/apr_1.7.4.bb index f879e2864a..4df741c766 100644 --- a/meta/recipes-support/apr/apr_1.7.0.bb +++ b/meta/recipes-support/apr/apr_1.7.4.bb | |||
@@ -1,8 +1,8 @@ | |||
1 | SUMMARY = "Apache Portable Runtime (APR) library" | 1 | SUMMARY = "Apache Portable Runtime (APR) library" |
2 | DESCRIPTION = "The Apache Portable Runtime (APR) is a supporting library for the \ | 2 | |
3 | Apache web server. It provides a set of APIs that map to the underlying \ | 3 | DESCRIPTION = "Create and maintain software libraries that provide a predictable \ |
4 | operating system (OS). Where the OS does not support a particular function, \ | 4 | and consistent interface to underlying platform-specific implementations." |
5 | APR will provide an emulation." | 5 | |
6 | HOMEPAGE = "http://apr.apache.org/" | 6 | HOMEPAGE = "http://apr.apache.org/" |
7 | SECTION = "libs" | 7 | SECTION = "libs" |
8 | DEPENDS = "util-linux" | 8 | DEPENDS = "util-linux" |
@@ -16,18 +16,16 @@ BBCLASSEXTEND = "native nativesdk" | |||
16 | SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \ | 16 | SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \ |
17 | file://run-ptest \ | 17 | file://run-ptest \ |
18 | file://0002-apr-Remove-workdir-path-references-from-installed-ap.patch \ | 18 | file://0002-apr-Remove-workdir-path-references-from-installed-ap.patch \ |
19 | file://0003-Makefile.in-configure.in-support-cross-compiling.patch \ | ||
20 | file://0004-Fix-packet-discards-HTTP-redirect.patch \ | 19 | file://0004-Fix-packet-discards-HTTP-redirect.patch \ |
21 | file://0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \ | 20 | file://0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \ |
22 | file://0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch \ | ||
23 | file://0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch \ | ||
24 | file://libtoolize_check.patch \ | 21 | file://libtoolize_check.patch \ |
25 | file://0001-Add-option-to-disable-timed-dependant-tests.patch \ | 22 | file://0001-Add-option-to-disable-timed-dependant-tests.patch \ |
26 | file://autoconf270.patch \ | 23 | file://0001-configure-Remove-runtime-test-for-mmap-that-can-map-.patch \ |
24 | file://autoconf-2.73.patch \ | ||
25 | file://0001-dso-Check-for-NULL-handle-in-apr_dso_sym.patch \ | ||
27 | " | 26 | " |
28 | 27 | ||
29 | SRC_URI[md5sum] = "7a14a83d664e87599ea25ff4432e48a7" | 28 | SRC_URI[sha256sum] = "fc648de983f3a2a6c9e78dea1f180639bd2fad6c06d556d4367a701fe5c35577" |
30 | SRC_URI[sha256sum] = "e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea" | ||
31 | 29 | ||
32 | inherit autotools-brokensep lib_package binconfig multilib_header ptest multilib_script | 30 | inherit autotools-brokensep lib_package binconfig multilib_header ptest multilib_script |
33 | 31 | ||
@@ -35,19 +33,32 @@ OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'" | |||
35 | 33 | ||
36 | # Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928 | 34 | # Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928 |
37 | CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes" | 35 | CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes" |
38 | 36 | # Enable largefile | |
37 | CACHED_CONFIGUREVARS += "apr_cv_use_lfs64=yes" | ||
38 | # Additional AC_TRY_RUN tests which will need to be cached for cross compile | ||
39 | CACHED_CONFIGUREVARS += "apr_cv_epoll=yes epoll_create1=yes apr_cv_sock_cloexec=yes \ | ||
40 | ac_cv_struct_rlimit=yes \ | ||
41 | ac_cv_func_sem_open=yes \ | ||
42 | apr_cv_process_shared_works=yes \ | ||
43 | apr_cv_mutex_robust_shared=yes \ | ||
44 | " | ||
39 | # Also suppress trying to use sctp. | 45 | # Also suppress trying to use sctp. |
40 | # | 46 | # |
41 | CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no" | 47 | CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no" |
42 | 48 | ||
43 | CACHED_CONFIGUREVARS += "ac_cv_sizeof_struct_iovec=yes" | 49 | # ac_cv_sizeof_struct_iovec is deduced using runtime check which will fail during cross-compile |
50 | CACHED_CONFIGUREVARS += "${@['ac_cv_sizeof_struct_iovec=16','ac_cv_sizeof_struct_iovec=8'][d.getVar('SITEINFO_BITS') != '32']}" | ||
51 | |||
44 | CACHED_CONFIGUREVARS += "ac_cv_file__dev_zero=yes" | 52 | CACHED_CONFIGUREVARS += "ac_cv_file__dev_zero=yes" |
45 | 53 | ||
54 | CACHED_CONFIGUREVARS:append:libc-musl = " ac_cv_strerror_r_rc_int=yes" | ||
46 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" | 55 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" |
56 | PACKAGECONFIG:append:libc-musl = " xsi-strerror" | ||
47 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | 57 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," |
48 | PACKAGECONFIG[timed-tests] = "--enable-timed-tests,--disable-timed-tests," | 58 | PACKAGECONFIG[timed-tests] = "--enable-timed-tests,--disable-timed-tests," |
59 | PACKAGECONFIG[xsi-strerror] = "ac_cv_strerror_r_rc_int=yes,ac_cv_strerror_r_rc_int=no," | ||
49 | 60 | ||
50 | do_configure_prepend() { | 61 | do_configure:prepend() { |
51 | # Avoid absolute paths for grep since it causes failures | 62 | # Avoid absolute paths for grep since it causes failures |
52 | # when using sstate between different hosts with different | 63 | # when using sstate between different hosts with different |
53 | # install paths for grep. | 64 | # install paths for grep. |
@@ -61,24 +72,26 @@ do_configure_prepend() { | |||
61 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apr-1-config \ | 72 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/apr-1-config \ |
62 | ${PN}-dev:${datadir}/build-1/apr_rules.mk" | 73 | ${PN}-dev:${datadir}/build-1/apr_rules.mk" |
63 | 74 | ||
64 | FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*" | 75 | FILES:${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*" |
65 | RDEPENDS_${PN}-dev += "bash" | 76 | RDEPENDS:${PN}-dev += "bash libtool" |
66 | 77 | ||
67 | RDEPENDS_${PN}-ptest += "libgcc" | 78 | RDEPENDS:${PN}-ptest += "libgcc" |
68 | 79 | ||
69 | #for some reason, build/libtool.m4 handled by buildconf still be overwritten | 80 | #for some reason, build/libtool.m4 handled by buildconf still be overwritten |
70 | #when autoconf, so handle it again. | 81 | #when autoconf, so handle it again. |
71 | do_configure_append() { | 82 | do_configure:append() { |
72 | sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4 | 83 | sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4 |
73 | sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk | 84 | sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk |
74 | } | 85 | } |
75 | 86 | ||
76 | do_install_append() { | 87 | do_install:append() { |
77 | oe_multilib_header apr.h | 88 | oe_multilib_header apr.h |
78 | install -d ${D}${datadir}/apr | 89 | install -d ${D}${datadir}/apr |
79 | } | 90 | } |
80 | 91 | ||
81 | do_install_append_class-target() { | 92 | do_install:append:class-target() { |
93 | rm -f ${D}${datadir}/build-1/libtool | ||
94 | sed -i s,LIBTOOL=.*,LIBTOOL=libtool,g ${D}${datadir}/build-1/apr_rules.mk | ||
82 | sed -i -e 's,${DEBUG_PREFIX_MAP},,g' \ | 95 | sed -i -e 's,${DEBUG_PREFIX_MAP},,g' \ |
83 | -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk | 96 | -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk |
84 | sed -i -e 's,${STAGING_DIR_HOST},,g' \ | 97 | sed -i -e 's,${STAGING_DIR_HOST},,g' \ |
@@ -96,12 +109,12 @@ apr_sysroot_preprocess () { | |||
96 | cp ${S}/build/apr_rules.mk $d/ | 109 | cp ${S}/build/apr_rules.mk $d/ |
97 | sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk | 110 | sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk |
98 | sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk | 111 | sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk |
99 | sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk | 112 | sed -i s,LIBTOOL=.*,LIBTOOL=libtool,g $d/apr_rules.mk |
100 | sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk | 113 | sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk |
101 | cp ${S}/build/mkdir.sh $d/ | 114 | cp ${S}/build/mkdir.sh $d/ |
102 | cp ${S}/build/make_exports.awk $d/ | 115 | cp ${S}/build/make_exports.awk $d/ |
103 | cp ${S}/build/make_var_export.awk $d/ | 116 | cp ${S}/build/make_var_export.awk $d/ |
104 | cp ${S}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool | 117 | cp ${S}/libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool |
105 | } | 118 | } |
106 | 119 | ||
107 | do_compile_ptest() { | 120 | do_compile_ptest() { |