#14429: Singular omalloc requires 8-byte alignment on SPARC
-------------------------------------------------------+--------------------
Reporter: jdemeyer | Owner:
drkirkby
Type: defect | Status:
positive_review
Priority: major | Milestone:
sage-5.9
Component: porting: Solaris | Resolution:
Keywords: SPARC alignment SIGBUS omalloc | Work issues:
Report Upstream: Reported upstream. No feedback yet. | Reviewers: Volker
Braun
Authors: Jeroen Demeyer | Merged in:
Dependencies: | Stopgaps:
-------------------------------------------------------+--------------------
Comment (by jpflori):
On Unix at least, gcc will look in /usr/local/include anyway:
http://gcc.gnu.org/onlinedocs/cpp/Search-Path.html or
http://gcc.gnu.org/onlinedocs/gcc-4.6.3/cpp/Search-Path.html#Search-Path;
so that's another point for not changing anything in Singular.
Note that without the -I/usr/local/include, then the headers which get
picked are in
{{{
/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-
solaris2.10/4.6.3/include-fixed/sys/feature_tests.h
}}}
This looks like a very nice directory to get headers from for the Sage's
gcc...
According to the above doc, adding an extra -I/usr/local/include should
not change the search path, but it apparently does.
And it seems that by default, the GCC Sage built does not look there (I
ran "gcc -E -v -" and it does not show /usr/local/include, only
/usr/include after three directorues under $SAGE_LOCAL).
* with the system-wide gcc:
{{{
gcc -E -v -
Reading specs from /usr/local/packages/gcc3/bin/../lib/gcc/sparc-sun-
solaris2.10/3.4.3/specs
Configured with:
/sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-
ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-
shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
/usr/local/packages/gcc3/bin/../libexec/gcc/sparc-sun-
solaris2.10/3.4.3/cc1 -E -quiet -v -iprefix
/usr/local/packages/gcc3/bin/../lib/gcc/sparc-sun-solaris2.10/3.4.3/ -
-mcpu=v7
ignoring nonexistent directory "/usr/local/packages/gcc3/bin/../lib/gcc
/sparc-sun-solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/include"
ignoring nonexistent directory "/usr/sfw/lib/gcc/sparc-sun-
solaris2.10/3.4.3/../../../../sparc-sun-solaris2.10/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/packages/gcc3/bin/../lib/gcc/sparc-sun-
solaris2.10/3.4.3/include
/usr/local/include
/usr/sfw/include
/usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/include
/usr/include
End of search list.
}}}
* with Sage's one:
{{{
gcc -E -v -
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/infres/post/flori/sage-5.9.beta3-infres2/local/libexec/gcc
/sparc-sun-solaris2.10/4.6.3/lto-wrapper
Target: sparc-sun-solaris2.10
Configured with: ../src/configure
--prefix=/infres/post/flori/sage-5.9.beta3-infres2/local --with-local-
prefix=/infres/post/flori/sage-5.9.beta3-infres2/local --with-
gmp=/infres/post/flori/sage-5.9.beta3-infres2/local --with-
mpfr=/infres/post/flori/sage-5.9.beta3-infres2/local --with-
mpc=/infres/post/flori/sage-5.9.beta3-infres2/local --with-system-zlib
--disable-multilib --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld
Thread model: posix
gcc version 4.6.3 (GCC)
COLLECT_GCC_OPTIONS='-E' '-v' '-mcpu=v9'
/infres/post/flori/sage-5.9.beta3-infres2/local/libexec/gcc/sparc-sun-
solaris2.10/4.6.3/cc1 -E -quiet -v -D__sparcv8 - -mcpu=v9
ignoring nonexistent directory
"/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-
solaris2.10/4.6.3/../../../../sparc-sun-solaris2.10/include"
ignoring duplicate directory
"/infres/post/flori/sage-5.9.beta3-infres2/local/include"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-
solaris2.10/4.6.3/include
/infres/post/flori/sage-5.9.beta3-infres2/local/include
/infres/post/flori/sage-5.9.beta3-infres2/local/lib/gcc/sparc-sun-
solaris2.10/4.6.3/include-fixed
/usr/include
End of search list.
}}}
On a Ubuntu install, with the system-wide gcc, it indeed looks in
/usr/local/include before the corresponding /usr/lib/gcc/x86_64-linux-
gnu/4.6/include-fixed (but after /usr/lib/gcc/x86_64-linux-
gnu/4.6/include).
In fact on the Solaris install, I guess the line correponding to
/usr/local/include is $SAGE_LOCAL/include when I run "gcc -E -v -" which
was defined so when Sage built GCC.
And in particular, none of these behaviors agree with GCC online doc, or
rather the /usr/local should be replaced by the prefix used when GCC was
built.
Indeed I have by default;
* "libdir"/gcc/"target"/"version"/include
* "prefix"/include
* "libdir"/gcc/"target"/"version"/include-fixed
* /usr/include/"target"
* /usr/include
On another ia64 system, the behavior is similar:
* with Sage's GCC
{{{
gcc -E -v -
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/jpflori/sage-5.7/local/libexec/gcc/ia64-unknown-
linux-gnu/4.6.3/lto-wrapper
Target: ia64-unknown-linux-gnu
Configured with: ../src/configure --prefix=/home/jpflori/sage-5.7/local
--with-local-prefix=/home/jpflori/sage-5.7/local --with-
gmp=/home/jpflori/sage-5.7/local --with-mpfr=/home/jpflori/sage-5.7/local
--with-mpc=/home/jpflori/sage-5.7/local --with-system-zlib --disable-
multilib
Thread model: posix
gcc version 4.6.3 (GCC)
COLLECT_GCC_OPTIONS='-E' '-v'
/home/jpflori/sage-5.7/local/libexec/gcc/ia64-unknown-linux-gnu/4.6.3/cc1
-E -quiet -v -
ignoring nonexistent directory "/home/jpflori/sage-5.7/local/lib/gcc/ia64
-unknown-linux-gnu/4.6.3/../../../../ia64-unknown-linux-gnu/include"
ignoring duplicate directory "/home/jpflori/sage-5.7/local/include"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
/home/jpflori/sage-5.7/local/lib/gcc/ia64-unknown-linux-gnu/4.6.3/include
/home/jpflori/sage-5.7/local/include
/home/jpflori/sage-5.7/local/lib/gcc/ia64-unknown-linux-gnu/4.6.3
/include-fixed
/usr/include
End of search list.
}}}
* with system-wide:
{{{
gcc -E -v -
Using built-in specs.
Target: ia64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-
languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4
--enable-shared --enable-multiarch --enable-linker-build-id --with-system-
zlib --libexecdir=/usr/lib --without-included-gettext --enable-
threads=posix --with-gxx-include-dir=/usr/include/c++/4.4
--libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-
debug --disable-libssp --enable-objc-gc --with-system-libunwind --enable-
checking=release --build=ia64-linux-gnu --host=ia64-linux-gnu
--target=ia64-linux-gnu
Thread model: posix
gcc version 4.4.5 (Debian 4.4.5-8)
COLLECT_GCC_OPTIONS='-E' '-v'
/usr/lib/gcc/ia64-linux-gnu/4.4.5/cc1 -E -quiet -v -
ignoring nonexistent directory "/usr/local/include/ia64-linux-gnu"
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/ia64-linux-
gnu/4.4.5/../../../../ia64-linux-gnu/include"
ignoring nonexistent directory "/usr/include/ia64-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/ia64-linux-gnu/4.4.5/include
/usr/lib/gcc/ia64-linux-gnu/4.4.5/include-fixed
/usr/include
End of search list.
}}}
So the real question is, is adding this -I/usr/local/include really
useful?
Shouldn't it rather be a user decision to add it if needed?
It seems most GCC are smart enough to correctly set their default include
path anyway, not sure what the comment in Singular sources in
Singular/Makefile.in is related to...
I'd like to say that if it does nothing on most systems, and just break my
system (although I agree its config is not perfect, but I cannot do
anything about that), then it's useless, but that would narrow minded.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14429#comment:22>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.