* [Buildroot] [PATCH 1/1] package/mpir: fix build errors
@ 2025-10-26 9:02 Bernd Kuhls
2026-02-02 18:11 ` Thomas Petazzoni via buildroot
2026-02-13 19:37 ` Thomas Perale via buildroot
0 siblings, 2 replies; 3+ messages in thread
From: Bernd Kuhls @ 2025-10-26 9:02 UTC (permalink / raw)
To: buildroot; +Cc: Semyon Kolganov
Added upstream patch to fix configure with gcc-14.
Updated project URL and _SITE due to previous site not being available
anymore: https://github.com/wbhart/mpir/pull/298
The github helper could not be used, for details see
https://patchwork.ozlabs.org/project/buildroot/patch/20250203-repair_mpir-v1-1-db848d68b586@bootlin.com/
In contrast this commit does not bump the package version.
Removed doc build which fails due to missing automake.
Fixes:
https://autobuild.buildroot.net/results/d14/d144ec967b7db34de56eaf34bb436460b8c924ed/
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
.../mpir/0003-fix-configure-with-gcc-14.patch | 32 +++++++++++++++++++
package/mpir/Config.in | 2 +-
package/mpir/mpir.hash | 2 +-
package/mpir/mpir.mk | 13 ++++++--
4 files changed, 45 insertions(+), 4 deletions(-)
create mode 100644 package/mpir/0003-fix-configure-with-gcc-14.patch
diff --git a/package/mpir/0003-fix-configure-with-gcc-14.patch b/package/mpir/0003-fix-configure-with-gcc-14.patch
new file mode 100644
index 0000000000..d3d490750b
--- /dev/null
+++ b/package/mpir/0003-fix-configure-with-gcc-14.patch
@@ -0,0 +1,32 @@
+From 4ff3b770cbf86e29b75d12c13e8b854c74bccc5a Mon Sep 17 00:00:00 2001
+From: Reno Dakota <paparodeo@proton.me>
+Date: Wed, 4 Dec 2024 23:09:03 +0000
+Subject: [PATCH] fix configure with gcc-14
+
+move function definition above caller to fix compile error
+
+> configure:6438: gcc -m64 conftest.c >&5
+> conftest.c: In function 'f':
+> conftest.c:13:44: error: implicit declaration of function 'h' [-Wimplicit-function-declaration]
+
+Upstream: https://github.com/wbhart/mpir/commit/4ff3b770cbf86e29b75d12c13e8b854c74bccc5a
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ acinclude.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 620a629ef..cd917567f 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -590,8 +590,8 @@ extern
+ __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
+ {t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
+ void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
+-for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
+ void h(){} void g(){}
++for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
+ #else
+ int dummy;
+ #endif
diff --git a/package/mpir/Config.in b/package/mpir/Config.in
index da4cc9f44e..b22350b23b 100644
--- a/package/mpir/Config.in
+++ b/package/mpir/Config.in
@@ -5,4 +5,4 @@ config BR2_PACKAGE_MPIR
MPIR is a highly optimised library for bignum arithmetic
forked from the GMP bignum library.
- http://www.mpir.org/
+ https://github.com/wbhart/mpir
diff --git a/package/mpir/mpir.hash b/package/mpir/mpir.hash
index 71d0c19d12..3b1b3e877d 100644
--- a/package/mpir/mpir.hash
+++ b/package/mpir/mpir.hash
@@ -1,3 +1,3 @@
# Locally calculated
-sha256 52f63459cf3f9478859de29e00357f004050ead70b45913f2c2269d9708675bb mpir-3.0.0.tar.bz2
+sha256 86a5039badc3e6738219a262873a1db5513405e15ece9527b718fcd0fac09bb2 mpir-3.0.0.tar.gz
sha256 9ccf26cfe845e0eb8bb58053e47366e7ab6b697ae010f7650978d4b71b7d1fc1 COPYING.LIB
diff --git a/package/mpir/mpir.mk b/package/mpir/mpir.mk
index 46cd35e436..eab5233865 100644
--- a/package/mpir/mpir.mk
+++ b/package/mpir/mpir.mk
@@ -5,15 +5,24 @@
################################################################################
MPIR_VERSION = 3.0.0
-MPIR_SITE = http://www.mpir.org
-MPIR_SOURCE = mpir-$(MPIR_VERSION).tar.bz2
+MPIR_SITE = https://github.com/wbhart/mpir/archive/refs/tags
MPIR_LICENSE = LGPL-3.0+
MPIR_LICENSE_FILES = COPYING.LIB
MPIR_INSTALL_STAGING = YES
MPIR_DEPENDENCIES = gmp host-yasm
# 0002-Fix-configure-failures-with-Xcode12.patch
+# 0003-fix-configure-with-gcc-14.patch
MPIR_AUTORECONF = YES
+# mpir tries to build/install .info doc even if makeinfo isn't installed
+# on the host, so we have to disable global doc installation to prevent
+# autobuild errors.
+define MPIR_DISABLE_DOC_INSTALL
+ $(SED) 's/SUBDIRS += mpn fft mpz mpq mpf printf scanf cxx tune doc/SUBDIRS += mpn fft mpz mpq mpf printf scanf cxx tune/' \
+ $(@D)/Makefile.am
+endef
+MPIR_POST_PATCH_HOOKS += MPIR_DISABLE_DOC_INSTALL
+
ifeq ($(BR2_MIPS_NABI32),y)
MPIR_CONF_OPTS += ABI=n32
endif
--
2.47.3
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/mpir: fix build errors
2025-10-26 9:02 [Buildroot] [PATCH 1/1] package/mpir: fix build errors Bernd Kuhls
@ 2026-02-02 18:11 ` Thomas Petazzoni via buildroot
2026-02-13 19:37 ` Thomas Perale via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-02-02 18:11 UTC (permalink / raw)
To: Bernd Kuhls; +Cc: buildroot, Semyon Kolganov
Hello,
On Sun, Oct 26, 2025 at 10:02:21AM +0100, Bernd Kuhls wrote:
> Added upstream patch to fix configure with gcc-14.
This should have been one commit.
> Updated project URL and _SITE due to previous site not being available
> anymore: https://github.com/wbhart/mpir/pull/298
And this should have been another commit, as it's unrelated.
So I've split into two commits.
> The github helper could not be used, for details see
> https://patchwork.ozlabs.org/project/buildroot/patch/20250203-repair_mpir-v1-1-db848d68b586@bootlin.com/
> In contrast this commit does not bump the package version.
This is not what the comment was saying, and in fact using the github
helper works just fine, so I've used that. The trick is that the old
tarball was .tar.bz2 while the new one from github is .tar.gz, so
there is no conflict.
> +# mpir tries to build/install .info doc even if makeinfo isn't installed
> +# on the host, so we have to disable global doc installation to prevent
> +# autobuild errors.
> +define MPIR_DISABLE_DOC_INSTALL
> + $(SED) 's/SUBDIRS += mpn fft mpz mpq mpf printf scanf cxx tune doc/SUBDIRS += mpn fft mpz mpq mpf printf scanf cxx tune/' \
> + $(@D)/Makefile.am
> +endef
> +MPIR_POST_PATCH_HOOKS += MPIR_DISABLE_DOC_INSTALL
This was quite complicated, so I simplified to:
+# We don't care about the documentation
+MPIR_CONF_ENV = MAKEINFO=true
which is the approach we use in a number of packages already when
makeinfo gets annoying.
So, applied your change after splitting into two commits, and doing
various improvements along the way.
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/mpir: fix build errors
2025-10-26 9:02 [Buildroot] [PATCH 1/1] package/mpir: fix build errors Bernd Kuhls
2026-02-02 18:11 ` Thomas Petazzoni via buildroot
@ 2026-02-13 19:37 ` Thomas Perale via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Perale via buildroot @ 2026-02-13 19:37 UTC (permalink / raw)
To: Bernd Kuhls; +Cc: Thomas Perale, buildroot
In reply of:
> Added upstream patch to fix configure with gcc-14.
>
> Updated project URL and _SITE due to previous site not being available
> anymore: https://github.com/wbhart/mpir/pull/298
>
> The github helper could not be used, for details see
> https://patchwork.ozlabs.org/project/buildroot/patch/20250203-repair_mpir-v1-1-db848d68b586@bootlin.com/
> In contrast this commit does not bump the package version.
>
> Removed doc build which fails due to missing automake.
>
> Fixes:
> https://autobuild.buildroot.net/results/d14/d144ec967b7db34de56eaf34bb436460b8c924ed/
>
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Applied to 2025.02.x & 2025.11.x. Thanks
> ---
> .../mpir/0003-fix-configure-with-gcc-14.patch | 32 +++++++++++++++++++
> package/mpir/Config.in | 2 +-
> package/mpir/mpir.hash | 2 +-
> package/mpir/mpir.mk | 13 ++++++--
> 4 files changed, 45 insertions(+), 4 deletions(-)
> create mode 100644 package/mpir/0003-fix-configure-with-gcc-14.patch
>
> diff --git a/package/mpir/0003-fix-configure-with-gcc-14.patch b/package/mpir/0003-fix-configure-with-gcc-14.patch
> new file mode 100644
> index 0000000000..d3d490750b
> --- /dev/null
> +++ b/package/mpir/0003-fix-configure-with-gcc-14.patch
> @@ -0,0 +1,32 @@
> +From 4ff3b770cbf86e29b75d12c13e8b854c74bccc5a Mon Sep 17 00:00:00 2001
> +From: Reno Dakota <paparodeo@proton.me>
> +Date: Wed, 4 Dec 2024 23:09:03 +0000
> +Subject: [PATCH] fix configure with gcc-14
> +
> +move function definition above caller to fix compile error
> +
> +> configure:6438: gcc -m64 conftest.c >&5
> +> conftest.c: In function 'f':
> +> conftest.c:13:44: error: implicit declaration of function 'h' [-Wimplicit-function-declaration]
> +
> +Upstream: https://github.com/wbhart/mpir/commit/4ff3b770cbf86e29b75d12c13e8b854c74bccc5a
> +
> +Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> +---
> + acinclude.m4 | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/acinclude.m4 b/acinclude.m4
> +index 620a629ef..cd917567f 100644
> +--- a/acinclude.m4
> ++++ b/acinclude.m4
> +@@ -590,8 +590,8 @@ extern
> + __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
> + {t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
> + void f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
> +-for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
> + void h(){} void g(){}
> ++for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
> + #else
> + int dummy;
> + #endif
> diff --git a/package/mpir/Config.in b/package/mpir/Config.in
> index da4cc9f44e..b22350b23b 100644
> --- a/package/mpir/Config.in
> +++ b/package/mpir/Config.in
> @@ -5,4 +5,4 @@ config BR2_PACKAGE_MPIR
> MPIR is a highly optimised library for bignum arithmetic
> forked from the GMP bignum library.
>
> - http://www.mpir.org/
> + https://github.com/wbhart/mpir
> diff --git a/package/mpir/mpir.hash b/package/mpir/mpir.hash
> index 71d0c19d12..3b1b3e877d 100644
> --- a/package/mpir/mpir.hash
> +++ b/package/mpir/mpir.hash
> @@ -1,3 +1,3 @@
> # Locally calculated
> -sha256 52f63459cf3f9478859de29e00357f004050ead70b45913f2c2269d9708675bb mpir-3.0.0.tar.bz2
> +sha256 86a5039badc3e6738219a262873a1db5513405e15ece9527b718fcd0fac09bb2 mpir-3.0.0.tar.gz
> sha256 9ccf26cfe845e0eb8bb58053e47366e7ab6b697ae010f7650978d4b71b7d1fc1 COPYING.LIB
> diff --git a/package/mpir/mpir.mk b/package/mpir/mpir.mk
> index 46cd35e436..eab5233865 100644
> --- a/package/mpir/mpir.mk
> +++ b/package/mpir/mpir.mk
> @@ -5,15 +5,24 @@
> ################################################################################
>
> MPIR_VERSION = 3.0.0
> -MPIR_SITE = http://www.mpir.org
> -MPIR_SOURCE = mpir-$(MPIR_VERSION).tar.bz2
> +MPIR_SITE = https://github.com/wbhart/mpir/archive/refs/tags
> MPIR_LICENSE = LGPL-3.0+
> MPIR_LICENSE_FILES = COPYING.LIB
> MPIR_INSTALL_STAGING = YES
> MPIR_DEPENDENCIES = gmp host-yasm
> # 0002-Fix-configure-failures-with-Xcode12.patch
> +# 0003-fix-configure-with-gcc-14.patch
> MPIR_AUTORECONF = YES
>
> +# mpir tries to build/install .info doc even if makeinfo isn't installed
> +# on the host, so we have to disable global doc installation to prevent
> +# autobuild errors.
> +define MPIR_DISABLE_DOC_INSTALL
> + $(SED) 's/SUBDIRS += mpn fft mpz mpq mpf printf scanf cxx tune doc/SUBDIRS += mpn fft mpz mpq mpf printf scanf cxx tune/' \
> + $(@D)/Makefile.am
> +endef
> +MPIR_POST_PATCH_HOOKS += MPIR_DISABLE_DOC_INSTALL
> +
> ifeq ($(BR2_MIPS_NABI32),y)
> MPIR_CONF_OPTS += ABI=n32
> endif
> --
> 2.47.3
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-13 19:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-26 9:02 [Buildroot] [PATCH 1/1] package/mpir: fix build errors Bernd Kuhls
2026-02-02 18:11 ` Thomas Petazzoni via buildroot
2026-02-13 19:37 ` Thomas Perale via buildroot
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.