From daniel_wong80 at yahoo.com.sg  Wed Oct 12 09:59:41 2005
From: daniel_wong80 at yahoo.com.sg (Daniel Wong)
Date: Wed, 12 Oct 2005 15:59:41 +0800 (CST)
Subject: [Rd] make check seg faults at base-Ex.R [was Re: Compile problem R
	2.2.0 + Solaris 10 x86]
In-Reply-To: <Pine.LNX.4.61.0510111923150.25793@gannet.stats>
Message-ID: <20051012075942.7799.qmail@web35110.mail.mud.yahoo.com>

Hi Prof Ripley,

The "problem" seems to go away by using gmake instead
of /usr/ccs/bin/make. Compilation is successful, but
now, I get core dump during make check.

==========================
gmake[1]: Entering directory
`/tmp/apps/R-2.2.0-32/tests'
gmake[2]: Entering directory
`/tmp/apps/R-2.2.0-32/tests'
gmake[3]: Entering directory
`/tmp/apps/R-2.2.0-32/tests/Examples'
gmake[4]: Entering directory
`/tmp/apps/R-2.2.0-32/tests/Examples'
gmake[4]: Leaving directory
`/tmp/apps/R-2.2.0-32/tests/Examples'
gmake[4]: Entering directory
`/tmp/apps/R-2.2.0-32/tests/Examples'
collecting examples for package 'base' ...
gmake[5]: Entering directory
`/tmp/apps/R-2.2.0-32/src/library'
 >>> Building/Updating help pages for package 'base'
     Formats: text html latex example
gmake[5]: Leaving directory
`/tmp/apps/R-2.2.0-32/src/library'
running code in 'base-Ex.R' .../bin/bash: line 1:
24337 Segmentation Fault      (core dumped)
../../bin/R
 --vanilla <base-Ex.R >base-Ex.Rout 2>&1
gmake[4]: *** [base-Ex.Rout] Error 1
gmake[4]: Leaving directory
`/tmp/apps/R-2.2.0-32/tests/Examples'
gmake[3]: *** [test-Examples-Base] Error 2
gmake[3]: Leaving directory
`/tmp/apps/R-2.2.0-32/tests/Examples'
gmake[2]: *** [test-Examples] Error 2
gmake[2]: Leaving directory
`/tmp/apps/R-2.2.0-32/tests'
gmake[1]: *** [test-all-basics] Error 1
gmake[1]: Leaving directory
`/tmp/apps/R-2.2.0-32/tests'
gmake: *** [check] Error 2
==========================

Stack trace of core file:
==========================
# pstack tests/Examples/core
core 'tests/Examples/core' of 24337:   
/tmp/apps/R-2.2.0-32/bin/exec/R --vanilla
 08107de4 RunGenCollect (0) + c1c
 0810c424 do_memoryprofile (941180c, 832f178, 82e1f50,
94117d4) + 2a8
 081153c2 do_internal (9411844, 8325284, 82e1f50,
94117d4) + e2
 080da4f8 Rf_eval  (9411844, 94117d4) + 700
 080dab59 Rf_applyClosure (9411b00, 9411860, 82e1f50,
8336ff4, 82e1f50) + 335
 080da0ae Rf_eval  (9411b00, 8336ff4) + 2b6
 081025b7 R_ReplConsole (8336ff4, 0, 0) + 37b
 08103651 Rf_mainloop (bfffb824, 8047940, 8047a30,
8047978, 8065a1a, 2) + 45
 08065b7d main     (2, 8047984, 8047990) + 19
 08065a1a ???????? (2, 8047a98, 8047ab8, 0, 8047ac2,
8047ad9)
==========================

Have tried with no optimisation flags but still, make
check fails at the same spot. Any clues on what should
I be checking on?

Thanks for the help.

Cheers,

Daniel

--- Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:

> I can't solve this as I think the problem occurred
> earlier.  bratio is 
> defined in src/nmath/toms708.o included in
> src/nmath/libmath.a
> 
> Take a look at what was built in src/nmath.
> 
> On Wed, 12 Oct 2005, Daniel Wong wrote:
> 
> > Hi!
> >
> > I'm trying to compile R (32-bit) on Solaris 10 x86
> > using Sun Studio 10 + Sun Perflib (for BLAS and
> > LAPACK) but encountered issues with undefined
> symbol
> > "bratio". Appreciate any help.
> >
> > Compiler options (from configure output):
> > ==============================================
> > R is now configured for i386-pc-solaris2.10
> >
> >  Source directory:          .
> >  Installation directory:    /usr/local
> >
> >  C compiler:                cc -g -O
> -xtarget=opteron
> > -D__NO_MATH_INLINES -g -O -xtarget=opteron
> >  C++ compiler:              CC -gO
> -xtarget=opteron
> > -gO -xtarget=opteron
> >  Fortran compiler:          f77 -g -O
> > -xtarget=opteron  -gO -xtarget=opteron
> >
> >  Interfaces supported:      X11
> >  External libraries:        readline,
> BLAS(SunPerf)
> >  Additional capabilities:   PNG, JPEG, MBCS, NLS
> >  Options enabled:           R profiling
> >
> >  Recommended packages:      yes
> >
> > configure: WARNING: you cannot build DVI versions
> of
> > the R manuals
> > configure: WARNING: you cannot build PDF versions
> of
> > the R manuals
> > ==============================================
> >
> > Compile error:
> > ==============================================
> > ...
> > cc -g -O -xtarget=opteron  -L/opt/SUNWspro/lib
> > -L/usr/lib -L/usr/sfw/lib -L/opt/sfw/lib -o R.bin
> > Rmain.o  CConverters.o CommandLineArgs.o 
> Rdynload.o
> > Renviron.o RNG.o  apply.o arithmetic.o apse.o
> array.o
> > attrib.o  base.o bind.o builtin.o  character.o
> > coerce.o colors.o complex.o connections.o
> context.o
> > cov.o cum.o  dcf.o datetime.o debug.o deparse.o
> > deriv.o  dotcode.o dounzip.o dstruct.o duplicate.o
> > engine.o envir.o errors.o eval.o  format.o
> fourier.o
> > gevents.o gram.o gram-ex.o graphics.o  identical.o
> > internet.o iosupport.o  lapack.o list.o logic.o
> > main.o mapply.o match.o memory.o model.o  names.o
> > objects.o optim.o optimize.o options.o  par.o
> paste.o
> > pcre.o platform.o  plot.o plot3d.o plotmath.o 
> print.o
> > printarray.o printvector.o printutils.o qsort.o
> > random.o regex.o registration.o relop.o 
> saveload.o
> > scan.o seq.o serialize.o size.o sort.o source.o
> > split.o  sprintf.o startup.o subassign.o
> subscript.o
> > subset.o summary.o sysutils.o  unique.o util.o
> > version.o vfonts.o xxxpr.o ../unix/libunix.a
> > ../appl/libappl.a ../nmath/libnmath.a
> > -xlic_lib=sunperf -lsunmath -Rreg
> > -R/opt/SUNWspro/lib/sse2:/opt/SUNWspro/lib
> > -L/opt/SUNWspro/lib/sse2
> -L/opt/SUNWspro/prod/lib/sse2
> > -L/opt/SUNWspro/prod/lib -L/usr/ccs/lib -lfui
> -lfai
> > -lfsu -lsunmath -lmtsk -lm  ../extra/zlib/libz.a
> > ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a
> > ../extra/intl/libintl.a -lreadline -lncurses -lnsl
> > -lsocket -ldl -lm
> > Undefined                       first referenced
> > symbol                             in file
> > bratio
> > ../nmath/libnmath.a(pbeta.o)
> > ld: fatal: Symbol referencing errors. No output
> > written to R.bin
> > *** Error code 1
> > make: Fatal error: Command failed for target
> `R.bin'
> > Current working directory
> > /tmp/apps/R-2.2.0-32/src/main
> > *** Error code 1
> > The following command caused the error:
> > make install-bin-local
> > make: Fatal error: Command failed for target `R'
> > Current working directory
> > /tmp/apps/R-2.2.0-32/src/main
> > *** Error code 1
> > The following command caused the error:
> > for d in scripts include extra appl nmath unix
> main
> > modules library; do \
> >  (cd ${d} && make R) || exit 1; \
> > done
> > make: Fatal error: Command failed for target `R'
> > Current working directory /tmp/apps/R-2.2.0-32/src
> > *** Error code 1
> > The following command caused the error:
> > for d in m4 tools doc etc share src tests  po; do
> \
> >  (cd ${d} && make R) || exit 1; \
> > done
> > make: Fatal error: Command failed for target `R'
> > ==============================================
> >
> > Thanks.
> >
> > Regards,
> >
> > Daniel
> >
> >
> >
> > __________________________________
> > Meet your soulmate!
> >
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
> >
> 
> -- 
> Brian D. Ripley,                 
> ripley at stats.ox.ac.uk
> Professor of Applied Statistics, 
> http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865
> 272861 (self)
> 1 South Parks Road,                     +44 1865
> 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865
> 272595
>



[Rd] make check seg faults at base-Ex.R [was Re: Compile problem R 2.2.0 + Solaris 10 x86]
Daniel Wong