#13150: Create an optional GCC-4.7.1 package
-------------------------------------+--------------------------------------
Reporter: jdemeyer | Owner: tbd
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.3
Component: optional packages | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Jeroen Demeyer | Merged in:
Dependencies: | Stopgaps:
-------------------------------------+--------------------------------------
Comment (by leif):
FWIW, R 2.14.0 still fails to build (segfault when byte-compiling package
"base") with GCC 4.7.1 and `-O3`, like it did with [FSF GCC] 4.7.0, at
least on Ubuntu x86_64.
[[BR]]
More related to this ticket (or the GCC spkg in general), ECL somehow gets
confused if the "native" GCC has libffi, and fails to build because the
spkg's GCC doesn't provide it (and ECL doesn't build its own either).
But maybe my installation is somehow "messed up", or at least untypical:
While `ffi.h` is located in `/usr/lib/gcc/x86_64-linux-
gnu/4.{6.3,7.0}/include/`, the libraries (including unversioned `.so`s)
are installed in `/usr/{lib,lib32}/`; the original Ubuntu GCC 4.4.3
doesn't come with libffi.
Ah, while writing, I did again take a closer look at the build logs...
The following should certainly get fixed:
{{{
...
checking for gcc... 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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C preprocessor... cpp-4.7.0
...
checking for ffi_closure_alloc in -lffi... yes
checking ffi/ffi.h usability... no
checking ffi/ffi.h presence... no
checking for ffi/ffi.h... no
checking ffi.h usability... no
checking ffi.h presence... yes
configure: WARNING: ffi.h: present but cannot be compiled
configure: WARNING: ffi.h: check for missing prerequisite headers?
configure: WARNING: ffi.h: see the Autoconf documentation
configure: WARNING: ffi.h: section "Present But Cannot Be Compiled"
configure: WARNING: ffi.h: proceeding with the preprocessor's result
configure: WARNING: ffi.h: in the future, the compiler will take
precedence
checking for ffi.h... yes
checking whether we can use the existing libffi library ... yes
...
gcc -DECLDIR="\"${SAGE_ROOT}/local/lib/ecl-11.1.1\"" -I.
-I${SAGE_ROOT}/spkg/build/ecl-11.1.2.cvs20111120.p1/src/build
-I${SAGE_ROOT}/spkg/build/ecl-11.1.2.cvs20111120.p1/src/src/c -I../ecl/gc
-DECL_API -DECL_NO_LEGACY -march=native -O3 -DHONORS_CPPFLAGS
-I${SAGE_ROOT}/local/include -I${SAGE_ROOT}/local/include -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -g -O2 -march=native -O3 -fno-strict-aliasing
-DHONORS_CFLAGS -fPIC -Dlinux -c -o ffi.o ffi.o.c
In file included from
${SAGE_ROOT}/spkg/build/ecl-11.1.2.cvs20111120.p1/src/build/ecl/ecl.h:35:0,
from
${SAGE_ROOT}/spkg/build/ecl-11.1.2.cvs20111120.p1/src/src/c/ffi.d:18:
${SAGE_ROOT}/spkg/build/ecl-11.1.2.cvs20111120.p1/src/build/ecl/config.h:525:17:
fatal error: ffi.h: No such file or directory
compilation terminated.
make[2]: *** [ffi.o] Error 1
make[2]: Leaving directory
`${SAGE_ROOT}/spkg/build/ecl-11.1.2.cvs20111120.p1/src/build/c'
make[1]: *** [libeclmin.a] Error 2
make[1]: Leaving directory
`${SAGE_ROOT}/spkg/build/ecl-11.1.2.cvs20111120.p1/src/build'
make: *** [all] Error 2
Error - Failed to build ECL ... exiting
}}}
(Note the `CPP` setting; `gcc` is `$SAGE_ROOT/local/bin/gcc`.)
It's rather luck that only the ECL spkg is affected; we should either set
`CPP` properly or unset it (before `sage-env` is called) if we're using
Sage's GCC.
Similar is probably true for `FC`, `F77` etc.:
{{{
#!sh
$ ./sage --sh -c 'env | egrep -w "CC|CPP|CXX|FC|F77"'
CPP=cpp-4.7.0
F77=gfortran-4.7.0
CXX=g++
FC=gfortran-4.7.0
CC=gcc
}}}
(I don't set `F95` and the like, others may perhaps.)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13150#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.