Opened 13 years ago

Closed 12 years ago

#3001 closed defect (fixed)

[with patch, positive review] sage ignores custom environment variables

Reported by: dfdeshom Owned by: mabshoff
Priority: critical Milestone: sage-4.1.1
Component: build Keywords:
Cc: Merged in: Sage 4.1.1.alpha1
Authors: Dan Drake Reviewers: William Stein
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

In sage-spkg "gcc -v" is used, instead of "${CC-gcc} -v". Easy fix:

---------------------------------------------------------------
--- a/sage-spkg Mon Apr 21 01:43:53 2008 -0700
+++ b/sage-spkg Tue Apr 22 12:37:48 2008 -0300
@@ -241,8 +241,8 @@

 echo "****************************************************"
 echo "GCC Version"
-echo "gcc -v"
-gcc -v
+echo "${CC-gcc} -v"
+${CC-gcc} -v
 if [ $? -ne 0 ]; then
   echo "Unable to determine gcc version."
 fi
---------------------------------------------------------------

In sage-env, tests if CC is gcc, which means "CC=gcc-4.3" might not work exactly the same as if gcc is a symlink to gcc-4.3, for instance:

if [ "$SAGE64" = "yes" -a CC = "gcc" ]; then
  CFLAGS="$CFLAGS -m64"
fi

Attachments (1)

trac_3001.patch (700 bytes) - added by ddrake 12 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 13 years ago by mabshoff

  • Status changed from new to assigned

comment:2 Changed 13 years ago by mabshoff

After thinking about this a little more: ${CC-gcc} is gcc specific and we can no longer assume that we are compiling with gcc in the first place. Hence I would like to suggest that we use CC and CXX in those places and make sure in sage-env that they are set.

Cheers,

Michael

Changed 12 years ago by ddrake

comment:3 Changed 12 years ago by ddrake

  • Summary changed from sage ignores custom environment variables to [with patch, needs review] sage ignores custom environment variables

I also noticed that the sage_scripts spkg has an uncommitted change (from #6248), and a couple files that aren't checked in that perhaps should be. Whoever merges this patch should also take care of those little issues.

comment:4 Changed 12 years ago by was

  • Summary changed from [with patch, needs review] sage ignores custom environment variables to [with patch, positive review] sage ignores custom environment variables

comment:5 Changed 12 years ago by mvngu

  • Authors set to Dan Drake
  • Merged in set to Sage 4.1.1.alpha1
  • Resolution set to fixed
  • Reviewers set to William Stein
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.