Opened 13 years ago

Closed 13 years ago

Last modified 9 years ago

#2575 closed defect (fixed)

[with spkg, with positive review] GAP doesn't compile with CC='ccache gcc'

Reported by: schilly Owned by: mabshoff
Priority: blocker Milestone: sage-3.0.3
Component: build Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

i'm using ccache to speed up compilation. this works very well for other packages, but the configure script of GAP seems to be have an error.

environment variables:

CC=ccache gcc
CXX=ccache g++

GAP message:

Host system
uname -a:
Linux edoras 2.6.15-51-686 #1 SMP PREEMPT Tue Feb 12 16:59:15 UTC 2008 i686 GNU/Linux
****************************************************
****************************************************
GCC Version
gcc -v
Es werden eingebaute Spezifikationen verwendet.
Ziel: i486-linux-gnu
Konfiguriert mit: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --with-tune=pentium4 --enable-checking=release i486-linux-gnu
Thread-Modell: posix
gcc-Version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
****************************************************
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... ccache gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether ccache gcc accepts -g... yes
checking for ccache gcc option to accept ANSI C... none needed
checking whether make sets $(MAKE)... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sysinfo.gap
config.status: creating bin/gap.sh
Building and installing gap-4.4.10
make[1]: Betrete Verzeichnis '/local/scratch/schilly/sage/spkg/build/gap-4.4.10.p2/src'
if test ! -d bin;  then mkdir bin;  fi
if test ! -d bin/i686-pc-linux-gnu-ccache;  then mkdir bin/i686-pc-linux-gnu-ccache;  fi
cp cnf/configure.out bin/i686-pc-linux-gnu-ccache/configure
( cd bin/i686-pc-linux-gnu-ccache ; CC='ccache gcc' ./configure --target=i686-pc-linux-gnu --prefix=/local/scratch/schilly/sage/local PREFIX=/local/scratch/schilly/sage/local CC=ccache gcc CXX=ccache g++ )
configure: WARNING: you should use --build, --host, --target
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: g++  
checking for gcc-gcc... ccache
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
make[1]: *** [bin/i686-pc-linux-gnu-ccache/Makefile] Fehler 77
Error building gap.

my guess:

configure script, line 2293: BASECC=`basename ${CC}`

Attachments (1)

config.log (7.3 KB) - added by schilly 13 years ago.
config.log produced by the configure process, for debugging, see BASECC variable

Download all attachments as: .zip

Change History (14)

Changed 13 years ago by schilly

config.log produced by the configure process, for debugging, see BASECC variable

comment:1 Changed 13 years ago by schilly

just fo the record, problem still exists in 3.0 - this time the build process doesn't halt but continues (no info about failed gap).

after ./sage startup it raises a runtime exception complaining about broken gap.

comment:2 Changed 13 years ago by mabshoff

  • Milestone changed from sage-3.0.4 to sage-3.0.3
  • Status changed from new to assigned

This has now popped up in other places. For now the short term solution is to unset CC in spkg-install. More long term we need to fix the autoconf issue and/or report this bug upstream.

Cheers,

Michael

comment:3 Changed 13 years ago by mabshoff

  • Summary changed from GAP doesn't compile with CC='ccache gcc' to [with spkg, needs review] GAP doesn't compile with CC='ccache gcc'

There is an updated spkg which should fix the issue at

http://sage.math.washington.edu/home/mabshoff/release-cycles-3.0.3/rc0/gap-4.4.10.p8.spkg

Cheers,

Michael

comment:4 Changed 13 years ago by gfurnish

  • Summary changed from [with spkg, needs review] GAP doesn't compile with CC='ccache gcc' to [with spkg, with positive review] GAP doesn't compile with CC='ccache gcc'

comment:5 Changed 13 years ago by mabshoff

  • Resolution set to fixed
  • Status changed from assigned to closed

Merged in Sage 3.0.3.rc0

comment:6 Changed 13 years ago by schilly

  • Milestone changed from sage-3.0.3 to sage-3.1.3
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Summary changed from [with spkg, with positive review] GAP doesn't compile with CC='ccache gcc' to [regression] GAP doesn't compile with CC='ccache gcc'

it doesn't work with 4.4.10 in sage 3.1.2/src

checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for void *... yes
checking size of void *... 4
checking for nm... nm
checking whether symbols begin with an underscore... no
checking build system type... Invalid configuration `g++': machine `g++' not recognized
configure: error: /bin/bash ../../src/../cnf/config.sub g++ failed
make[1]: *** [bin/i686-pc-linux-gnu-gcc/Makefile] Error 1
make[1]: Leaving directory `/opt/sage/sage-src/spkg/build/gap-4.4.10.p9/src'
Error building gap.
CXX=ccache g++
CC=ccache gcc

unsetting those variables and the configure script works.

comment:7 Changed 13 years ago by mabshoff

  • Milestone changed from sage-3.1.3 to sage-3.0.3
  • Resolution set to fixed
  • Status changed from reopened to closed

We do not reopen tickets that have been fixed. This is not a regression, but the problem is that you set CXX in addition to CC. Unsetting CXX in the spkg-install will fix your problem, but for that open another ticket.

Cheers,

Michael

comment:8 Changed 13 years ago by mabshoff

  • Summary changed from [regression] GAP doesn't compile with CC='ccache gcc' to [with spkg, with positive review] GAP doesn't compile with CC='ccache gcc'

comment:9 Changed 13 years ago by mabshoff

Harald,

I now see that your original bug report also raises the issue with CXX, but since we hit this bug on another machine with CC and not CXX set we ended up fixing only the CXX case. You should still open a new ticket and not open old tickets for issues like that since it will muddy HISTORY.txt, i.e. fixing #2575 twice will only confuse people looking for specific tickets. Also resolving those tickets is messy since the comments on this ticket are already long. So a clean new ticket will solve all those problems.

Cheers,

Michael

comment:10 Changed 11 years ago by drkirkby

  • Report Upstream set to N/A

Perhaps striping 'ccache' out with 'sed' might have been a better solution.

comment:11 follow-up: Changed 11 years ago by schilly

this ticket is already closed & fixed since it works. Is there a new compile problem? (If yes -> new ticket)

for me ccache works!

And stripping stuff out is probably not so cool, since it disables ccache ;)

comment:12 in reply to: ↑ 11 ; follow-up: Changed 9 years ago by leif

Replying to schilly:

And stripping stuff out is probably not so cool, since it disables ccache ;)

Unsetting CC and CXX (as is currently done) also disables it. ;-)

If GAP still fails to configure / build when CC or CXX contain multiple words, we should probably unset CC and CXX just in that case, since currently even CC=gcc-4.6.3 etc. are broken, and if the "default" gcc doesn't understand the flags intended for $CC, the build fails for no real reason.

comment:13 in reply to: ↑ 12 Changed 9 years ago by leif

Replying to leif:

If GAP still fails to configure / build when CC or CXX contain multiple words, we should probably unset CC and CXX just in that case [...]

For the record: My GAP 4.4.12.p7 spkg for #7041 will just do that.

Note: See TracTickets for help on using tickets.