#12655: Update PolyBoRi to release 0.8.1
----------------------------------------------------------------+-----------
Reporter: AlexanderDreyer |
Owner: AlexanderDreyer
Type: enhancement |
Status: needs_review
Priority: major |
Milestone: sage-5.0
Component: algebra |
Resolution:
Keywords: | Work
issues:
Report Upstream: None of the above - read trac for reasoning. |
Reviewers: Martin Albrecht, Jeroen Demeyer
Authors: Alexander Dreyer | Merged
in:
Dependencies: #12656 |
Stopgaps:
----------------------------------------------------------------+-----------
Comment (by jhpalmieri):
With this package, on both Solaris and !OpenSolaris, I get this:
{{{
Starting build...
Removing old PolyBoRi install...
Done removing old PolyBoRi install.
Running build_polybori...
scons: Reading SConscript files ...
NameError: name 'CCFLAGS' is not defined:
File
"/export/home/palmieri/testing/sage-5.0.beta7-gcc/spkg/build/polybori-0.8.1.p1/src/polybori-0.8.1/SConstruct",
line 241:
if is_gcc():
File
"/export/home/palmieri/testing/sage-5.0.beta7-gcc/spkg/build/polybori-0.8.1.p1/src/polybori-0.8.1/SConstruct",
line 239:
compilerenv = Environment(ENV = os.environ, options = opts)
File
"/export/home/palmieri/testing/sage-5.0.beta7-gcc/local/lib/scons-1.2.0/SCons/Environment.py",
line 975:
variables.Update(self)
File
"/export/home/palmieri/testing/sage-5.0.beta7-gcc/local/lib/scons-1.2.0/SCons/Variables/__init__.py",
line 169:
execfile(filename, {}, values)
File "custom.py", line 6:
CCFLAGS += ["-Wno-long-long", "-Wreturn-type"]
Error building PolyBoRi.
}}}
Should `CCFLAGS` be `CFLAGS`? If I fix this, I get a similar error for
`GD_LIBS`. I ended up applying the following patch:
{{{
#!diff
diff --git a/custom.py b/custom.py
--- a/custom.py
+++ b/custom.py
@@ -1,13 +1,15 @@
import os
import sys
-# FIXME: Do we really want to *overwrite* the flags (e.g. if set by the
user)?
-# Answer: Should be fixed now.
-CCFLAGS += ["-Wno-long-long", "-Wreturn-type"]
-
# Note: PolyBoRi still appends DEFAULT_*FLAGS (overwrite those, if
necessary)
if 'CFLAGS' in os.environ:
CFLAGS = os.environ['CFLAGS'].split(' ')
+else:
+ CFLAGS = []
+
+# FIXME: Do we really want to *overwrite* the flags (e.g. if set by the
user)?
+# Answer: Should be fixed now.
+CFLAGS += ["-Wno-long-long", "-Wreturn-type"]
if 'CXXFLAGS' in os.environ:
CXXFLAGS = os.environ['CXXFLAGS'].split(' ')
@@ -15,6 +17,11 @@
if 'CPPFLAGS' in os.environ:
CCFLAGS = os.environ['CPPFLAGS'].split(' ')
+if 'GD_LIBS' in os.environ:
+ GD_LIBS = os.environ['GD_LIBS'].split(' ')
+else:
+ GD_LIBS = []
+
GD_LIBS+=["png12","z"]
# FIXME: Should we include LDFLAGS here? (see above)
}}}
The spkg-install file is odd, though: some places it refers to `CFLAGS`,
others to `CCFLAGS`, so I'm not sure my changes are correct. In any case,
it worked on !OpenSolaris, but on Solaris I got the same error as before
("Could not detect type sizes"). This may be related to #12369.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12655#comment:31>
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.