Your message dated Fri, 14 Sep 2012 23:32:42 -0500
with message-id <[email protected]>
and subject line Re: Bug#687169: libgmp-dev: remove the __GMP_CC and
__GMP_CFLAGS lines from gmp-*.h files (or explain why they should be kept)
has caused the Debian Bug report #687169,
regarding libgmp-dev: remove the __GMP_CC and __GMP_CFLAGS lines from gmp-*.h
files (or explain why they should be kept)
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
687169: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687169
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libgmp-dev
Version: 2:5.0.5+dfsg-2
Severity: wishlist
The /usr/include/gmp-*.h files have lines like:
#define __GMP_CC "x86_64-linux-gnu-gcc -std=gnu99"
#define __GMP_CFLAGS "-Wall -g -O3"
Such a feature was added after a discussion between GMP and MPFR
developers. The reason is that on some systems, GMP is not built
with the default ABI (unless the user provides explicit CC and/or
CFLAGS environment variables when building GMP), so that a user
who wishes to build another program (e.g. MPFR) using GMP would
generally get an error (at compile time or more obscure failures
at run time) because of ABI mismatch. These lines allow the build
system of the program (e.g. configure script) to use the ABI chosen
by GMP if the user doesn't provide explicit CC/CFLAGS environment
variables to build the program. This is what MPFR does, for instance.
However, AFAIK, GMP is always built with the default ABI under Debian,
so that these lines are useless (library/header GMP files for a
non-default ABI may also be available, e.g. i386 under amd64, but in
such a case the user provides an option like CFLAGS="-m32 ...", so
that the __GMP_CC and __GMP_CFLAGS lines are not used anyway).
The reason for asking the removal of such lines is that more than
being useless, these lines may contain incorrect information when
GMP has been built on some machine and gmp.h is distributed on
other machines, which have a different environment.
For instance, I wonder whether x86_64-linux-gnu-gcc is necessarily
available on amd64 machines (a user may have installed gcc from
upstream under /usr/local/bin or something like that), and I also
wonder whether the -O3 option (used without -march=native) will
necessarily yield better optimizations than the usual default -O2
option, e.g. selected by the autotools.
If you think that keeping these lines is better under the Debian
context, then it would be a good idea to add a
/usr/share/doc/libgmp-dev/README.Debian
file explaining why (so that the user doesn't think that something
may be wrong in the Debian package).
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libgmp-dev depends on:
ii libgmp10 2:5.0.5+dfsg-2
ii libgmpxx4ldbl 2:5.0.5+dfsg-2
Versions of packages libgmp-dev recommends:
ii libstdc++6-4.4-dev [libstdc++-dev] 4.4.7-2
ii libstdc++6-4.5-dev [libstdc++-dev] 4.5.4-1
ii libstdc++6-4.6-dev [libstdc++-dev] 4.6.3-9
ii libstdc++6-4.7-dev [libstdc++-dev] 4.7.1-8
Versions of packages libgmp-dev suggests:
ii libgmp10-doc 2:5.0.5+dfsg-2
ii libmpfr-dev 3.1.0-5
-- no debconf information
--- End Message ---
--- Begin Message ---
On September 13, 2012 04:02:57 AM Vincent Lefevre wrote:
> On 2012-09-12 21:00:32 -0500, Steve M. Robbins wrote:
> > Hello Vincent,
> >
> > I've read your email a few times and I'm having a hard time understanding
> > why you believe a bug exists.
> >
> > The preprocessor symbols at issue are preceeded by the following comment:
> >
> > /* Define CC and CFLAGS which were used to build this version of GMP */
> >
> > ... and they do exactly that.
>
> Not really. This information makes sense on the machine where GMP
> was built,
Yes, and that's what the comment says. I don't see any bug.
> What the comment doesn't say is that users should use the same CC and
> CFLAGS to build his program against GMP. That's why this information
> has been added to gmp.h.
I think you're over-interpreting it. No-one has to use the same CFLAGS or CC
to build programs that use gmp.
-Steve
--- End Message ---