Skip to contentSkip to conversation

acpica: correct flex/bison deps, add explicit m4-native dep

PATCH Superseded Christopher Larson 3 participants 9 messages Nov 25, 2019 – Nov 26, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 acpica: correct flex/bison deps, add explicit m4-native dep

From: Christopher Larson <[email protected]>

This project doesn't require target flex or bison, just the natives, and it uses m4 explicitly in its configuration.

---
 meta/recipes-extended/acpica/acpica_20191018.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/acpica/acpica_20191018.bb +1 -1
index 4692275762..04732bbfe3 100644
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://source/compiler/aslcompile.c;beginline=7;endline=150;
 
 COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
 
-DEPENDS = "bison flex bison-native"
+DEPENDS = "m4-native flex-native bison-native"
 
 SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix-${PV}.tar.gz"
 SRC_URI[md5sum] = "539a0252bcb42c383ceeaeb12ae9a60d"
Signature · 1 line
2.11.1
#1 lore raw

PATCH 2/3 dosfstools: fix CP437 error from `dosfsck -l`

From: Christopher Larson <[email protected]>

Fix this error seen when using dosfsck -l to list fs contents:

CP437: Invalid argument

---
 meta/recipes-devtools/dosfstools/dosfstools_4.1.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/dosfstools/dosfstools_4.1.bb +3 -0
index 69aa81af44..c99d2019c8 100644
@@ -23,3 +23,6 @@ EXTRA_OECONF = "--without-udev --enable-compat-symlinks"
 CFLAGS += "-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
 
 BBCLASSEXTEND = "native"
+
+# Add codepage437 to avoid error from `dosfsck -l`
+RRECOMMENDS_${PN}_append_libc-glibc += "glibc-gconv-ibm437"
Signature · 1 line
2.11.1
#2 lore raw

Re: [PATCH 2/3] dosfstools: fix CP437 error from `dosfsck -l`

Quoted 17 lines · Christopher Larson

From: Christopher Larson <[email protected]>

Fix this error seen when using dosfsck -l to list fs contents:

CP437: Invalid argument

---
 meta/recipes-devtools/dosfstools/dosfstools_4.1.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/dosfstools/dosfstools_4.1.bb +0 -0
index 69aa81af44..c99d2019c8 100644

meta/recipes-devtools/dosfstools/dosfstools_4.1.bb EXTRA_OECONF = "--without-udev --enable-compat-symlinks" · line 28

Quoted 6 lines
meta/recipes-devtools/dosfstools/dosfstools_4.1.bb +3 -0
@@ -23,3 +23,6 @@ EXTRA_OECONF = "--without-udev --enable-compat-symlinks"
 CFLAGS += "-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
 
 BBCLASSEXTEND = "native"
+
+# Add codepage437 to avoid error from `dosfsck -l`
+RRECOMMENDS_${PN}_append_libc-glibc += "glibc-gconv-ibm437"

I think += should be dropped

Quoted 8 lines

--
2.11.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw

Re: [PATCH 2/3] dosfstools: fix CP437 error from `dosfsck -l`

Good call, no idea how I missed that one.

Quoted 35 lines · On Nov 25, 2019, 3:28 PM -0700, Khem Raj <[email protected]>, wrote:
Quoted 20 lines · Christopher Larson

From: Christopher Larson <[email protected]>

Fix this error seen when using dosfsck -l to list fs contents:

CP437: Invalid argument

---
meta/recipes-devtools/dosfstools/dosfstools_4.1.bb | 3 +++

1 file changed, 3 insertions(+)
meta/recipes-devtools/dosfstools/dosfstools_4.1.bb +0 -0
index 69aa81af44..c99d2019c8 100644
@@ -23,3 +23,6 @@ EXTRA_OECONF = "--without-udev --enable-compat-symlinks"

CFLAGS += "-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"

BBCLASSEXTEND = "native"

meta/recipes-devtools/dosfstools/dosfstools_4.1.bb EXTRA_OECONF = "--without-udev --enable-compat-symlinks" · line 28

Quoted 3 lines
meta/recipes-devtools/dosfstools/dosfstools_4.1.bb +3 -0
+
+# Add codepage437 to avoid error from `dosfsck -l`
+RRECOMMENDS_${PN}_append_libc-glibc += "glibc-gconv-ibm437"

I think += should be dropped

Quoted 8 lines

--
2.11.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#4 lore raw

PATCH 3/3 libcap-ng: fix built failure with some external toolchains due to missing pthread

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

The libcap-ng build doesn't pass -pthread and can fail to link.

---
 meta/recipes-support/libcap-ng/libcap-ng.inc       |  1 +
 .../libcap-ng/revert-pthread_atfork-fix.patch      | 56 ++++++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100644 meta/recipes-support/libcap-ng/libcap-ng/revert-pthread_atfork-fix.patch
meta/recipes-support/libcap-ng/libcap-ng.inc +1 -0
index aec83896e4..46d37e6807 100644
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 
 SRC_URI = "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \
            file://python.patch \
+           file://revert-pthread_atfork-fix.patch \
 "
 
 SRC_URI[md5sum] = "57dc267e2949cdecb651a929f9206572"
meta/recipes-support/libcap-ng/libcap-ng/revert-pthread_atfork-fix.patch new file +56 -0

56 lines not on this page · raw message

Signature · 1 line
2.11.1
#5 lore raw

Re: [PATCH 3/3] libcap-ng: fix built failure with some external toolchains due to missing pthread

Quoted 5 lines · Christopher Larson

From: Christopher Larson <[email protected]>

The libcap-ng build doesn't pass -pthread and can fail to link.

perhaps, adding a configure time check for pthread.h would be possible

AC_CHECK_HEADERS(pthread.h, [], [AC_MSG_WARN(pthread.h not found, pthread_atfork disabled.)])

then include pthread.h inside conditional like below in source files.

#ifdef HAVE_PTHREAD_H
#endif

Quoted 89 lines
---
 meta/recipes-support/libcap-ng/libcap-ng.inc       |  1 +
 .../libcap-ng/revert-pthread_atfork-fix.patch      | 56 ++++++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100644 meta/recipes-support/libcap-ng/libcap-ng/revert-pthread_atfork-fix.patch
meta/recipes-support/libcap-ng/libcap-ng.inc +1 -0
index aec83896e4..46d37e6807 100644
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 
 SRC_URI = "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \
            file://python.patch \
+           file://revert-pthread_atfork-fix.patch \
 "
 
 SRC_URI[md5sum] = "57dc267e2949cdecb651a929f9206572"
meta/recipes-support/libcap-ng/libcap-ng/revert-pthread_atfork-fix.patch new file +56 -1
new file mode 100644
index 0000000000..d3f7790b1e
@@ -0,0 +1,56 @@
+From 81dc82393fae9851397fa5d94094434aa1d5c3d1 Mon Sep 17 00:00:00 2001
+From: Christopher Larson <[email protected]>
+Date: Thu, 14 Nov 2019 21:13:24 +0500
+Subject: [PATCH] Revert "Fix usage of pthread_atfork a whole different way"
+
+This reverts commit 08a09cba90f3d960c080a20833fb8c0908f1cea6.
+
+The fix was breaking builds with some toolchains.
+
+Signed-off-by: Christopher Larson <[email protected]>
+---
+ src/Makefile.am |  2 +-
+ src/cap-ng.c    | 12 +++++++++++-
+ 2 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 5a66d4e..d46d02b 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -34,5 +34,5 @@ noinst_HEADERS = captab.h
+ libcap_ng_la_SOURCES = cap-ng.c lookup_table.c
+ libcap_ng_la_LIBADD =
+ libcap_ng_la_DEPENDENCIES = $(libcap_ng_la_SOURCES) ../config.h
+-libcap_ng_la_LDFLAGS = -Wl,-z,relro
++libcap_ng_la_LDFLAGS = -Wl,-z,relro -Wl,-z,nodelete
+
+diff --git a/src/cap-ng.c b/src/cap-ng.c
+index 35fcd7a..ed31afa 100644
+--- a/src/cap-ng.c
++++ b/src/cap-ng.c
+@@ -155,6 +155,15 @@ static __thread struct cap_ng m = { 1,
+                                       CAPNG_NEW,
+                                       {0, 0} };
+
++
++/*
++ * The pthread_atfork function is being made weak so that we can use it
++ * if the program is linked with pthreads and not requiring it for
++ * everything that uses libcap-ng.
++ */
++extern int __attribute__((weak)) pthread_atfork(void (*prepare)(void),
++      void (*parent)(void), void (*child)(void));
++
+ /*
+  * Reset the state so that init gets called to erase everything
+  */
+@@ -166,7 +175,8 @@ static void deinit(void)
+ static void init_lib(void) __attribute__ ((constructor));
+ static void init_lib(void)
+ {
+-      pthread_atfork(NULL, NULL, deinit);
++      if (pthread_atfork)
++              pthread_atfork(NULL, NULL, deinit);
+ }
+
+ static void init(void)
--

2.11.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#6 lore raw

Re: [PATCH 3/3] libcap-ng: fix built failure with some external toolchains due to missing pthread

It seems like libcap wants to support use of pthread by the linking application without mandating it, so we can’t pass -pthread, and I’m not sure a configure check would help, unless it wants to pull in pthread unconditionally. But I may be misunderstanding the libcap commits, and am *definitely* not a threading expert :)

Quoted 108 lines · On Nov 25, 2019, 3:27 PM -0700, Khem Raj <[email protected]>, wrote:
Quoted 5 lines · Christopher Larson

From: Christopher Larson <[email protected]>

The libcap-ng build doesn't pass -pthread and can fail to link.

perhaps, adding a configure time check for pthread.h would be possible

AC_CHECK_HEADERS(pthread.h, [], [AC_MSG_WARN(pthread.h not found, pthread_atfork disabled.)])

then include pthread.h inside conditional like below in source files.

#ifdef HAVE_PTHREAD_H
#endif

Quoted 89 lines

---
meta/recipes-support/libcap-ng/libcap-ng.inc | 1 + .../libcap-ng/revert-pthread_atfork-fix.patch | 56 ++++++++++++++++++++++

2 files changed, 57 insertions(+)

create mode 100644 meta/recipes-support/libcap-ng/libcap-ng/revert-pthread_atfork-fix.patch

meta/recipes-support/libcap-ng/libcap-ng.inc +1 -0
index aec83896e4..46d37e6807 100644
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 
 SRC_URI = "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \
 file://python.patch \
+ file://revert-pthread_atfork-fix.patch \

"

SRC_URI[md5sum] = "57dc267e2949cdecb651a929f9206572"

meta/recipes-support/libcap-ng/libcap-ng/revert-pthread_atfork-fix.patch new file +56 -1
new file mode 100644
index 0000000000..d3f7790b1e
@@ -0,0 +1,56 @@
+From 81dc82393fae9851397fa5d94094434aa1d5c3d1 Mon Sep 17 00:00:00 2001
+From: Christopher Larson <[email protected]>
+Date: Thu, 14 Nov 2019 21:13:24 +0500
+Subject: [PATCH] Revert "Fix usage of pthread_atfork a whole different way"
+
+This reverts commit 08a09cba90f3d960c080a20833fb8c0908f1cea6.
+
+The fix was breaking builds with some toolchains.
+
+Signed-off-by: Christopher Larson <[email protected]>
+---
+ src/Makefile.am | 2 +-
+ src/cap-ng.c | 12 +++++++++++-
+ 2 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 5a66d4e..d46d02b 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -34,5 +34,5 @@ noinst_HEADERS = captab.h
+ libcap_ng_la_SOURCES = cap-ng.c lookup_table.c
+ libcap_ng_la_LIBADD =
+ libcap_ng_la_DEPENDENCIES = $(libcap_ng_la_SOURCES) ../config.h
+-libcap_ng_la_LDFLAGS = -Wl,-z,relro
++libcap_ng_la_LDFLAGS = -Wl,-z,relro -Wl,-z,nodelete
+
+diff --git a/src/cap-ng.c b/src/cap-ng.c
+index 35fcd7a..ed31afa 100644
+--- a/src/cap-ng.c
++++ b/src/cap-ng.c
+@@ -155,6 +155,15 @@ static __thread struct cap_ng m = { 1,
+ CAPNG_NEW,
+ {0, 0} };
+
++
++/*
++ * The pthread_atfork function is being made weak so that we can use it
++ * if the program is linked with pthreads and not requiring it for
++ * everything that uses libcap-ng.
++ */
++extern int __attribute__((weak)) pthread_atfork(void (*prepare)(void),
++ void (*parent)(void), void (*child)(void));
++
+ /*
+ * Reset the state so that init gets called to erase everything
+ */
+@@ -166,7 +175,8 @@ static void deinit(void)
+ static void init_lib(void) __attribute__ ((constructor));
+ static void init_lib(void)
+ {
+- pthread_atfork(NULL, NULL, deinit);
++ if (pthread_atfork)
++ pthread_atfork(NULL, NULL, deinit);
+ }
+
+ static void init(void)
--

2.11.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#7 lore raw

Re: [PATCH 3/3] libcap-ng: fix built failure with some external toolchains due to missing pthread

In reply to Khem Raj

Testing with https://github.com/stevegrubb/libcap-ng/pull/10 + HAVE_PTHREAD_H conditional now. Thanks.

Quoted 108 lines · On Nov 25, 2019, 3:27 PM -0700, Khem Raj <[email protected]>, wrote:
Quoted 5 lines · Christopher Larson

From: Christopher Larson <[email protected]>

The libcap-ng build doesn't pass -pthread and can fail to link.

perhaps, adding a configure time check for pthread.h would be possible

AC_CHECK_HEADERS(pthread.h, [], [AC_MSG_WARN(pthread.h not found, pthread_atfork disabled.)])

then include pthread.h inside conditional like below in source files.

#ifdef HAVE_PTHREAD_H
#endif

Quoted 89 lines

---
meta/recipes-support/libcap-ng/libcap-ng.inc | 1 + .../libcap-ng/revert-pthread_atfork-fix.patch | 56 ++++++++++++++++++++++

2 files changed, 57 insertions(+)

create mode 100644 meta/recipes-support/libcap-ng/libcap-ng/revert-pthread_atfork-fix.patch

meta/recipes-support/libcap-ng/libcap-ng.inc +1 -0
index aec83896e4..46d37e6807 100644
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 
 SRC_URI = "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \
 file://python.patch \
+ file://revert-pthread_atfork-fix.patch \

"

SRC_URI[md5sum] = "57dc267e2949cdecb651a929f9206572"

meta/recipes-support/libcap-ng/libcap-ng/revert-pthread_atfork-fix.patch new file +56 -1
new file mode 100644
index 0000000000..d3f7790b1e
@@ -0,0 +1,56 @@
+From 81dc82393fae9851397fa5d94094434aa1d5c3d1 Mon Sep 17 00:00:00 2001
+From: Christopher Larson <[email protected]>
+Date: Thu, 14 Nov 2019 21:13:24 +0500
+Subject: [PATCH] Revert "Fix usage of pthread_atfork a whole different way"
+
+This reverts commit 08a09cba90f3d960c080a20833fb8c0908f1cea6.
+
+The fix was breaking builds with some toolchains.
+
+Signed-off-by: Christopher Larson <[email protected]>
+---
+ src/Makefile.am | 2 +-
+ src/cap-ng.c | 12 +++++++++++-
+ 2 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 5a66d4e..d46d02b 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -34,5 +34,5 @@ noinst_HEADERS = captab.h
+ libcap_ng_la_SOURCES = cap-ng.c lookup_table.c
+ libcap_ng_la_LIBADD =
+ libcap_ng_la_DEPENDENCIES = $(libcap_ng_la_SOURCES) ../config.h
+-libcap_ng_la_LDFLAGS = -Wl,-z,relro
++libcap_ng_la_LDFLAGS = -Wl,-z,relro -Wl,-z,nodelete
+
+diff --git a/src/cap-ng.c b/src/cap-ng.c
+index 35fcd7a..ed31afa 100644
+--- a/src/cap-ng.c
++++ b/src/cap-ng.c
+@@ -155,6 +155,15 @@ static __thread struct cap_ng m = { 1,
+ CAPNG_NEW,
+ {0, 0} };
+
++
++/*
++ * The pthread_atfork function is being made weak so that we can use it
++ * if the program is linked with pthreads and not requiring it for
++ * everything that uses libcap-ng.
++ */
++extern int __attribute__((weak)) pthread_atfork(void (*prepare)(void),
++ void (*parent)(void), void (*child)(void));
++
+ /*
+ * Reset the state so that init gets called to erase everything
+ */
+@@ -166,7 +175,8 @@ static void deinit(void)
+ static void init_lib(void) __attribute__ ((constructor));
+ static void init_lib(void)
+ {
+- pthread_atfork(NULL, NULL, deinit);
++ if (pthread_atfork)
++ pthread_atfork(NULL, NULL, deinit);
+ }
+
+ static void init(void)
--

2.11.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#8 lore raw

✗ patchtest: failure for "acpica: correct flex/bison dep..." and 2 more

In reply to Christopher Larson

== Series Details ==

Series: "acpica: correct flex/bison dep..." and 2 more
Revision: 1
URL : https://patchwork.openembedded.org/series/21349/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Issue Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format]

  Suggested fix    Add Upstream-Status: <Valid status> to the header of meta/recipes-support/libcap-ng/libcap-ng/revert-pthread_atfork-fix.patch
  Standard format  Upstream-Status: <Valid status>
  Valid status     Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe