public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Arsen Arsenović" <arsen@aarsen.me>
To: Matthias Klose <matthias.klose@canonical.com>
Cc: apinski@marvell.com, gdb-patches@sourceware.org,
	binutils@sourceware.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCHv2] Use toplevel configure for GMP and MPFR for gdb
Date: Thu, 10 Aug 2023 21:00:55 +0200	[thread overview]
Message-ID: <86edkahg9r.fsf@aarsen.me> (raw)
In-Reply-To: <d26f2d9e-1f04-9f6a-5e8b-ad216fce3d09@canonical.com>

[-- Attachment #1: Type: text/plain, Size: 3405 bytes --]


Matthias Klose via Gcc-patches <gcc-patches@gcc.gnu.org> writes:

> On 10.11.22 20:05, apinski--- via Binutils wrote:
>> From: Andrew Pinski <apinski@marvell.com>
>> This patch uses the toplevel configure parts for GMP/MPFR for
>> gdb. The only thing is that gdb now requires MPFR for building.
>> Before it was a recommended but not required library.
>> Also this allows building of GMP and MPFR with the toplevel
>> directory just like how it is done for GCC.
>> We now error out in the toplevel configure of the version
>> of GMP and MPFR that is wrong.
>> OK after GDB 13 branches? Build gdb 3 ways:
>> with GMP and MPFR in the toplevel (static library used at that point for both)
>> With only MPFR in the toplevel (GMP distro library used and MPFR built from source)
>> With neither GMP and MPFR in the toplevel (distro libraries used)
>
> this still seems to be broken for a gdb trunk build, using GMP and MPFR system
> libraries:
>
> linking gdb:
>
> [...]
> ../gnulib/import/libgnu.a   -Lyes/lib -lmpfr -lgmp -lsource-highlight
> -lboost_regex  -lxxhash  -ldebuginfod   -ldl
> -Wl,--dynamic-list=/<<PKGBUILDDIR>>/gdb/proc-service.list
> ./libtool: line 5209: cd: yes/lib: No such file or directory
> libtool: link: cannot determine absolute directory name of `yes/lib'
> make[3]: *** [Makefile:2174: gdb] Error 1
> make[3]: Leaving directory '/<<PKGBUILDDIR>>/build/default/gdb'
>
> full build log at
> https://launchpad.net/~doko/+archive/ubuntu/toolchain/+sourcepub/15065515/+listing-archive-extra
>
>
> the toplevel config.log has:
>
> configure:8183: checking for the correct version of gmp.h
> configure:8202: x86_64-linux-gnu-gcc -c  -Iyes/include  -fPIC conftest.c >&5
> configure:8202: $? = 0
> configure:8220: x86_64-linux-gnu-gcc -c  -Iyes/include  -fPIC conftest.c >&5
> configure:8220: $? = 0
> configure:8221: result: yes
> configure:8237: checking for the correct version of mpfr.h
> configure:8255: x86_64-linux-gnu-gcc -c  -Iyes/include  -fPIC conftest.c >&5
> configure:8255: $? = 0
> configure:8272: x86_64-linux-gnu-gcc -c  -Iyes/include  -fPIC conftest.c >&5
> configure:8272: $? = 0
> configure:8273: result: yes
> configure:8342: checking for the correct version of the gmp/mpfr libraries
> configure:8366: x86_64-linux-gnu-gcc -o conftest  -Iyes/include  -fPIC
> conftest.c  -Lyes/lib -lmpfr -lgmp >&5
> configure:8366: $? = 0
> configure:8367: result: yes
> configure:8615: checking for isl 0.15 or later
> configure:8628: x86_64-linux-gnu-gcc -o conftest   -Iyes/include  -fPIC   -lisl
> -Lyes/lib -lmpfr -lgmp conftest.c  -lisl -lgmp >&5
> configure:8628: $? = 0

Seems that you're passing simply --with-mpfr, however:

  AC_ARG_WITH(mpfr,
  [AS_HELP_STRING([--with-mpfr=PATH],
                  [specify prefix directory for installed MPFR package.
                   Equivalent to --with-mpfr-include=PATH/include
                   plus --with-mpfr-lib=PATH/lib])])

... so it is interpreted to mean that the prefix MPFR is installed in is
yes/include (perhaps we should warn for the 'yes' case - that'd be less
confusing).  I think you should be able to get away without passing
--with-mpfr at all if your toolchain has mpfr available (and there's no
mpfr in the toplevel, to inhibit the toplevel trying to build its own
copy).

Hope that helps, have a lovely night.
-- 
Arsen Arsenović

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 381 bytes --]

  reply	other threads:[~2023-08-10 19:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10 19:05 apinski
2022-11-16  3:59 ` Jeff Law
2022-11-16 16:01   ` Tom Tromey
2022-11-16 18:50     ` Jeff Law
2022-12-20 18:59 ` Tom Tromey
2022-12-21  3:45   ` Andrew Pinski
2022-12-21 14:56     ` Jeff Law
2022-12-21 15:03     ` Tom Tromey
2023-01-03 10:52       ` Clément Chigot
2023-01-03 11:51         ` Nick Clifton
2023-01-03 11:52         ` Andrew Pinski
2023-01-03 13:12           ` Clément Chigot
2023-08-10 12:47 ` Matthias Klose
2023-08-10 19:00   ` Arsen Arsenović [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-11-10 19:03 apinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86edkahg9r.fsf@aarsen.me \
    --to=arsen@aarsen.me \
    --cc=apinski@marvell.com \
    --cc=binutils@sourceware.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=matthias.klose@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).