#13948: Let MPIR build with Clang
-------------------------------------------------+-------------------------
Reporter: jpflori | Owner: leif
Type: defect | Status:
Priority: major | needs_review
Component: packages: standard | Milestone: sage-5.12
Keywords: spkg mpir clang | Resolution:
Authors: Jeroen Demeyer | Merged in:
Report Upstream: Reported upstream. Developers | Reviewers:
acknowledge bug. | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-------------------------------------------------+-------------------------
Comment (by jhpalmieri):
Now I ''have'' tried a full Sage build on top of this, and the build
finishes. I guess that isn't too surprising, because mpir gets rebuilt
with Sage's GCC anyway.
I'll try again with a more carefully constructed spkg, and I'll also run
the full test suite. Here's my actual proposed patch to spkg-install:
{{{
#!diff
diff --git a/spkg-install b/spkg-install
--- a/spkg-install
+++ b/spkg-install
@@ -275,6 +275,21 @@
echo " ABI: $user_abi"
echo " (CPP, CPPFLAGS, CXX and CXXFLAGS are listed below; these don't
get modified.)"
+# Fix bug with Xcode 5.0 or later on Darwin: mpir doesn't build using
+# the -m32 flag with the gcc from this version of Xcode, so remove
+# -m32 from CFLAGS.
+if [ "$UNAME" = "Darwin" ]; then
+ # Xcode version detection, etc., taken from spkg/base/prereq
+ XCODE_VERS=`xcodebuild -version 2> /dev/null | grep Xcode | sed -e
's/[A-Za-z ]//g'`
+ if [ -z $XCODE_VERS ]; then
+ XCODE_VERS="2"
+ fi
+ XCODE_VERS_MAJOR=`echo $XCODE_VERS | cut '-d.' -f1`
+ if [ $XCODE_VERS_MAJOR -gt 4 ]; then
+ mpir_cflags=`echo $mpir_cflags | sed 's/-m32//'` # remove -m32
+ fi
+fi
+
# Finally: use MPIR's flags, plus those required by Sage for the
# package to build properly, plus those specified by the user.
CFLAGS="$mpir_cflags $required_cflags $user_cflags"
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/13948#comment:29>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.