Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 43883 - dev-lang/R segfaults during compilation in modules/lapack
Summary: dev-lang/R segfaults during compilation in modules/lapack
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High blocker (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-06 08:45 UTC by Markus Luisser
Modified: 2004-03-18 23:20 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Luisser 2004-03-06 08:45:11 UTC
emerging dev-lang/R gives

-----------------%>-----------------
make[3]: Leaving directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/internet'
make[3]: Entering directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/lapack'
make[4]: Entering directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/lapack'
making Lapack.d from Lapack.c
make[4]: Leaving directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/lapack'
make[4]: Entering directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/lapack'
g77 -mieee-fp -fPIC  -g -O2 -c dlapack0.f -o dlapack0.lo
dlapack0.f: In subroutine `dlag2':
dlapack0.f:3014: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
make[4]: *** [dlapack0.lo] Error 1
make[4]: Leaving directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/lapack'
make[3]: *** [R] Error 2
make[3]: Leaving directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/lapack'
make[2]: *** [R] Error 1
make[2]: Leaving directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src'
make: *** [R] Error 1

!!! ERROR: dev-lang/R-1.8.0 failed.
!!! Function src_compile, Line 68, Exitcode 2
!!! (no error message)
-----------------%>-----------------

i'm not sure if the error is the the lapack code or in gcc...

Reproducible: Always
Steps to Reproduce:





Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 
2.6.0-test11-mm1) 
================================================================= 
System uname: 2.6.0-test11-mm1 i686 AMD Duron(tm) Processor 
Gentoo Base System version 1.4.3.13 
distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) 
[disabled] 
ccache version 2.3 [enabled] 
Autoconf: sys-devel/autoconf-2.58-r1 
Automake: sys-devel/automake-1.7.7 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer -ffast-math 
-funroll-loops -frerun-loop-opt" 
CHOST="i686-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" 
CXXFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer -ffast-math 
-funroll-loops -frerun-loop-opt"
Comment 1 Patrick Kursawe (RETIRED) gentoo-dev 2004-03-08 06:29:36 UTC
Can you reproduce exactly this error every time you try, or does it happen in various code lines?
Could you maybe retry with more conservative optimizations?
A third thought: If you want a math related package, do you really think -ffast-math is a good idea? This can result in incorrect calculations. 
Comment 2 Markus Luisser 2004-03-09 04:03:14 UTC
yep - the error is reproducible at this line - i also tried to go down with the flags:

----------------snip----------------
# CFLAGS="-march=athlon -O2" CXXFLAGS="-march=athlon -O2" emerge R
[...lots of output...]
gcc -I. -I../../../src/include -I../../../src/include -I/usr/local/include -DHAVE_CONFIG_H -D__NO_MATH_INLINES -mieee-fp -fPIC  -march=athlon -O2 -c sockconn.c -o sockconn.lo
gcc -shared -L/usr/local/lib -o internet.so  Rsock.lo internet.lo nanoftp.lo nanohttp.lo sock.lo sockconn.lo -L../../../bin -lR
make[5]: Entering directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/internet'
make[5]: Leaving directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/internet'
make[4]: Leaving directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/internet'
make[3]: Leaving directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/internet'
make[3]: Entering directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/lapack'
make[4]: Entering directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/lapack'
making Lapack.d from Lapack.c
make[4]: Leaving directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/lapack'
make[4]: Entering directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/lapack'
g77 -mieee-fp -fPIC  -g -O2 -c dlapack0.f -o dlapack0.lo
dlapack0.f: In subroutine `dlag2':
dlapack0.f:3014: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
make[4]: *** [dlapack0.lo] Error 1
make[4]: Leaving directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/lapack'
make[3]: *** [R] Error 2
make[3]: Leaving directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules/lapack'
make[2]: *** [R] Error 1
make[2]: Leaving directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src/modules'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/var/tmp/portage/R-1.8.0/work/R-1.8.0/src'
make: *** [R] Error 1

!!! ERROR: dev-lang/R-1.8.0 failed.
!!! Function src_compile, Line 68, Exitcode 2
!!! (no error message)
----------------snip----------------

But i didnt expect something other than this as gcc fails with 'g77' and for the fortran code the flags are differently anyway.

The thing about '-ffast-math' is a point - never thought much about it but as most of my calculations must hold true against measured values, i can live with the risk. So far i did not have any problems and i need every little bit of speed on this box :(

I'll reconsider however if ffastmath has influenced my system so much that i cannot emerge 'R' (perhaps glibc i borked?) - what do you propose?
Comment 3 Patrick Kursawe (RETIRED) gentoo-dev 2004-03-09 05:21:43 UTC
I'd like to know the settings of your USE flags first... what's the result of
emerge -pv R
on your system?
Comment 4 Markus Luisser 2004-03-09 05:49:28 UTC
# emerge -pv R

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N    ] dev-lang/R-1.8.0  +X -atlas -gnome +tcltk  0 kB

Comment 5 Markus Luisser 2004-03-11 22:56:46 UTC
i meanwhile emerged R on another box without the --ffast-math flag and had no problems. Unfortunately i cannot give you the configuration of the box now because shortly after i emerged my ISP let me down. When i remember correctly the USE flags and the rest of the CFLAGS are quite similar to this box. When i have access to the net again, i'll post the config of the working box if this helps you in any way.
Comment 6 Markus Luisser 2004-03-15 00:32:13 UTC
i'm getting segmentation faults for other packages too now - i more and more tend to think that something is wrong with the box - unless someone else reports this, please do not invest work here - i'll try to sort this out and keep you updated - may take a while though, compiling is slow here...
Comment 7 Markus Luisser 2004-03-18 23:20:37 UTC
Ok - yesterday night i managed to recover from a major filesystem crash just one day after the power supply died. As nobody else seems to have issues with this i blame the flaky hardware and close it.