Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PolyBoRi ignores CXX and passes Sun flags to GNU C compiler #6528

Closed
sagetrac-drkirkby mannequin opened this issue Jul 14, 2009 · 6 comments
Closed

PolyBoRi ignores CXX and passes Sun flags to GNU C compiler #6528

sagetrac-drkirkby mannequin opened this issue Jul 14, 2009 · 6 comments

Comments

@sagetrac-drkirkby
Copy link
Mannequin

sagetrac-drkirkby mannequin commented Jul 14, 2009

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.

Component: porting: Solaris

Author: David Kirkby

Reviewer: Minh Van Nguyen

Merged: Sage 4.1.1.alpha1

Issue created by migration from https://trac.sagemath.org/ticket/6528

@sagetrac-drkirkby sagetrac-drkirkby mannequin added this to the sage-4.1.1 milestone Jul 14, 2009
@sagetrac-drkirkby
Copy link
Mannequin Author

sagetrac-drkirkby mannequin commented Jul 22, 2009

comment:1

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

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 23, 2009

comment:2

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

@sagetrac-mvngu sagetrac-mvngu mannequin changed the title PolyBoRi ignores CXX and passes Sun flags to GNU C compiler. [with SPKG] PolyBoRi ignores CXX and passes Sun flags to GNU C compiler Jul 23, 2009
@sagetrac-mvngu sagetrac-mvngu mannequin changed the title [with SPKG] PolyBoRi ignores CXX and passes Sun flags to GNU C compiler PolyBoRi ignores CXX and passes Sun flags to GNU C compiler Jul 24, 2009
@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 24, 2009

Merged: Sage 4.1.1.alpha1

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 24, 2009

Reviewer: Minh Van Nguyen

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jul 24, 2009

comment:4

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.)

@sagetrac-ltw

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants