wrong installation path for gmp.h

Jing Leng jleng at ambarella.com
Thu Apr 6 09:45:24 CEST 2023

Hi Torbjörn,

I configured gmp-6.2.1 with the following command:
DESTDIR=`pwd`/install; ./configure --prefix=${DESTDIR} --bindir=${DESTDIR}/usr/bin --sbindir=${DESTDIR}/usr/sbin --libdir=${DESTDIR}/usr/lib --libexecdir=${DESTDIR}/usr/libexec --includedir=${DESTDIR}/usr/include --datarootdir=${DESTDIR}/usr/share

I found that the installation path (${DESTDIR}/include) for gmp.h does not match the includedir (${DESTDIR}/usr/include) in gmp.pc, this caused an error in the configuration for the mpfr package.

I can add the following configuration to solve this problem: exec_prefix=${DESTDIR}/usr .
However, is it better to use the following patch then run command (aclocal && automake -f) to fix it?

diff --git a/Makefile.am b/Makefile.am
index 1c24694..96bd83e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -139,8 +139,7 @@ EXTRA_DIST += gmpxx.h
 # to address that.
 includeexecdir = $(exec_prefix)/include
-nodist_includeexec_HEADERS = gmp.h

Best Regards!
Jing Leng ( 冷静)
Ambarella Shanghai

This email and attachments contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gmp-fix-wrong-installation-path-for-gmp.h.patch
Type: application/octet-stream
Size: 710 bytes
Desc: 0001-gmp-fix-wrong-installation-path-for-gmp.h.patch
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20230406/f8b735f4/attachment.obj>

More information about the gmp-bugs mailing list