Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#6528 closed defect (fixed)

[with spkg, positive review] PolyBoRi ignores CXX and passes Sun flags to GNU C compiler

Reported by: David Kirkby Owned by: tbd
Priority: major Milestone: sage-4.1.1
Component: porting: Solaris Keywords:
Cc: Merged in: Sage 4.1.1.alpha1
Authors: David Kirkby Reviewers: Minh Van Nguyen
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Kelvin Li)

I noticed a couple of issues with polybori-0.5rc.p8 on Solaris.

Note how on the first line, polybori uses the GNU C compiler gcc to compile a C file, but passes an unreconised option '-KPIC'. (That option would be acceptable to the Sun compiler).

Then on the very next line, it calls the Sun C++ compiler 'CC' to compile a .cc file! It sure gets in a mess!

gcc -o Cudd/epd/so_epd.o -c -std=c99 -O3 -Wno-long-long -Wreturn-type -g 
-fPIC -KPIC -DNDEBUG -DPACKED -DHAVE_M4RI -DHAVE_IEEE_754 -DBSD 
-I/rootpool2/local/kirkby/sage-4.1.rc1/spkg/build/polybori-0.5rc.p8/src/boost_1_34_1.cropped 
-I/rootpool2/local/kirkby/sage-4.1.rc1/local/include/python2.6 
-Ipolybori/include -ICudd/obj -ICudd/util -ICudd/cudd -ICudd/mtr 
-ICudd/st -ICudd/epd Cudd/epd/epd.c
gcc: unrecognized option '-KPIC'
/opt/SUNWspro/bin/CC -o polybori/src/so_BoolePolyRing.o -c -O3 
-Wno-long-long -Wreturn-type -g -fPIC -ftemplate-depth-100 -g -fPIC 
-KPIC -O3 -Wno-long-long -Wreturn-type -g -fPIC -KPIC -DNDEBUG -DPACKED 
-DHAVE_M4RI -DHAVE_IEEE_754 -DBSD 
-I/rootpool2/local/kirkby/sage-4.1.rc1/spkg/build/polybori-0.5rc.p8/src/boost_1_34_1.cropped 
-I/rootpool2/local/kirkby/sage-4.1.rc1/local/include/python2.6 
-Ipolybori/include -ICudd/obj -ICudd/util -ICudd/cudd -ICudd/mtr 
-ICudd/st -ICudd/epd polybori/src/BoolePolyRing.cc

When I type

$ ./sage -sh
$ env

I see:

SAGE_ROOT=/rootpool2/local/kirkby/sage-4.1.rc1
PYTHONHOME=/rootpool2/local/kirkby/sage-4.1.rc1/local
SAGE_PACKAGES=/rootpool2/local/kirkby/sage-4.1.rc1/spkg
CP=cp
LN=ln
CXX=g++

So given CXX is defined as g++,

It has been pointed out to me that #2999 noticed similar issues with a number of packages ignoring CC and CXX and had patch for polybori, but it was never integrated. Integration is very simple.

Another issue with PolyBoRi? is that it assumes the GNU linker - see my fix at #6437.

But there is a ticket related to updating PolyBoRi? to the latest upstream version too: #6177.

so I'll wait until I know what happening before applying patches against an old version of polybori which might be a waste of my time.

Change History (5)

comment:1 Changed 13 years ago by David Kirkby

I understand it's best to start a new 'p9' release, so here it is.

http://sage.math.washington.edu/home/kirkby/Solaris-fixes/polybori-0.5rc.p9-Second-try/polybori-0.5rc.p9.spkg directory with information is http://sage.math.washington.edu/home/kirkby/Solaris-fixes/polybori-0.5rc.p9-Second-try

This has been tested on both 't2' and my Sun Blade 2000.

dave

comment:2 Changed 13 years ago by Minh Van Nguyen

Summary: PolyBoRi ignores CXX and passes Sun flags to GNU C compiler.[with SPKG, needs review] PolyBoRi ignores CXX and passes Sun flags to GNU C compiler

I have checked in all changes in your name. The updated SPKG is up at

http://sage.math.washington.edu/home/mvngu/patch/polybori-0.5rc.p9.spkg

comment:3 Changed 13 years ago by Minh Van Nguyen

Summary: [with SPKG, needs review] PolyBoRi ignores CXX and passes Sun flags to GNU C compiler[with spkg, needs review] PolyBoRi ignores CXX and passes Sun flags to GNU C compiler

comment:4 Changed 13 years ago by Minh Van Nguyen

Merged in: Sage 4.1.1.alpha1
Resolution: fixed
Reviewers: Minh Van Nguyen
Status: newclosed
Summary: [with spkg, needs review] PolyBoRi ignores CXX and passes Sun flags to GNU C compiler[with spkg, positive review] PolyBoRi ignores CXX and passes Sun flags to GNU C compiler

The SPKG at

http://sage.math.washington.edu/home/mvngu/patch/polybori-0.5rc.p9.spkg

builds successfully on t2. (It also compiles OK on Linux.)

comment:5 Changed 12 years ago by Kelvin Li

Description: modified (diff)
Report Upstream: N/A
Note: See TracTickets for help on using tickets.