Alexander Dreyer wrote:
> Dear Dave,

Hi Alexander

> thank you, for pointing out that this issue is not resolved in Sage. I
> thought, these things were resolved, because we were discussing similar
> issues within another thread.

The previous issue observed in Sage with PolyBoRi picking up the wrong compiler 
(Sun's C++ compiler instead of gcc) is resolved. PolyBoRi is now using whatever 
CC and CXX are set too, which is good news.

But PolyBoRi will not build with Sun's compiler. There seems to be a few issues 
in fact. I'm not sure how much of this is PolyBoRi, or how much is due to 
people 
patching the code in Sage.

Part of the issue seems to be that few really understands SCons, so I suspect 
the patches are far from optimal. I've also seen some comments to suggest SCons 
is a good replacment for make, but it is nowhere near as good as 
autoconf/automake for generating a makefile. But that aside, to get to the 
specific issues in Sage:

  * -pg is not an option to the Sun compiler.

  * SAGE64 can be set to "yes" on any platform, so the comment in custom.py of 
"64-bit OSX build" is not correct.


> CCFLAGS=["-O3 -g"]
> CXXFLAGS=CCFLAGS+[""]
> 
> If not, can you provide me the sun-equivalents, such
> that I can patch custom.py accordingly?

Changing custom.py as you suggest stops the errors about incorrect flags, 
though 
I note there is "-O3 -g -O3 -g" which is harmless, but not ideal.

But PolyBoRi is still failing to build. It appears the Sun C++ compiler does 
not 
accept the code is valid C++ code. The Sun compiler is a lot stricter than g++.
(This was tested with Sun Studio 12.1 on a Sun Blade 2000. It is a slightly 
newer version of Sun Studio than is installed on 't2', but I think this is 
failing on 't2' too). The Blade 2000 just happens to be a lot quicker than 't2' 
for single threaded applications.

The Sun equivalent of -fPIC, is usually -KPIC, though I think that is different 
on 64-bit platforms. It is also different on other platforms too.

I proposed some time back that a new sage-env was written, which exported the 
variable

FPIC_FLAG

which would be set on each platform as appropiate. Then all occurrences in Sage 
of -fPIC could be replaced by -$FPIC_FLAG. We only need to sort out once what 
is 
the appropriate option.

I have recently tried building Sage on HP-UX, where the flags are completely 
different, and even -m64 is not acceptable to the HP compiler.

Libtool is a tool which sorts all of this out, picking the right flags on every 
platform. But that is designed to integrate with autoconf/automake, not SCons.

Anyway, here is the failure seen with Sun Studio 12.1 on SPARC.

Dave

polybori-0.6.3-20090827.p0/patches/SConstruct.patch
polybori-0.6.3-20090827.p0/patches/SConstruct
polybori-0.6.3-20090827.p0/patches/PyPolyBoRi.py.diff
Finished extraction
****************************************************
Host system
uname -a:
SunOS swan 5.10 Generic_141444-09 sun4u sparc SUNW,Sun-Blade-1000
****************************************************
****************************************************
CC Version
/opt/xxxsunstudio12.1/bin/cc -v
usage: cc [ options] files.  Use 'cc -flags' for details
****************************************************
mkdir: Failed to make directory "src/boost_1_34_1.cropped"; File exists
cp: cannot access 
/export/home/drkirkby/sage-4.3.alpha0-sun-compiler/local/include/boost
Starting build...
Removing old PolyBoRi install...
Done removing old PolyBoRi install.
Running build_polybori...
scons: Reading SConscript files ...
Sun linker detected.
Checking for C header file gd.h... no
Checking for C++ header file unordered_map... no
Checking for C++ header file tr1/unordered_map... no
Checking for C++ header file ext/hash_map... no
Warning: No LaTeX to html converter found, Tutorial will not be installed
Checking for C library m4ri... no
Checking for C header file gd.h... no
Symlinking to M4RI/m4ri ...
no python extension
scons: done reading SConscript files.
scons: Building targets ...
/opt/xxxsunstudio12.1/bin/CC -o polybori/src/BoolePolyRing.o -c -O3 -g -O3 -g 
-DNDEBUG -DPACKED -DHAVE_M4RI -DHAVE_IEEE_754 -DBSD 
-I/export/home/drkirkby/sage-4.3.alpha0-sun-compiler/spkg/build/polybori-0.6.3-20090827.p0/src/boost_1_34_1.cropped
 
-I/export/home/drkirkby/sage-4.3.alpha0-sun-compiler/local/include 
-I/export/home/drkirkby/sage-4.3.alpha0-sun-compiler/local/include/python2.6 
-Ipolybori/include -IM4RI -ICudd/obj -ICudd/util -ICudd/cudd -ICudd/mtr 
-ICudd/st -ICudd/epd polybori/src/BoolePolyRing.cc
"polybori/include/CDDManager.h", line 103: Warning: Last line in file 
"polybori/include/cacheopts.h" is not terminated with a newline.
"polybori/include/CCuddZDD.h", line 308: Warning (Anachronism): Formal argument 
func of type DdNode*(*)(DdManager*,DdNode*,int) in call to 
polybori::CCuddDDBase<polybori::CCuddZDD>::apply(DdNode*(*)(DdManager*,DdNode*,int),
 
int) const is being passed extern "C" DdNode*(*)(DdManager*,DdNode*,int).
"polybori/include/CCuddZDD.h", line 308: Warning (Anachronism): Formal argument 
func of type DdNode*(*)(DdManager*,DdNode*,int) in call to 
polybori::CCuddDDBase<polybori::CCuddZDD>::apply(DdNode*(*)(DdManager*,DdNode*,int),
 
int) const is being passed extern "C" DdNode*(*)(DdManager*,DdNode*,int).
"polybori/include/CCuddZDD.h", line 308: Warning (Anachronism): Formal argument 
func of type DdNode*(*)(DdManager*,DdNode*,int) in call to 
polybori::CCuddDDBase<polybori::CCuddZDD>::apply(DdNode*(*)(DdManager*,DdNode*,int),
 
int) const is being passed extern "C" DdNode*(*)(DdManager*,DdNode*,int).
"polybori/include/CCuddZDD.h", line 313: Warning (Anachronism): Formal argument 
func of type DdNode*(*)(DdManager*,DdNode*,DdNode*,DdNode*) in call to 
polybori::CCuddDDBase<polybori::CCuddZDD>::apply(DdNode*(*)(DdManager*,DdNode*,DdNode*,DdNode*),
 
const polybori::CCuddZDD&, const polybori::CCuddZDD&) const is being passed 
extern "C" DdNode*(*)(DdManager*,DdNode*,DdNode*,DdNode*).
"polybori/include/CCuddZDD.h", line 322: Warning (Anachronism): Formal argument 
func of type int(*)(DdManager*,DdNode*) in call to 
polybori::CCuddDDBase<polybori::CCuddZDD>::apply(int(*)(DdManager*,DdNode*)) 
const is being passed extern "C" int(*)(DdManager*,DdNode*).
"polybori/include/CCuddZDD.h", line 323: Warning (Anachronism): Formal argument 
func of type int(*)(DdManager*,DdNode*) in call to 
polybori::CCuddDDBase<polybori::CCuddZDD>::apply(int(*)(DdManager*,DdNode*)) 
const is being passed extern "C" int(*)(DdManager*,DdNode*).
"polybori/include/CCuddZDD.h", line 327: Warning (Anachronism): Formal argument 
func of type int(*)(DdManager*,DdNode*) in call to 
polybori::CCuddDDBase<polybori::CCuddZDD>::memApply<int>(int(*)(DdManager*,DdNode*))
 
const is being passed extern "C" int(*)(DdManager*,DdNode*).
"polybori/include/CCuddZDD.h", line 330: Warning (Anachronism): Formal argument 
func of type double(*)(DdManager*,DdNode*) in call to 
polybori::CCuddDDBase<polybori::CCuddZDD>::memApply<double>(double(*)(DdManager*,DdNode*))
 
const is being passed extern "C" double(*)(DdManager*,DdNode*).
"polybori/include/CCuddInterface.h", line 192: Warning (Anachronism): Formal 
argument func of type DdNode*(*)(DdManager*,int) in call to 
polybori::CCuddInterface::apply(DdNode*(*)(DdManager*,int), int) const is being 
passed extern "C" DdNode*(*)(DdManager*,int).
"polybori/include/CCuddInterface.h", line 195: Warning (Anachronism): Formal 
argument func of type DdNode*(*)(DdManager*,int) in call to 
polybori::CCuddInterface::apply(DdNode*(*)(DdManager*,int), int) const is being 
passed extern "C" DdNode*(*)(DdManager*,int).
"polybori/include/CCuddInterface.h", line 198: Warning (Anachronism): Formal 
argument func of type DdNode*(*)(DdManager*) in call to 
polybori::CCuddInterface::apply(DdNode*(*)(DdManager*)) const is being passed 
extern "C" DdNode*(*)(DdManager*).
"polybori/include/CCuddNavigator.h", line 157: Error: iterator_traits is not a 
member of std.
"polybori/include/CCuddNavigator.h", line 157: Error: A declaration does not 
specify a tag or an identifier.
"polybori/include/CCuddNavigator.h", line 157: Error: Use ";" to terminate 
declarations.
"polybori/include/CCuddNavigator.h", line 157: Error: "}" expected instead of 
"<".
"polybori/include/CCuddNavigator.h", line 157: Error: Use ";" to terminate 
declarations.
"polybori/include/CCuddNavigator.h", line 157: Error: A declaration was 
expected 
instead of "<".
"polybori/include/CCuddNavigator.h", line 157: Error: "," expected instead of 
">".
"polybori/include/CCuddNavigator.h", line 159: Error: value_type is not defined.
"polybori/include/CCuddNavigator.h", line 163: Error: There must be an 
identifier to declare.
"polybori/include/CCuddNavigator.h", line 171: Error: "explicit" is not allowed 
here.
"polybori/include/CCuddNavigator.h", line 171: Error: ")" expected instead of 
"&".
"polybori/include/CCuddNavigator.h", line 174: Error: ")" expected instead of 
"&".
"polybori/include/CCuddNavigator.h", line 177: Error: Type name expected 
instead 
of "CCuddNavigator".
"polybori/include/CCuddNavigator.h", line 177: Error: Illegal number of 
arguments for ~file level().
"polybori/include/CCuddNavigator.h", line 180: Error: "," expected instead of 
"&".
"polybori/include/CCuddNavigator.h", line 183: Error: self is not defined.
"polybori/include/CCuddNavigator.h", line 183: Error: The function 
"thenBranch() 
const" cannot be declared const.
"polybori/include/CCuddNavigator.h", line 183: Error: Can only use this within 
a 
non-static member function.
"polybori/include/CCuddNavigator.h", line 183: Error: Only a function may be 
called.
"polybori/include/CCuddNavigator.h", line 183: Error: Only a function may be 
called.
"polybori/include/CCuddNavigator.h", line 186: Error: Multiple declaration for 
self.
"polybori/include/CCuddNavigator.h", line 186: Error: "," expected instead of 
"&".
"polybori/include/CCuddNavigator.h", line 189: Error: self is not defined.
"polybori/include/CCuddNavigator.h", line 189: Error: The function 
"elseBranch() 
const" cannot be declared const.
"polybori/include/CCuddNavigator.h", line 189: Error: Can only use this within 
a 
non-static member function.
Compilation aborted, too many Error messages.
scons: *** [polybori/src/BoolePolyRing.o] Error 1
scons: building terminated because of errors.
E

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to