Skip to contentSkip to conversation

package/bird: fix build with autoconf >= 2.70

PATCH In review Fabrice Fontaine 4 participants 7 messages Nov 5, 2021 – Aug 18, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/bird: fix build with autoconf >= 2.70

Fix the following build failure raised since bump of autoconf to version 2.71 in commit ecd54b65c1f998a7ccd91f7c523e4ff38c4781da:

checking for glob.h... no
configure: error: glob.h not found.

Fixes:
- http://autobuild.buildroot.org/results/d7aab7df196e0f6d6389b87ff29da7c2971e6b6d

---
 ...gure.ac-fix-build-with-autoconf-2.70.patch | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch
package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +43 -0
new file mode 100644
index 0000000000..b412a55ead
@@ -0,0 +1,43 @@
+From aa5bc6d2e59c5257d777a45ee4a0e0a784c44244 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Fri, 5 Nov 2021 20:58:41 +0100
+Subject: [PATCH] configure.ac: fix build with autoconf >= 2.70
+
+On some embedded toolchains, glob.h detection fails because -g is
+wrongly added (even when CFLAGS is overwritten):
+
+configure:5881: checking for glob.h
+configure:5904: /home/giuliobenetti/autobuild/run/instance-2/output-1/host/bin/mips64el-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -pthread -fno-strict-aliasing -fno-strict-overflow -flto -Wall -Wextra -Wstrict-prototypes -Wno-parentheses -Wno-pointer-sign -Wno-missing-field-initializers -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -pthread -flto=4 -g conftest.c  >&5
+/home/giuliobenetti/autobuild/run/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: /tmp/ccldlED9.ltrans0.ltrans.o:(.debug_info+0x2a): undefined reference to `conftest.c.fb729d13'
+/home/giuliobenetti/autobuild/run/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: /tmp/ccldlED9.ltrans0.ltrans.o:(.debug_info+0x2f): undefined reference to `conftest.c.fb729d13'
+
+This build failure is raised since autoconf 2.70 and
+https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=76754e04fce5f6a7701bec57b057020585df2ae3
+because ac_test_CFLAGS is now set to ${CFLAGS+y} instead of
+${CFLAGS+set}
+
+Fixes:
+ - http://autobuild.buildroot.org/results/d7aab7df196e0f6d6389b87ff29da7c2971e6b6d
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status: sent to [email protected]]
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 64181d29..b4b3fcfb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -114,7 +114,7 @@ AC_SEARCH_LIBS([clock_gettime], [rt posix4],
+ AC_CANONICAL_HOST
+ 
+ # Store this value because ac_test_CFLAGS is overwritten by AC_PROG_CC
+-if test "$ac_test_CFLAGS" != set ; then
++if ! test $ac_test_CFLAGS ; then
+   bird_cflags_default=yes
+ fi
+ 
+-- 
+2.33.0
+
Signature · 6 lines
2.33.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 34 lines · Fabrice Fontaine

Fix the following build failure raised since bump of autoconf to version 2.71 in commit ecd54b65c1f998a7ccd91f7c523e4ff38c4781da:

checking for glob.h... no
configure: error: glob.h not found.

Fixes:
- http://autobuild.buildroot.org/results/d7aab7df196e0f6d6389b87ff29da7c2971e6b6d

---
  ...gure.ac-fix-build-with-autoconf-2.70.patch | 43 +++++++++++++++++++
  1 file changed, 43 insertions(+)

create mode 100644 package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch

package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +13 -0
new file mode 100644
index 0000000000..b412a55ead
@@ -0,0 +1,43 @@
+From aa5bc6d2e59c5257d777a45ee4a0e0a784c44244 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Fri, 5 Nov 2021 20:58:41 +0100
+Subject: [PATCH] configure.ac: fix build with autoconf >= 2.70
+
+On some embedded toolchains, glob.h detection fails because -g is
+wrongly added (even when CFLAGS is overwritten):
+
+configure:5881: checking for glob.h
+configure:5904: /home/giuliobenetti/autobuild/run/instance-2/output-1/host/bin/mips64el-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -pthread -fno-strict-aliasing -fno-strict-overflow -flto -Wall -Wextra -Wstrict-prototypes -Wno-parentheses -Wno-pointer-sign -Wno-missing-field-initializers -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -pthread -flto=4 -g conftest.c  >&5
+/home/giuliobenetti/autobuild/run/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: /tmp/ccldlED9.ltrans0.ltrans.o:(.debug_info+0x2a): undefined reference to `conftest.c.fb729d13'
+/home/giuliobenetti/autobuild/run/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: /tmp/ccldlED9.ltrans0.ltrans.o:(.debug_info+0x2f): undefined reference to `conftest.c.fb729d13'
+

package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch line 23

Quoted 10 lines
package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +10 -0
+This build failure is raised since autoconf 2.70 and
+https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=76754e04fce5f6a7701bec57b057020585df2ae3
+because ac_test_CFLAGS is now set to ${CFLAGS+y} instead of
+${CFLAGS+set}
+
+Fixes:
+ - http://autobuild.buildroot.org/results/d7aab7df196e0f6d6389b87ff29da7c2971e6b6d
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status: sent to [email protected]]

Why not create an MR? You can log in to their gitlab with a github account
(funny that you can't log in with a gitlab.com account...)

Quoted 4 lines
package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +4 -0
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+

package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch line 37

Quoted 10 lines
package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +10 -0
+diff --git a/configure.ac b/configure.ac
+index 64181d29..b4b3fcfb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -114,7 +114,7 @@ AC_SEARCH_LIBS([clock_gettime], [rt posix4],
+ AC_CANONICAL_HOST
+
+ # Store this value because ac_test_CFLAGS is overwritten by AC_PROG_CC
+-if test "$ac_test_CFLAGS" != set ; then
++if ! test $ac_test_CFLAGS ; then

Wouldn't it be more future-safe to put quotes around $ac_test_CFLAGS?

Regards,
Arnout

package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch line 43

Quoted 7 lines
package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +6 -0
+   bird_cflags_default=yes
+ fi
+
+--
+2.33.0
+

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
Quoted 43 lines · Arnout Vandecappelle
Quoted 39 lines · Fabrice Fontaine

Fix the following build failure raised since bump of autoconf to version 2.71 in commit ecd54b65c1f998a7ccd91f7c523e4ff38c4781da:

checking for glob.h... no
configure: error: glob.h not found.

Fixes:
- http://autobuild.buildroot.org/results/d7aab7df196e0f6d6389b87ff29da7c2971e6b6d

---
  ...gure.ac-fix-build-with-autoconf-2.70.patch | 43 +++++++++++++++++++
  1 file changed, 43 insertions(+)

create mode 100644 package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch

package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +18 -0
new file mode 100644
index 0000000000..b412a55ead
@@ -0,0 +1,43 @@
+From aa5bc6d2e59c5257d777a45ee4a0e0a784c44244 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Fri, 5 Nov 2021 20:58:41 +0100
+Subject: [PATCH] configure.ac: fix build with autoconf >= 2.70
+
+On some embedded toolchains, glob.h detection fails because -g is
+wrongly added (even when CFLAGS is overwritten):
+
+configure:5881: checking for glob.h
+configure:5904: /home/giuliobenetti/autobuild/run/instance-2/output-1/host/bin/mips64el-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -pthread -fno-strict-aliasing -fno-strict-overflow -flto -Wall -Wextra -Wstrict-prototypes -Wno-parentheses -Wno-pointer-sign -Wno-missing-field-initializers -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -pthread -flto=4 -g conftest.c  >&5
+/home/giuliobenetti/autobuild/run/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: /tmp/ccldlED9.ltrans0.ltrans.o:(.debug_info+0x2a): undefined reference to `conftest.c.fb729d13'
+/home/giuliobenetti/autobuild/run/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: /tmp/ccldlED9.ltrans0.ltrans.o:(.debug_info+0x2f): undefined reference to `conftest.c.fb729d13'
+
+This build failure is raised since autoconf 2.70 and
+https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=76754e04fce5f6a7701bec57b057020585df2ae3
+because ac_test_CFLAGS is now set to ${CFLAGS+y} instead of
+${CFLAGS+set}
+
Quoted 8 lines

package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch line 23

Quoted 5 lines
package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +5 -0
+Fixes:
+ - http://autobuild.buildroot.org/results/d7aab7df196e0f6d6389b87ff29da7c2971e6b6d
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status: sent to [email protected]]

Why not create an MR? You can log in to their gitlab with a github account
(funny that you can't log in with a gitlab.com account...)

I was able to log in with my github account but then I couldn't fork the project (project limit reached ...). Opening an issue is not possible either. So I sent in by email.

Quoted 17 lines
Quoted 5 lines
package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +4 -0
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+

package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch line 37

Quoted 10 lines
package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +10 -0
+diff --git a/configure.ac b/configure.ac
+index 64181d29..b4b3fcfb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -114,7 +114,7 @@ AC_SEARCH_LIBS([clock_gettime], [rt posix4],
+ AC_CANONICAL_HOST
+
+ # Store this value because ac_test_CFLAGS is overwritten by AC_PROG_CC
+-if test "$ac_test_CFLAGS" != set ; then
++if ! test $ac_test_CFLAGS ; then

Wouldn't it be more future-safe to put quotes around $ac_test_CFLAGS?

Why not, I just copy/pasted the change made by autoconf lib/autoconf/c.m4:

-if test "$ac_test_CXXFLAGS" = set; then
+if test $ac_test_CXXFLAGS; then

Quoted 11 lines

Regards,
Arnout

package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch line 43

Quoted 7 lines
package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +6 -0
+   bird_cflags_default=yes
+ fi
+
+--
+2.33.0
+

Best Regards,

Fabrice
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
In reply to Fabrice Fontaine

Hello Fabrice,

package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch line 7

Quoted 9 lines · On Fri, 5 Nov 2021 21:12:57 +0100 Fabrice Fontaine…

+++ b/package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch

package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +7 -0
@@ -0,0 +1,43 @@
+From aa5bc6d2e59c5257d777a45ee4a0e0a784c44244 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Fri, 5 Nov 2021 20:58:41 +0100
+Subject: [PATCH] configure.ac: fix build with autoconf >= 2.70
+
+On some embedded toolchains, glob.h detection fails because -g is
+wrongly added (even when CFLAGS is overwritten):

I fail to understand why adding -g would cause that build failure. There is already -g0 in the command line, then -g, which enables debugging symbols, this shouldn't cause any build failure.

Perhaps the issue is more related to the addition of -flto=4, which enables link-time optimization?

But even then, I don't quite understand this ac_test_CFLAGS stuff. Do you understand why their configure.ac script is doing:

# Store this value because ac_test_CFLAGS is overwritten by AC_PROG_CC if test "$ac_test_CFLAGS" != set ; then
bird_cflags_default=yes
fi

in the first place?

Could you help me connect the dots here ?

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw
Quoted 10 lines · On Tue, 28 Dec 2021 15:20:59 +0100 Thomas Petazzoni…

I fail to understand why adding -g would cause that build failure. There is already -g0 in the command line, then -g, which enables debugging symbols, this shouldn't cause any build failure.

Perhaps the issue is more related to the addition of -flto=4, which enables link-time optimization?

But even then, I don't quite understand this ac_test_CFLAGS stuff. Do you understand why their configure.ac script is doing:

Quoted 8 lines

# Store this value because ac_test_CFLAGS is overwritten by AC_PROG_CC if test "$ac_test_CFLAGS" != set ; then
bird_cflags_default=yes
fi

in the first place?

Could you help me connect the dots here ?

Also, I thought we had already fixed this issue with
https://git.buildroot.org/buildroot/commit/package/bird?id=03c148c8dec4e8c3fa13fcde4a730b3ab97f3f10 ?

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw
In reply to Fabrice Fontaine
Quoted 23 lines · Fabrice Fontaine

Fix the following build failure raised since bump of autoconf to version 2.71 in commit ecd54b65c1f998a7ccd91f7c523e4ff38c4781da:

checking for glob.h... no
configure: error: glob.h not found.

Fixes:
- http://autobuild.buildroot.org/results/d7aab7df196e0f6d6389b87ff29da7c2971e6b6d

---
  ...gure.ac-fix-build-with-autoconf-2.70.patch | 43 +++++++++++++++++++
  1 file changed, 43 insertions(+)

create mode 100644 package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch

package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +2 -0
new file mode 100644
index 0000000000..b412a55ead
@@ -0,0 +1,43 @@
+From aa5bc6d2e59c5257d777a45ee4a0e0a784c44244 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>

package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch line 12

Quoted 10 lines
package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +10 -0
+Date: Fri, 5 Nov 2021 20:58:41 +0100
+Subject: [PATCH] configure.ac: fix build with autoconf >= 2.70
+
+On some embedded toolchains, glob.h detection fails because -g is
+wrongly added (even when CFLAGS is overwritten):
+
+configure:5881: checking for glob.h
+configure:5904: /home/giuliobenetti/autobuild/run/instance-2/output-1/host/bin/mips64el-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -pthread -fno-strict-aliasing -fno-strict-overflow -flto -Wall -Wextra -Wstrict-prototypes -Wno-parentheses -Wno-pointer-sign -Wno-missing-field-initializers -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -pthread -flto=4 -g conftest.c  >&5
+/home/giuliobenetti/autobuild/run/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: /tmp/ccldlED9.ltrans0.ltrans.o:(.debug_info+0x2a): undefined reference to `conftest.c.fb729d13'
+/home/giuliobenetti/autobuild/run/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld: /tmp/ccldlED9.ltrans0.ltrans.o:(.debug_info+0x2f): undefined reference to `conftest.c.fb729d13'

Since this is involving functions that are generated by LTO, I think it's more
likely that the issue is triggered by the -flto=4 rather than the -g.

Also, I saw that it only occurs on GCC8, not on any of the other myriad GCC
versions that we run in the autobuilders. So it's clearly a compiler bug.

Regardless, this patch does fix it, so I applied to master, thanks. I largely
rewrote the commit message (both of the patch and the buildroot commit) and I added the quotes that I suggested earlier. I've also added a comment in the .mk file to explain the AUTORECONF (just pointing to the patch since the earlier reason is no longer valid).

Perhaps you could do another attempt to send the patch upstream?

Regards,
Arnout

Quoted 21 lines
package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +21 -0
+
+This build failure is raised since autoconf 2.70 and
+https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=76754e04fce5f6a7701bec57b057020585df2ae3
+because ac_test_CFLAGS is now set to ${CFLAGS+y} instead of
+${CFLAGS+set}
+
+Fixes:
+ - http://autobuild.buildroot.org/results/d7aab7df196e0f6d6389b87ff29da7c2971e6b6d
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Upstream status: sent to [email protected]]
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 64181d29..b4b3fcfb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -114,7 +114,7 @@ AC_SEARCH_LIBS([clock_gettime], [rt posix4],
+ AC_CANONICAL_HOST

package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch line 43

Quoted 10 lines
package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +10 -0
+
+ # Store this value because ac_test_CFLAGS is overwritten by AC_PROG_CC
+-if test "$ac_test_CFLAGS" != set ; then
++if ! test $ac_test_CFLAGS ; then
+   bird_cflags_default=yes
+ fi
+
+--
+2.33.0
+

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#6 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle <[email protected]> writes:

Hi,

Quoted 52 lines · Fabrice Fontaine
Quoted 37 lines

Fix the following build failure raised since bump of autoconf to version 2.71 in commit ecd54b65c1f998a7ccd91f7c523e4ff38c4781da:
checking for glob.h... no
configure: error: glob.h not found.
Fixes:
- http://autobuild.buildroot.org/results/d7aab7df196e0f6d6389b87ff29da7c2971e6b6d

---
...gure.ac-fix-build-with-autoconf-2.70.patch | 43 +++++++++++++++++++

1 file changed, 43 insertions(+)

create mode 100644 package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch diff --git a/package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch b/package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file mode 100644
index 0000000000..b412a55ead

package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +10 -0
@@ -0,0 +1,43 @@
+From aa5bc6d2e59c5257d777a45ee4a0e0a784c44244 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Fri, 5 Nov 2021 20:58:41 +0100
+Subject: [PATCH] configure.ac: fix build with autoconf >= 2.70
+
+On some embedded toolchains, glob.h detection fails because -g is
+wrongly added (even when CFLAGS is overwritten):
+
+configure:5881: checking for glob.h
+configure:5904:

/home/giuliobenetti/autobuild/run/instance-2/output-1/host/bin/mips64el-linux-gcc

package/bird/0001-configure.ac-fix-build-with-autoconf-2.70.patch new file +1 -6
-o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -Os -g0 -pthread -fno-strict-aliasing
-fno-strict-overflow -flto -Wall -Wextra -Wstrict-prototypes
-Wno-parentheses -Wno-pointer-sign -Wno-missing-field-initializers
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-pthread -flto=4 -g conftest.c >&5
+/home/giuliobenetti/autobuild/run/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld:
Quoted 5 lines

/tmp/ccldlED9.ltrans0.ltrans.o:(.debug_info+0x2a): undefined
reference to `conftest.c.fb729d13' +/home/giuliobenetti/autobuild/run/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/mips64el-buildroot-linux-uclibc/8.4.0/../../../../mips64el-buildroot-linux-uclibc/bin/ld:
/tmp/ccldlED9.ltrans0.ltrans.o:(.debug_info+0x2f): undefined
reference to `conftest.c.fb729d13'

Since this is involving functions that are generated by LTO, I think it's more likely that the issue is triggered by the -flto=4 rather
than the -g.

Also, I saw that it only occurs on GCC8, not on any of the other myriad GCC versions that we run in the autobuilders. So it's clearly
a compiler bug.

Quoted 8 lines

Regardless, this patch does fix it, so I applied to master, thanks. I largely rewrote the commit message (both of the patch and the
buildroot commit) and I added the quotes that I suggested earlier. I've also added a comment in the .mk file to explain the AUTORECONF (just pointing to the patch since the earlier reason is no longer valid).

Perhaps you could do another attempt to send the patch upstream?

Committed to 2022.05.x and 2022.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot