* [Buildroot] [PATCH 1/2] Revert "package/libnss: fix build failure on RHEL 7" @ 2020-01-08 17:07 Giulio Benetti 2020-01-08 17:07 ` [Buildroot] [PATCH 2/2] package/libnss: fix build failure on RHEL 7 using -DLINUX Giulio Benetti 2020-01-08 22:01 ` [Buildroot] [PATCH 1/2] Revert "package/libnss: fix build failure on RHEL 7" Yann E. MORIN 0 siblings, 2 replies; 4+ messages in thread From: Giulio Benetti @ 2020-01-08 17:07 UTC (permalink / raw) To: buildroot After discussing upstream here: https://bugzilla.mozilla.org/show_bug.cgi?id=1603398 it turned out that my patch to fix the bug is wrong. The best way to fix it is to append -DLINUX to NATIVE_FLAGS in libnss.mk. Next patch is going to fix this. This reverts commit fe4b47a12181b89eecb9a8e324f1ad053147f948. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> --- ...-nsinstall.c-build-failure-on-RHEL-7.patch | 29 ------------------- 1 file changed, 29 deletions(-) delete mode 100644 package/libnss/0003-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch diff --git a/package/libnss/0003-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch b/package/libnss/0003-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch deleted file mode 100644 index 631d97d11f..0000000000 --- a/package/libnss/0003-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 1ba8516045bc8a13fd72e1a85206a04b29d96758 Mon Sep 17 00:00:00 2001 -From: Giulio Benetti <giulio.benetti@benettiengineering.com> -Date: Thu, 12 Dec 2019 12:57:29 +0100 -Subject: [PATCH] Bug 1603398 - Fix nsinstall.c build failure on RHEL 7 - -In Linux.mk -DLINUX and -Dlinux must be passed to DEFINES, not -OS_CFLAGS. - -Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> ---- - nss/coreconf/Linux.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk -index d07f8a3c5..4b45a6054 100644 ---- a/nss/coreconf/Linux.mk -+++ b/nss/coreconf/Linux.mk -@@ -132,7 +132,7 @@ endif - - OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR - ifeq ($(KERNEL),Linux) -- OS_CFLAGS += -DLINUX -Dlinux -+ DEFINES += -DLINUX -Dlinux - endif - OS_LIBS = $(OS_PTHREAD) -ldl -lc - --- -2.20.1 - -- 2.20.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] package/libnss: fix build failure on RHEL 7 using -DLINUX 2020-01-08 17:07 [Buildroot] [PATCH 1/2] Revert "package/libnss: fix build failure on RHEL 7" Giulio Benetti @ 2020-01-08 17:07 ` Giulio Benetti 2020-01-08 22:01 ` [Buildroot] [PATCH 1/2] Revert "package/libnss: fix build failure on RHEL 7" Yann E. MORIN 1 sibling, 0 replies; 4+ messages in thread From: Giulio Benetti @ 2020-01-08 17:07 UTC (permalink / raw) To: buildroot NSS Makefile emits -DLINUX to OS_CFLAGS only if OS_TEST=Linux when building for Target. But nsinstall.c is a host utility and it uses NATIVE_FLAGS instead of OS_CFLAGS, this is why -DLINUX is not emitted. This is necessary for the case one builds for Target OS Linux on a Host OS that is not Linux. So let's append -DLINUX to NATIVE_FLAGS after HOST_CFLAGS to make sure <getopt.h> is include, since in nsintall.c it is included only if LINUX macro is defined and this caused the build failure not finding getopt functions and macros in some build environment(i.e. RHEL 7). On other build environments getopt.h is indirectly included by unistd.h this is why it worked on them. Fixes: http://autobuild.buildroot.net/results/797/797f07ff757e7972d8c96b6a9f6abe68d17e0808/ Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> --- package/libnss/libnss.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/libnss/libnss.mk b/package/libnss/libnss.mk index 950c9850d3..61950ade25 100644 --- a/package/libnss/libnss.mk +++ b/package/libnss/libnss.mk @@ -68,7 +68,7 @@ define LIBNSS_BUILD_CMDS SOURCE_MD_DIR=$(@D)/$(LIBNSS_DISTDIR) \ DIST=$(@D)/$(LIBNSS_DISTDIR) \ CHECKLOC= \ - $(LIBNSS_BUILD_VARS) NATIVE_FLAGS="$(HOST_CFLAGS)" + $(LIBNSS_BUILD_VARS) NATIVE_FLAGS="$(HOST_CFLAGS) -DLINUX" endef define LIBNSS_INSTALL_STAGING_CMDS -- 2.20.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/2] Revert "package/libnss: fix build failure on RHEL 7" 2020-01-08 17:07 [Buildroot] [PATCH 1/2] Revert "package/libnss: fix build failure on RHEL 7" Giulio Benetti 2020-01-08 17:07 ` [Buildroot] [PATCH 2/2] package/libnss: fix build failure on RHEL 7 using -DLINUX Giulio Benetti @ 2020-01-08 22:01 ` Yann E. MORIN 2020-01-09 13:58 ` Giulio Benetti 1 sibling, 1 reply; 4+ messages in thread From: Yann E. MORIN @ 2020-01-08 22:01 UTC (permalink / raw) To: buildroot Giulio, All, On 2020-01-08 18:07 +0100, Giulio Benetti spake thusly: > After discussing upstream here: > https://bugzilla.mozilla.org/show_bug.cgi?id=1603398 > it turned out that my patch to fix the bug is wrong. The best way to fix > it is to append -DLINUX to NATIVE_FLAGS in libnss.mk. Next patch is > going to fix this. > > This reverts commit fe4b47a12181b89eecb9a8e324f1ad053147f948. > > Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> I've applied both to master, but as a single commit. Indeed, this comit removing a patch that fixes a build failure, so all alone, it breaks the build again. And in case the second patch is not applied, the build stays broken. and indeed, the two are in fact a single semantic patch: revert a change that upstream deemed incorrect, and aply a fix that upstream suggested as a replqacement for the incorrect patch. So, I merged both commit in a single one, adapted the commit log, and pushed. Thanks! Regards, Yann E. MORIN. > --- > ...-nsinstall.c-build-failure-on-RHEL-7.patch | 29 ------------------- > 1 file changed, 29 deletions(-) > delete mode 100644 package/libnss/0003-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch > > diff --git a/package/libnss/0003-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch b/package/libnss/0003-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch > deleted file mode 100644 > index 631d97d11f..0000000000 > --- a/package/libnss/0003-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch > +++ /dev/null > @@ -1,29 +0,0 @@ > -From 1ba8516045bc8a13fd72e1a85206a04b29d96758 Mon Sep 17 00:00:00 2001 > -From: Giulio Benetti <giulio.benetti@benettiengineering.com> > -Date: Thu, 12 Dec 2019 12:57:29 +0100 > -Subject: [PATCH] Bug 1603398 - Fix nsinstall.c build failure on RHEL 7 > - > -In Linux.mk -DLINUX and -Dlinux must be passed to DEFINES, not > -OS_CFLAGS. > - > -Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> > ---- > - nss/coreconf/Linux.mk | 2 +- > - 1 file changed, 1 insertion(+), 1 deletion(-) > - > -diff --git a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk > -index d07f8a3c5..4b45a6054 100644 > ---- a/nss/coreconf/Linux.mk > -+++ b/nss/coreconf/Linux.mk > -@@ -132,7 +132,7 @@ endif > - > - OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR > - ifeq ($(KERNEL),Linux) > -- OS_CFLAGS += -DLINUX -Dlinux > -+ DEFINES += -DLINUX -Dlinux > - endif > - OS_LIBS = $(OS_PTHREAD) -ldl -lc > - > --- > -2.20.1 > - > -- > 2.20.1 > > _______________________________________________ > buildroot mailing list > buildroot at busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/2] Revert "package/libnss: fix build failure on RHEL 7" 2020-01-08 22:01 ` [Buildroot] [PATCH 1/2] Revert "package/libnss: fix build failure on RHEL 7" Yann E. MORIN @ 2020-01-09 13:58 ` Giulio Benetti 0 siblings, 0 replies; 4+ messages in thread From: Giulio Benetti @ 2020-01-09 13:58 UTC (permalink / raw) To: buildroot On 1/8/20 11:01 PM, Yann E. MORIN wrote: > Giulio, All, > > On 2020-01-08 18:07 +0100, Giulio Benetti spake thusly: >> After discussing upstream here: >> https://bugzilla.mozilla.org/show_bug.cgi?id=1603398 >> it turned out that my patch to fix the bug is wrong. The best way to fix >> it is to append -DLINUX to NATIVE_FLAGS in libnss.mk. Next patch is >> going to fix this. >> >> This reverts commit fe4b47a12181b89eecb9a8e324f1ad053147f948. >> >> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> > > I've applied both to master, but as a single commit. > > Indeed, this comit removing a patch that fixes a build failure, so all > alone, it breaks the build again. > > And in case the second patch is not applied, the build stays broken. > > and indeed, the two are in fact a single semantic patch: revert a change > that upstream deemed incorrect, and aply a fix that upstream suggested > as a replqacement for the incorrect patch. > > So, I merged both commit in a single one, adapted the commit log, and > pushed. Thanks! I've missed bisection, thank you for fixing it. -- Giulio Benetti Benetti Engineering sas > Regards, > Yann E. MORIN. > >> --- >> ...-nsinstall.c-build-failure-on-RHEL-7.patch | 29 ------------------- >> 1 file changed, 29 deletions(-) >> delete mode 100644 package/libnss/0003-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch >> >> diff --git a/package/libnss/0003-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch b/package/libnss/0003-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch >> deleted file mode 100644 >> index 631d97d11f..0000000000 >> --- a/package/libnss/0003-Bug-1603398-Fix-nsinstall.c-build-failure-on-RHEL-7.patch >> +++ /dev/null >> @@ -1,29 +0,0 @@ >> -From 1ba8516045bc8a13fd72e1a85206a04b29d96758 Mon Sep 17 00:00:00 2001 >> -From: Giulio Benetti <giulio.benetti@benettiengineering.com> >> -Date: Thu, 12 Dec 2019 12:57:29 +0100 >> -Subject: [PATCH] Bug 1603398 - Fix nsinstall.c build failure on RHEL 7 >> - >> -In Linux.mk -DLINUX and -Dlinux must be passed to DEFINES, not >> -OS_CFLAGS. >> - >> -Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> >> ---- >> - nss/coreconf/Linux.mk | 2 +- >> - 1 file changed, 1 insertion(+), 1 deletion(-) >> - >> -diff --git a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk >> -index d07f8a3c5..4b45a6054 100644 >> ---- a/nss/coreconf/Linux.mk >> -+++ b/nss/coreconf/Linux.mk >> -@@ -132,7 +132,7 @@ endif >> - >> - OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) $(ARCHFLAG) -pipe -ffunction-sections -fdata-sections -DHAVE_STRERROR >> - ifeq ($(KERNEL),Linux) >> -- OS_CFLAGS += -DLINUX -Dlinux >> -+ DEFINES += -DLINUX -Dlinux >> - endif >> - OS_LIBS = $(OS_PTHREAD) -ldl -lc >> - >> --- >> -2.20.1 >> - >> -- >> 2.20.1 >> >> _______________________________________________ >> buildroot mailing list >> buildroot at busybox.net >> http://lists.busybox.net/mailman/listinfo/buildroot > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-09 13:58 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-01-08 17:07 [Buildroot] [PATCH 1/2] Revert "package/libnss: fix build failure on RHEL 7" Giulio Benetti 2020-01-08 17:07 ` [Buildroot] [PATCH 2/2] package/libnss: fix build failure on RHEL 7 using -DLINUX Giulio Benetti 2020-01-08 22:01 ` [Buildroot] [PATCH 1/2] Revert "package/libnss: fix build failure on RHEL 7" Yann E. MORIN 2020-01-09 13:58 ` Giulio Benetti
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.