#12825: Fine-tune auto-detection of whether to install GCC
----------------------------------+-----------------------------------------
       Reporter:  jdemeyer        |         Owner:  GeorgSWeber              
           Type:  defect          |        Status:  needs_review             
       Priority:  blocker         |     Milestone:  sage-5.0                 
      Component:  build           |    Resolution:                           
       Keywords:                  |   Work issues:                           
Report Upstream:  N/A             |     Reviewers:  Dan Drake, Leif Leonhardy
        Authors:  Jeroen Demeyer  |     Merged in:                           
   Dependencies:                  |      Stopgaps:                           
----------------------------------+-----------------------------------------

Old description:

> 1. GCC-4.7.x on ia64 is very broken.  We should install GCC in this case.
> Note that currently it won't actually work as MPIR and MPFR fail to build
> with gcc-4.7.x on ia64.  For MPIR, see #11616.
>
> 2. When Debian multiarch is detected, do not install GCC.  The stderr of
> "gcc -v -E -x c /dev/null" says:
> {{{
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2
> /lto-wrapper
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
> 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs
> --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-
> suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-
> defaults=x86_64-linux-gnu --enable-linker-build-id --with-system-zlib
> --libexecdir=/usr/lib/x86_64-linux-gnu --without-included-gettext
> --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5
> --libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/
> --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes
> --enable-plugin --enable-gold --enable-ld=default --with-plugin-
> ld=ld.gold --enable-objc-gc --disable-werror --with-arch-32=i686 --with-
> tune=generic --enable-checking=release --build=x86_64-linux-gnu
> --host=x86_64-linux-gnu --target=x86_64-linux-gnu
> Thread model: posix
> gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
> COLLECT_GCC_OPTIONS='-v' '-c' '-mtune=generic' '-march=x86-64'
>  /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1 -quiet -v
> /dev/null -D_FORTIFY_SOURCE=2 -quiet -dumpbase null -mtune=generic
> -march=x86-64 -auxbase null -version -fstack-protector -o /tmp/ccPmIBIJ.s
> GNU C (Ubuntu/Linaro 4.5.2-8ubuntu4) version 4.5.2 (x86_64-linux-gnu)
>         compiled by GNU C version 4.5.2, GMP version 4.3.2, MPFR version
> 3.0.0-p8, MPC version 0.9
> warning: MPFR header version 3.0.0-p8 differs from library version 3.0.0.
> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-
> heapsize=131072
> ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
> ignoring nonexistent directory "/usr/lib/x86_64-linux-gnu/gcc/x86_64
> -linux-gnu/4.5.2/../../../../../x86_64-linux-gnu/include"
> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/local/include
>  /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include
>  /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include-fixed
>  /usr/include/x86_64-linux-gnu
>  /usr/include
> End of search list.
> }}}
> We can detect the '/usr/include/x86_64-linux-gnu' line here.
>
> 3. Sage currently doesn't build with GCC-4.7.x, see #12751.
>
> '''Apply''' to SAGE_ROOT repository:
>  1. [attachment:12825_detect_gcc.patch]
>  2. [attachment:12825_change_include_grep.patch]

New description:

 1. GCC-4.7.x on ia64 is very broken.  We should install GCC in this case.
 Note that currently it won't actually work as MPIR and MPFR fail to build
 with gcc-4.7.x on ia64.  For MPIR, see #11616; for MPFR, see #12837.

 2. When Debian multiarch is detected, do not install GCC.  The stderr of
 "gcc -v -E -x c /dev/null" says:
 {{{
 Using built-in specs.
 COLLECT_GCC=gcc
 COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2
 /lto-wrapper
 Target: x86_64-linux-gnu
 Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs
 --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-
 suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-
 defaults=x86_64-linux-gnu --enable-linker-build-id --with-system-zlib
 --libexecdir=/usr/lib/x86_64-linux-gnu --without-included-gettext
 --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5
 --libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/ --enable-
 clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-
 plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold
 --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic
 --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
 --target=x86_64-linux-gnu
 Thread model: posix
 gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
 COLLECT_GCC_OPTIONS='-v' '-c' '-mtune=generic' '-march=x86-64'
  /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1 -quiet -v
 /dev/null -D_FORTIFY_SOURCE=2 -quiet -dumpbase null -mtune=generic
 -march=x86-64 -auxbase null -version -fstack-protector -o /tmp/ccPmIBIJ.s
 GNU C (Ubuntu/Linaro 4.5.2-8ubuntu4) version 4.5.2 (x86_64-linux-gnu)
         compiled by GNU C version 4.5.2, GMP version 4.3.2, MPFR version
 3.0.0-p8, MPC version 0.9
 warning: MPFR header version 3.0.0-p8 differs from library version 3.0.0.
 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
 ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
 ignoring nonexistent directory "/usr/lib/x86_64-linux-gnu/gcc/x86_64
 -linux-gnu/4.5.2/../../../../../x86_64-linux-gnu/include"
 #include "..." search starts here:
 #include <...> search starts here:
  /usr/local/include
  /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include
  /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/include-fixed
  /usr/include/x86_64-linux-gnu
  /usr/include
 End of search list.
 }}}
 We can detect the '/usr/include/x86_64-linux-gnu' line here.

 3. Sage currently doesn't build with GCC-4.7.x, see #12751.

 '''Apply''' to SAGE_ROOT repository:
  1. [attachment:12825_detect_gcc.patch]
  2. [attachment:12825_change_include_grep.patch]

--

Comment (by leif):

 Added a reference to the MPFR ticket (#12837, GCC 4.7.0 on ia64 issue).

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12825#comment:11>
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.

Reply via email to