bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libgmp: link to the correct shared library


From: Paul Eggert
Subject: Re: libgmp: link to the correct shared library
Date: Thu, 23 Jul 2020 16:23:56 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 7/23/20 3:30 PM, Bruno Haible wrote:

If, say, we change the 'factor' program in GNU coreutils
to use GMP, so that it can factor integers with more than 20 digits, anyone who
wants to use their own installed GMP would get programs (from 'expr' to 'mkdir')
that all spend time, during program startup, to look up their libraries in
/PREFIX64/lib.
This may not be perfect, but it's good enough for many applications. Coreutils has been doing it this way since Coreutils 7.0 (2008) and it doesn't appear to have been a significant problem in practice. (Plus, Coreutils 'expr' already links to GMP anyway. :-)

Also, adding -Wl,-rpath=/PREFIX64/lib to LDFLAGS will have ill consequences
when the package contains shared libraries and uses libtool to create them. See
<https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00102.html>.

That's OK too, since Emacs and coreutils don't use libtool to create packages.

Do you think there is something to add to the documentation
https://www.gnu.org/software/gnulib/manual/html_node/Searching-for-Libraries.html
 ?

I am hoping that I do not have to read that documentation; I just want to keep building Coreutils the way it's been built for quite some time. I introduced libgmp in order make it easier to use GMP in other apps like Emacs; I didn't want the module to complicate configuration in coreutils or in other packages that don't need the complication. Emacs in particular prefers to use pkg-config and PKG_CHECK_MODULES to configure libraries, and I don't want to have to worry about how that interacts with libtool.

I'm not saying I'm against having a libtool-aware GMP module in Gnulib; I merely want to be able to use GMP without worrying about libtool.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]