[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [platform-testers] Request for testing GnuCOBOL 3.1-rc1
From: |
Jeffrey Walton |
Subject: |
Re: [platform-testers] Request for testing GnuCOBOL 3.1-rc1 |
Date: |
Sun, 12 Jul 2020 19:32:09 -0400 |
On Sun, Jul 12, 2020 at 6:27 PM Bruno Haible <bruno@clisp.org> wrote:
>
> On a glibc system, configuring in such a way that it should find and use
> my previously installed packages
>
> ../configure --prefix=/inst-x86_64-64 \
> CPPFLAGS="-I/inst-x86_64-64/include -Wall" \
> LDFLAGS="-L/inst-x86_64-64/lib"
> fails:
>
> configure: Checks for GMP/MPIR ...
> checking for gmp... no
> checking for libgmp... no
> checking gmp.h usability... yes
> checking gmp.h presence... yes
> checking for gmp.h... yes
> checking for gmp.h... (cached) yes
> checking if linking against libgmp with "-lgmp" works... yes
> checking matching GMP version... no (header: 6.2 / library: 6.1.0)
> configure: error: Unable to use GMP - Please check config.log
>
> The config.log reveals that the test program was linked without -rpath
> option:
>
> configure:15363: checking matching GMP version
> configure:15395: gcc -o conftest -O2 -I/inst-x86_64-64/include -Wall
> -L/inst-x86_64-64/lib conftest.c -lgmp >&5
> configure:15395: $? = 0
> configure:15395: ./conftest
> configure:15395: $? = 0
> configure:15432: gcc -o conftest -O2 -I/inst-x86_64-64/include -Wall
> -L/inst-x86_64-64/lib conftest.c -lgmp >&5
> configure:15432: $? = 0
> configure:15432: ./conftest
> configure:15432: $? = 0
> configure:15452: result: no (header: 6.2 / library: 6.1.0)
>
> and thus used the library installed in /usr, not the one in /inst-x86_64-64.
>
> Of course, I don't use
>
> ../configure --prefix=/inst-x86_64-64 \
> CPPFLAGS="-I/inst-x86_64-64/include -Wall" \
> LDFLAGS="-L/inst-x86_64-64/lib
> -Wl,-rpath,/inst-x86_64-64/lib"
>
> because that would cause _all_ built programs to have the RPATH entry, not
> only those that need it.
>
> The remedy will be to use the Gnulib module 'libgmp'. It uses an
> AC_LIB_HAVE_LINKFLAGS invocation; it is this invocation which adds the
> necessary -rpath option.
It is also breaking in the same way when configuring with
--with-libxml2 and --with-ncurses. The workarounds (at the moment) are
--without-libxml2 and --without-ncurses.
Jeff