Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to test Gcc (.c, cc, cxx, etc) ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 527

PostPosted: Sun Apr 11, 2010 12:07 pm    Post subject: how to test Gcc (.c, cc, cxx, etc) ? Reply with quote

hello
trying to emerge cmake is returning "compiler internal segmentation fault"
that makes me thinking my devchain may be broken

i say "it may be" 'cause i had success about emerging a lot of things with the same devchain




Quote:

2010-03-28--09-18---2010-03-28--22-50 - emerge =sys-devel/gcc-4.1.2 - success - root
2010-04-02--10-36---2010-04-02--10-52 - emerge sys-apps/sandbox - success - root
-----------------------------------------------------------------------------------------
2010-04-02--16-25---2010-04-02--16-31 - emerge =x11-misc/util-macros-1.5.0 - success - root
2010-04-02--16-31---2010-04-02--17-07 - emerge =dev-libs/libxslt-1.1.26 - success - root
2010-04-02--17-07---2010-04-02--17-13 - emerge =x11-proto/xproto-7.0.16 - success - root
2010-04-02--17-13---2010-04-02--17-20 - emerge =x11-libs/xtrans-1.2.5 - success - root
2010-04-02--17-20---2010-04-02--17-26 - emerge =x11-proto/inputproto-1.5.1 - success - root
2010-04-02--17-26---2010-04-02--17-32 - emerge =x11-proto/kbproto-1.0.4 - success - root
2010-04-02--17-32---2010-04-02--17-38 - emerge =x11-proto/bigreqsproto-1.1.0 - success - root
2010-04-02--17-38---2010-04-02--17-44 - emerge =x11-proto/xcmiscproto-1.2.0 - success - root
2010-04-02--17-44---2010-04-02--17-49 - emerge =x11-proto/xf86bigfontproto-1.2.0 - success - root
2010-04-02--17-49---2010-04-02--17-55 - emerge =x11-proto/xcb-proto-1.5 - success - root
2010-04-02--17-55---2010-04-02--18-04 - emerge =dev-libs/libpthread-stubs-0.1 - success - root
2010-04-02--18-04---2010-04-02--18-10 - emerge =x11-proto/xextproto-7.0.5 - success - root
2010-04-02--18-10---2010-04-02--18-18 - emerge =x11-libs/libXau-1.0.5 - success - root
2010-04-02--18-18---2010-04-02--18-28 - emerge =x11-libs/libXdmcp-1.0.3 - success - root
2010-04-02--18-28---2010-04-02--18-40 - emerge =x11-libs/libICE-1.0.6 - success - root
2010-04-02--18-40---2010-04-02--19-09 - emerge =x11-libs/libxcb-1.4-r1 - success - root
2010-04-02--19-09---2010-04-02--19-20 - emerge =x11-libs/libSM-1.1.1 - success - root
2010-04-03--00-23---2010-04-03--02-27 - emerge =x11-libs/libXt-1.0.7-r1 - success - root
2010-04-03--02-27---2010-04-03--02-40 - emerge =x11-libs/libXext-1.0.5 - success - root
2010-04-03--02-40---2010-04-03--02-56 - emerge =x11-libs/libXpm-3.5.8 - success - root
2010-04-03--02-56---2010-04-03--03-22 - emerge =media-libs/gd-2.0.35-r1 - success - root
2010-04-03--21-38---2010-04-03--23-11 - emerge =x11-libs/libX11-1.2.2 - success - root
2010-04-04--12-31---2010-04-04--14-29 - emerge =media-gfx/graphviz-2.26.0 - success - root
2010-04-11--10-02---2010-04-11--12-09 - emerge dev-libs/glib - success - root



2010-04-11--12-12---2010-04-11--13-05 - emerge dev-util/cmake - failure - root


/var/tmp/portage/dev-util/cmake-2.8.0-r3/work/cmake-2.8.0/Source/cmFindCommon.cxx: In member function 'bool cmFindCommon::CheckCommonArgument(const std::string&)':
/var/tmp/portage/dev-util/cmake-2.8.0-r3/work/cmake-2.8.0/Source/cmFindCommon.cxx:286: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.
gmake: *** [cmBootstrapCommands.o] Error 1




so ... i need a way to know if the dev chain is broken or it is not

gcc is a part of devchain, it's the most important part, so i have to test it first

how to test c-compiler, c++ compiler, cxx(?) compiler, etc ?

gcc is a suite of languages/compilers, actually i have all of these languages enabled in my devchain
--enable-languages=c,c++,java,treelang,fortran

so, i'd like to test all of them


any idea ?
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 7416
Location: Somewhere over Atlanta, Georgia

PostPosted: Sun Apr 11, 2010 12:31 pm    Post subject: Reply with quote

Maybe by compiling something? :wink:
Code:
graham@ceres ~ $ echo "#include <stdio.h>
int main(void) { printf(\"Hello, world.\\n\"); return 0; }" >test.c
jgraham@ceres ~ $ gcc test.c
jgraham@ceres ~ $ ./a.out
Hello, world.
jgraham@ceres ~ $ g++ test.c
jgraham@ceres ~ $ ./a.out
Hello, world.
That takes care of the C and C++ compilers. Let's concentrate on those since cmake (probably) doesn't use anything else. If that works, next thing, is the cmake build failure repeatable? Just start your emerge again & see if it fails in exactly the same place. If not, sorry to say, this is sometimes an indication of a hardware issue.

- John
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 527

PostPosted: Sun Apr 11, 2010 7:36 pm    Post subject: Reply with quote

well, just compiling "hello world" code is not enough to test a dev chain

anyway, i got the same error at the same place: segmentation fault

i suspect something bad about sandbox, or swap
(any other reason for a segmentation fault ?
i mean ... segmentation fault can also occur under following circumstances:

a) A buggy program / command, which can be only fixed by applying patch.
b) It can also appear when you try to access an array beyond the end of an array under C programming.
c) Inside a chrooted jail this can occur when critical shared libs, config file or /dev/ entry missing.
d) Sometime hardware or faulty memory or driver can also create problem.
e) Maintain suggested environment for all computer equipment (overheating can also generate this problem)


i am thinking about a) what could be buggy?

b) is not probable about binutils
c) i am not chrooted
d) hw seems to be right ... anyway i've never got any strange behaving, and i have emerged gcc, which takes 2-no-stop days
e) i do not suspect about any overheating, the compiling machine is a PDA

)


also, i emerge glibc and gcc without any issue, but now i got this

Quote:
utils-2.19.1-r1/image/${thd}; \
for h in /var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/binutils-2.19.1/libiberty/../include/ansidecl.h /var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/binutils-2.19.1/libiberty/../include/demangle.h /var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/binutils-2.19.1/libiberty/../include/dyn-string.h /var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/binutils-2.19.1/libiberty/../include/fibheap.h /var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/binutils-2.19.1/libiberty/../include/floatformat.h /var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/binutils-2.19.1/libiberty/../include/hashtab.h /var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/binutils-2.19.1/libiberty/../include/libiberty.h /var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/binutils-2.19.1/libiberty/../include/objalloc.h /var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/binutils-2.19.1/libiberty/../include/partition.h /var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/binutils-2.19.1/libiberty/../include/safe-ctype.h /var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/binutils-2.19.1/libiberty/../include/sort.h /var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/binutils-2.19.1/libiberty/../include/splay-tree.h; do \
/usr/bin/install -c -m 644 $h /var/tmp/portage/sys-devel/binutils-2.19.1-r1/image/${thd}; \
done; \
fi
make[3]: Entering directory `/var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/build/libiberty/testsuite'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/build/libiberty/testsuite'
make[2]: Leaving directory `/var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/build/libiberty'
make[1]: Nothing to be done for `install-target'.
make[1]: Leaving directory `/var/tmp/portage/sys-devel/binutils-2.19.1-r1/work/build'
>>> Completed installing binutils-2.19.1-r1 into /var/tmp/portage/sys-devel/binutils-2.19.1-r1/image/

strip: armv5tel-softfloat-linux-gnueabi-strip --strip-unneeded -R .comment
usr/armv5tel-softfloat-linux-gnueabi/binutils-bin/2.19.1/objcopy
usr/armv5tel-softfloat-linux-gnueabi/binutils-bin/2.19.1/ld
usr/armv5tel-softfloat-linux-gnueabi/binutils-bin/2.19.1/strip
usr/armv5tel-softfloat-linux-gnueabi/binutils-bin/2.19.1/c++filt
usr/armv5tel-softfloat-linux-gnueabi/binutils-bin/2.19.1/size
usr/armv5tel-softfloat-linux-gnueabi/binutils-bin/2.19.1/ranlib
usr/armv5tel-softfloat-linux-gnueabi/binutils-bin/2.19.1/as
usr/armv5tel-softfloat-linux-gnueabi/binutils-bin/2.19.1/addr2line
usr/armv5tel-softfloat-linux-gnueabi/binutils-bin/2.19.1/ar
usr/armv5tel-softfloat-linux-gnueabi/binutils-bin/2.19.1/gprof
usr/armv5tel-softfloat-linux-gnueabi/binutils-bin/2.19.1/nm
usr/armv5tel-softfloat-linux-gnueabi/binutils-bin/2.19.1/strings
usr/armv5tel-softfloat-linux-gnueabi/binutils-bin/2.19.1/readelf
usr/armv5tel-softfloat-linux-gnueabi/binutils-bin/2.19.1/objdump
usr/lib/binutils/armv5tel-softfloat-linux-gnueabi/2.19.1/libbfd-2.19.1.so
usr/lib/binutils/armv5tel-softfloat-linux-gnueabi/2.19.1/libopcodes-2.19.1.so
usr/lib/binutils/armv5tel-softfloat-linux-gnueabi/2.19.1/libopcodes.a
usr/lib/binutils/armv5tel-softfloat-linux-gnueabi/2.19.1/libbfd.a
usr/lib/binutils/armv5tel-softfloat-linux-gnueabi/2.19.1/libiberty.a
ecompressdir: bzip2 -9 /usr/share/binutils-data/armv5tel-softfloat-linux-gnueabi/2.19.1/man

* QA Notice: The following files contain writable and executable sections
* Files with such sections will not work properly (or at all!) on some
* architectures/operating systems. A bug should be filed at
* http://bugs.gentoo.org/ to make sure the issue is fixed.
* For more information, see http://hardened.gentoo.org/gnu-stack.xml
* Please include the following list of files in your report:
* Note: Bugs should be filed for the respective maintainers
* of the package in question and not hardened@g.o.
* !WX --- --- usr/lib/binutils/armv5tel-softfloat-linux-gnueabi/2.19.1/libopcodes.a:arm-dis.o


>>> Installing (1 of 1) sys-devel/binutils-2.19.1-r1
Segmentation fault



compiler has finished his job
but something bad happened at the "install stage"

the question is: why ?
maybe sandbox bug ? maybe optimization cflag ?

what could be wrong ?
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 527

PostPosted: Mon Apr 12, 2010 8:24 am    Post subject: Reply with quote

Quote:
ecompressdir: bzip2 -9 /usr/share/binutils-data/armv5tel-softfloat-linux-gnueabi/2.19.1/man

* QA Notice: The following files contain writable and executable sections
* Files with such sections will not work properly (or at all!) on some
* architectures/operating systems. A bug should be filed at
* http://bugs.gentoo.org/ to make sure the issue is fixed.
* For more information, see http://hardened.gentoo.org/gnu-stack.xml
* Please include the following list of files in your report:
* Note: Bugs should be filed for the respective maintainers
* of the package in question and not hardened@g.o.
* !WX --- --- usr/lib/binutils/armv5tel-softfloat-linux-gnueabi/2.19.1/libopcodes.a:arm-dis.o





what does it means ?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum