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

palp spkg ignores global CC and CFLAGS variables #7071

Closed
sagetrac-drkirkby mannequin opened this issue Sep 29, 2009 · 20 comments
Closed

palp spkg ignores global CC and CFLAGS variables #7071

sagetrac-drkirkby mannequin opened this issue Sep 29, 2009 · 20 comments

Comments

@sagetrac-drkirkby
Copy link
Mannequin

sagetrac-drkirkby mannequin commented Sep 29, 2009

Using

This is one of the many packages that ignore the setting of the variable CC.

palp-1.1.p1/src/GNUmakefile
palp-1.1.p1/src/mori.c
Finished extraction
****************************************************
Host system
uname -a:
SunOS swan 5.10 Generic_139555-08 sun4u sparc SUNW,Sun-Blade-1000
****************************************************
****************************************************
CC Version
/opt/xxxsunstudio12.1/bin/cc -v
usage: cc [ options] files.  Use 'cc -flags' for details
****************************************************
make[2]: Entering directory `/export/home/drkirkby/sage/sage-4.1.2.alpha4/spkg/build/palp-1.1.p1/src'
gcc -O3 -g -W -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE   -c -o poly.o poly.c
gcc -O3 -g -W -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE   -c -o Coord.o Coord.c
gcc -O3 -g -W -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE   -c -o Rat.o Rat.c
gcc -O3 -g -W -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE   -c -o Vertex.o Vertex.c

To update:

Depends on #12055

CC: @orlitzky

Component: build

Author: R. Andrew Ohana

Reviewer: Volker Braun

Merged: sage-5.0.beta7

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

@sagetrac-drkirkby sagetrac-drkirkby mannequin added this to the sage-5.0 milestone Sep 29, 2009
@ohanar

This comment has been minimized.

@ohanar
Copy link
Member

ohanar commented Feb 9, 2012

Author: R. Andrew Ohana

@ohanar
Copy link
Member

ohanar commented Feb 9, 2012

Attachment: palp-1.1.p4.patch.gz

for review purposes

@orlitzky
Copy link
Contributor

Work Issues: respect CFLAGS too

@orlitzky
Copy link
Contributor

comment:2

Can we pass CFLAGS, too? That will allow us to get rid of that horrible sed. Might as well fix the "xyes" test also

@vbraun
Copy link
Member

vbraun commented Feb 26, 2012

comment:3

Palp 2 is out and I have a preliminary spkg at #12055. Please base your work on the new version.

@ohanar
Copy link
Member

ohanar commented Feb 27, 2012

comment:4

ok, I've based my changes off of the new version at #12055 and have made CFLAGS respected as well.

@ohanar

This comment has been minimized.

@ohanar
Copy link
Member

ohanar commented Feb 27, 2012

Dependencies: #12055

@ohanar ohanar changed the title palp-1.1.p1 ignores CC variable and uses gcc, so fails with Sun Studio. palp spkg ignores global CC and CFLAGS variables Feb 27, 2012
@ohanar
Copy link
Member

ohanar commented Feb 27, 2012

Attachment: palp-2.0.p1.patch.gz

for review purposes

@vbraun
Copy link
Member

vbraun commented Feb 27, 2012

Changed work issues from respect CFLAGS too to none

@vbraun
Copy link
Member

vbraun commented Feb 27, 2012

comment:5

Looks good!

@vbraun
Copy link
Member

vbraun commented Feb 27, 2012

Reviewer: Volker Braun

@vbraun
Copy link
Member

vbraun commented Feb 27, 2012

Patch from #12055 needs to be applied

@vbraun
Copy link
Member

vbraun commented Feb 27, 2012

comment:6

Attachment: trac-12055-SAGELOCAL_BIN.patch.gz

I've switched the old ticket #12055 to invalid to not make Jeroen replace the spkg twice. But we still need the patch to the Sage library from there.

@vbraun

This comment has been minimized.

@sagetrac-drkirkby
Copy link
Mannequin Author

sagetrac-drkirkby mannequin commented Feb 28, 2012

comment:7

Replying to @orlitzky:

Can we pass CFLAGS, too? That will allow us to get rid of that horrible sed. Might as well fix the "xyes" test also

The "xyes" test, as it is called above, is the safest, most portable way to test for a string, as other methods, like the proposed change, can fail under obscure conditions. One might argue they don't fail with modern versions of bash, but IMHO is it worthwhile to write scripts which will always work under all conditions. The original code will always work - the proposed change is less portable. I suggest you take a look at the scripts created by autoconf. You will find they use a similar method to what was in Sage, as it is known to always work.

As such, I believe the change is a retrograde step.

Dave

@vbraun
Copy link
Member

vbraun commented Mar 2, 2012

comment:9

I disagree. The xblah test makes it more difficult to read the test, which both increases the chance for errors as well as the long-term maintenance effort.

A quick survey shows that at least half of the Sage spkgs use the simplified test, so clearly nobody has yet encountered a shell ancient enough to not work. I'm pretty sure many upstream sources use simplified tests, too, so there is basically no hope of ever compiling Sage on such a system without installing a shell that isn't from the middle ages. Autotools output really is a totally different issue, since their scripts are autogenerated readability is not an issue (and usually is pretty bad, in fact).

If you disagree we can discuss this on the sage-devel, but its such a pervasive issue throughout Sage that it doesn't really matter if we use the simplified test in one spkg more or less.

@jdemeyer

This comment has been minimized.

@jdemeyer
Copy link

jdemeyer commented Mar 4, 2012

Merged: sage-5.0.beta7

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

4 participants