[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Avoid gawkextlib as a separate shared library
From: |
Eli Zaretskii |
Subject: |
Re: Avoid gawkextlib as a separate shared library |
Date: |
Thu, 19 May 2022 13:30:28 +0300 |
> Cc: aschorr@telemetry-investments.com, arnold@skeeve.com, bug-gawk@gnu.org
> From: Manuel Collado <mcollado2011@gmail.com>
> Date: Wed, 18 May 2022 23:54:19 +0200
>
> $ ./configure --prefix=/c/gnu --with-gawk=/c/gnu --with-gawkextlib=/c/gnu
Btw, while looking into this, I found another subtle problem with the
gawk-mpfr's configure script: when configured like this:
$ ./configure --prefix=/d/usr --with-gawk=/d/usr --with-gawkextlib=/d/usr
the configure script told me that I don't have GMP installed:
checking gawkextlib.h usability... yes
checking gawkextlib.h presence... yes
checking for gawkextlib.h... yes
checking for __gmpz_init in -lgmp... no
configure: error: GMP was not found. Go install GMP 4.1.4 or later from
http://www.swox.com/gmp and try again.
This happens because the configure script does this:
# Check whether --with-gmp was given.
if test "${with_gmp+set}" = set; then :
withval=$with_gmp;
# some platforms use lib64 and others use lib
wldfound=0
for wldir in "$withval"/lib* ; do
if test -d "$wldir"; then
LDFLAGS="-L${wldir} ${LDFLAGS}"
wldfound=1
fi
done
if test "$wldfound" = 0; then
LDFLAGS="-L${withval} ${LDFLAGS}"
fi
if test -d "$withval/include"; then
CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
else
CPPFLAGS="-I${withval} ${CPPFLAGS}"
fi
fi
The loop over all the matches for "$withval"/lib* adds to LDFLAGS
directories that could cause trouble. In my case, some of the matches
for lib* included old and incompatible libraries, which failed the
link with -lgmp for reasons completely unrelated to GMP itself.
This means that --with-gmp, --with-mpfr, and --with-gawkextlib cannot
be safely given with a value of $prefix, but should instead be
given with the value of $prefix/lib.
One possible fix would be to explicitly check for lib64, but even that
could be problematic, since one could have, say, 32-bit and 64-bit
libraries in 2 separate directories, and the above test could pick up
the wrong one.
- Re: Avoid gawkextlib as a separate shared library, (continued)
- Re: Avoid gawkextlib as a separate shared library, Manuel Collado, 2022/05/18
- Re: Avoid gawkextlib as a separate shared library, Andrew J. Schorr, 2022/05/18
- Re: Avoid gawkextlib as a separate shared library, Manuel Collado, 2022/05/18
- Re: Avoid gawkextlib as a separate shared library, Eli Zaretskii, 2022/05/18
- Re: Avoid gawkextlib as a separate shared library, Manuel Collado, 2022/05/18
- Re: Avoid gawkextlib as a separate shared library, Eli Zaretskii, 2022/05/19
- Found a libtool issue (vas: Avoid gawkextlib as a separate shared library), Manuel Collado, 2022/05/19
- Re: Found a libtool issue (vas: Avoid gawkextlib as a separate shared library), Eli Zaretskii, 2022/05/19
- Re: Found a libtool issue, Manuel Collado, 2022/05/19
- Re: Found a libtool issue, Eli Zaretskii, 2022/05/19
- Re: Avoid gawkextlib as a separate shared library,
Eli Zaretskii <=
- Re: gawkextlib installation issues, Andrew J. Schorr, 2022/05/19
- Re: gawkextlib installation issues, Eli Zaretskii, 2022/05/19
- Re: gawkextlib installation issues, Manuel Collado, 2022/05/19
- Re: MinGw port of gawkextlib (was: Extension packaging), Eli Zaretskii, 2022/05/11
- Re: MinGw port of gawkextlib, Manuel Collado, 2022/05/11
- Re: MinGw port of gawkextlib, Eli Zaretskii, 2022/05/11
- Message not available
- Re: Extension packaging, Manuel Collado, 2022/05/11
- Re: Extension packaging, arnold, 2022/05/11
- Re: Extension packaging, arnold, 2022/05/10
- Re: [gawk-devel] MPFR thoughts, Neil R. Ormos, 2022/05/08