#12762: LinBox (1.1.6) fails to build with GCC 4.7.0, and lacks an `spkg-check`
-------------------------------------------------------------------------+--
Reporter: leif |
Owner: leif
Type: defect |
Status: needs_work
Priority: major |
Milestone: sage-5.1
Component: packages |
Resolution:
Keywords: C++11 GCC 4.7.0 CXXFLAGS -fpermissive spkg spkg-check |
Work issues:
Report Upstream: N/A |
Reviewers:
Authors: Leif Leonhardy |
Merged in:
Dependencies: |
Stopgaps:
-------------------------------------------------------------------------+--
Description changed by jdemeyer:
Old description:
> This is due to stricter (C++11) name look-up rules in GCC 4.7.x.
>
> I've created an spkg with a trivial fix, just adding `-fpermissive` to
> `CXXFLAGS` if we're using `g++` 4.7.x:
> {{{
> #!patch
> diff --git a/spkg-install b/spkg-install
> --- a/spkg-install
> +++ b/spkg-install
> @@ -20,6 +20,13 @@
> export CFLAGS="$CFLAGS -g -fPIC"
> export CXXFLAGS="$CXXFLAGS -g -fPIC"
>
> +case "`$CXX -dumpversion 2>/dev/null`" in
> + 4.7.*)
> + echo "Adding '-fpermissive' to CXXFLAGS to make LinBox build
> with GCC 4.7.x."
> + echo "This is a temporary fix; LinBox currently doesn't conform
> to the C++11 standard."
> + CXXFLAGS="-fpermissive $CXXFLAGS" # The user might still
> override that.
> +esac
> +
> # Some systems have problems when parts of Linbox are compiled with
> # the commentator enabled and other parts with the commentator
> # disabled. Therefore, disable it always.
> }}}
>
> ----
>
> '''New spkg:'''
> [http://boxen.math.washington.edu/home/leif/Sage/spkgs/linbox-1.1.6.p8.spkg]
>
> '''md5sum:''' `b7a35a9927d5fc5c51f88ad3ada3df6c linbox-1.1.6.p8.spkg`
>
> === linbox-1.1.6.p8 (Leif Leonhardy, April 7th 2012) ===
> * #12762: Temporarily add `-fpermissive` to `CXXFLAGS` if we're
> compiling
> with `g++` 4.7.x, since the LinBox sources currently don't conform to
> C++11, so GCC 4.7.x would otherwise reject them.
> * Exit if the build failed.
> * Use `CFLAG64` if it is set (and `SAGE64=yes`).
> * Clean up `spkg-install`, add some messages.
> * Add an `spkg-check` file, which currently runs `make check`. (There's
> also
> a `fullcheck` target.)
> * Change patch to disable the commentator, as default parameters were
> missing
> with `-DDISABLE_COMMENTATOR`, such that the test suite wouldn't build.
> Also, one must not unconditionally use `extern` for the global (dummy)
> commentator since this is C++, and doing so also breaks the test
> suite.
> * Fix (i.e. patch) the sources such that the test suite (`make check`)
> builds,
> also with GCC 4.7.0.
> * Add the "Special Update/Build Instructions" section.
>
> ----
>
> See #12751 for the GCC-4.7.0 metaticket.
New description:
This is due to stricter (C++11) name look-up rules in GCC 4.7.x.
I've created an spkg with a trivial fix, just adding `-fpermissive` to
`CXXFLAGS` if we're using `g++` 4.7.x:
{{{
#!patch
diff --git a/spkg-install b/spkg-install
--- a/spkg-install
+++ b/spkg-install
@@ -20,6 +20,13 @@
export CFLAGS="$CFLAGS -g -fPIC"
export CXXFLAGS="$CXXFLAGS -g -fPIC"
+case "`$CXX -dumpversion 2>/dev/null`" in
+ 4.7.*)
+ echo "Adding '-fpermissive' to CXXFLAGS to make LinBox build with
GCC 4.7.x."
+ echo "This is a temporary fix; LinBox currently doesn't conform
to the C++11 standard."
+ CXXFLAGS="-fpermissive $CXXFLAGS" # The user might still override
that.
+esac
+
# Some systems have problems when parts of Linbox are compiled with
# the commentator enabled and other parts with the commentator
# disabled. Therefore, disable it always.
}}}
----
'''New spkg:'''
[http://boxen.math.washington.edu/home/jdemeyer/spkg/linbox-1.1.6.p9.spkg]
(rebased to #10281 by jdemeyer, originally this was a .p8 by leif)
=== linbox-1.1.6.p9 (Leif Leonhardy, April 7th 2012) ===
* #12762: Temporarily add `-fpermissive` to `CXXFLAGS` if we're compiling
with `g++` 4.7.x, since the LinBox sources currently don't conform to
C++11, so GCC 4.7.x would otherwise reject them.
* Exit if the build failed.
* Use `CFLAG64` if it is set (and `SAGE64=yes`).
* Clean up `spkg-install`, add some messages.
* Add an `spkg-check` file, which currently runs `make check`. (There's
also
a `fullcheck` target.)
* Change patch to disable the commentator, as default parameters were
missing
with `-DDISABLE_COMMENTATOR`, such that the test suite wouldn't build.
Also, one must not unconditionally use `extern` for the global (dummy)
commentator since this is C++, and doing so also breaks the test suite.
* Fix (i.e. patch) the sources such that the test suite (`make check`)
builds,
also with GCC 4.7.0.
* Add the "Special Update/Build Instructions" section.
----
See #12751 for the GCC-4.7.0 metaticket.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12762#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.