--with-blas/lapack being ignored

Ben Abbott bpabbott at mac.com
Thu Dec 6 03:26:29 CST 2007


On Dec 5, 2007, at 6:07 PM, Ben Abbott wrote:

>
> On Dec 5, 2007, at 5:59 PM, John W. Eaton wrote:
>
>> On  5-Dec-2007, Ben Abbott wrote:
>>
>> |
>> | On Dec 5, 2007, at 11:52 AM, John W. Eaton wrote:
>> |
>> | > On  5-Dec-2007, Ben Abbott wrote:
>> | >
>> | > | Running fntests still crashes.
>> | > |
>> | > | [...]
>> | > |    src/octave/scripts/time/datestr.m ......................  
>> PASS
>> | > 32/32
>> | > |    src/octave/scripts/time/ 
>> datevec.m ......................panic:
>> | > Bus
>> | > | error -- stopping myself...
>> | > | Bus error
>> | > |
>> | > | Which may be duplicated with the simpler ....
>> | > |
>> | > | strptime ('09/13', '%m/%d')
>> | > | panic: Bus error -- stopping myself...
>> | > | attempting to save variables to `octave-core'...
>> | > | save to `octave-core' complete
>> | > | Bus error
>> | >
>> | > OK, so what happens if you run Octave with gdb and execute the
>> | > strptime command above?  Precisely where is it crashing?
>> | >
>> | > jwe
>> |
>> | I haven't (yet) tried compiling with the debug info in place.  
>> However,
>> | this is what I get
>> |
>> | Reading symbols for shared libraries . done
>> | octave:1> strptime ('09/13', '%m/%d')
>> | Reading symbols for shared libraries . done
>> |
>> | Program received signal EXC_BAD_ACCESS, Could not access memory.
>> | Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
>> | 0x9110f590 in strlen ()
>> | (gdb)
>>
>> At this point, type "where" at the gdb prompt to get a stack trace.
>> Of course, it would also be more useful to see what values are
>> present, but for that you'll need to use -g when compiling at least
>> the C++ parts of Octave.
>>
>> jwe
>
>
> Here it is.
>
> Reading symbols for shared libraries . done
> octave:1> strptime ('09/13', '%m/%d')
> Reading symbols for shared libraries . done
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
> 0x9110f590 in strlen ()
> (gdb) where
> #0  0x9110f590 in strlen ()
> #1  0x0167d661 in octave_base_tm::init ()
> #2  0x0167d7dd in octave_strptime::init ()
> #3  0x007aeddd in Fstrptime ()
> #4  0x00e5b29d in octave_builtin::do_multi_index_op ()
> #5  0x00e5ab40 in octave_builtin::subsref ()
> #6  0x00e203d3 in octave_value::subsref ()
> #7  0x00f70402 in tree_index_expression::rvalue ()
> #8  0x00f938e1 in tree_statement::eval ()
> #9  0x00f93d33 in tree_statement_list::eval ()
> #10 0x00d74da4 in main_loop ()
> #11 0x00cf6c83 in octave_main ()
> #12 0x00001ff0 in main ()
> #13 0x00001f96 in start ()
> (gdb)
>
> I'm presently building with the debug information as well.
>
> Unfortunately, the configure process didn't work as before. So I'm  
> not sure how useful that will be.
>
> configure: running /bin/sh ./configure '--prefix=/sw'  '--infodir=$ 
> {prefix}/share/info' '--mandir=${prefix}/share/man' '--libexecdir=$ 
> {prefix}/lib' '--build=i386-apple-darwin' '--with-blas=/sw/lib/ 
> libatlas.a' '--with-lapack=/sw/lib/libatlas.a' 'build_alias=i386- 
> apple-darwin' 'CFLAGS=-O2 -g' 'LDFLAGS=-L/sw/lib' 'CPPFLAGS=-O2 -g'  
> 'CXXFLAGS=-O2 -g' 'F77=/sw/bin/g95' 'FFLAGS=-O2 -g' --cache-file=/ 
> dev/null --srcdir=.
>
> [...]
>
> Octave is now configured for i386-apple-darwin
>
>   Source directory:     .
>   Installation prefix:  /sw
>   C compiler:           gcc  -mieee-fp  -Wall -W -Wshadow -O2 -g
>   C++ compiler:         g++  -mieee-fp  -Wall -W -Wshadow -Wold- 
> style-cast -O2 -g
>   Fortran compiler:     /sw/bin/g95 -O2 -g
>   Fortran libraries:    -L/sw/bin/../lib/gcc-lib/i386-apple- 
> darwin8/4.0.3 -lf95
>   BLAS libraries:       /sw/lib/libatlas.a -Wl,-framework -Wl,vecLib
>   FFTW libraries:
>   GLPK libraries:
>   UMFPACK libraries:
>   AMD libraries:        -lamd
>   CAMD libraries:       -lcamd
>   COLAMD libraries:
>   CCOLAMD libraries:
>   CHOLMOD libraries:
>   CXSPARSE libraries:
>   HDF5 libraries:
>   CURL libraries:       -lcurl
>   REGEX libraries:
>   QHULL libraries:	
>   LIBS:                 -lreadline  -lncurses -lz -lm
>   Default pager:        less
>   gnuplot:              gnuplot
>
>   Do internal array bounds checking:  false
>   Build static libraries:             false
>   Build shared libraries:             true
>   Dynamic Linking:                    true (dyld)
>   Include support for GNU readline:   true
>   64-bit array dims and indexing:     false
>
> To be sure I got the debug info, I placed '-g' on all compiler  
> options ... can that cause so many libraries to turn up missing?
>
> Ben
>


I removed the "-g" from FFLAGS, and configure identified the  
dependencies..

---------------------------
configure: running /bin/sh ./configure '--prefix=/sw'  '--infodir=$ 
{prefix}/share/info' '--mandir=${prefix}/share/man' '--libexecdir=$ 
{prefix}/lib' '--build=i386-apple-darwin' '--with-blas=/sw/lib/ 
libatlas.a' '--with-lapack=/sw/lib/libatlas.a' 'build_alias=i386-apple- 
darwin' 'CFLAGS=-O2 -g' 'LDFLAGS=-L/sw/lib' 'CPPFLAGS=-I/sw/include'  
'CXXFLAGS=-O2 -g' 'F77=/sw/bin/g95' 'FFLAGS=-O2' --cache-file=/dev/ 
null --srcdir=.

[...]

Octave is now configured for i386-apple-darwin

   Source directory:     .
   Installation prefix:  /sw
   C compiler:           gcc  -mieee-fp  -Wall -W -Wshadow -O2 -g
   C++ compiler:         g++  -mieee-fp  -Wall -W -Wshadow -Wold-style- 
cast -O2 -g
   Fortran compiler:     /sw/bin/g95 -O2
   Fortran libraries:    -L/sw/bin/../lib/gcc-lib/i386-apple- 
darwin8/4.0.3 -lf95
   BLAS libraries:       /sw/lib/libatlas.a -Wl,-framework -Wl,vecLib
   FFTW libraries:       -lfftw3
   GLPK libraries:       -lglpk
   UMFPACK libraries:    -lumfpack
   AMD libraries:        -lamd
   CAMD libraries:       -lcamd
   COLAMD libraries:     -lcolamd
   CCOLAMD libraries:    -lccolamd
   CHOLMOD libraries:    -lcholmod
   CXSPARSE libraries:   -lcxsparse
   HDF5 libraries:       -lhdf5
   CURL libraries:       -lcurl
   REGEX libraries:      -lpcre
   QHULL libraries:	-lqhull
   LIBS:                 -lreadline  -lncurses -lhdf5 -lz -lm
   Default pager:        less
   gnuplot:              gnuplot

   Do internal array bounds checking:  false
   Build static libraries:             false
   Build shared libraries:             true
   Dynamic Linking:                    true (dyld)
   Include support for GNU readline:   true
   64-bit array dims and indexing:     false
---------------------------

However, regarding the strptime function ...

---------------------------
checking for strptime... yes
[...]
checking whether strptime is broken... no
---------------------------

I do not know if Apple has fixed this in Leopard or not. Configure  
thinks so, but calls to strptime from octave produces a crash.

Running from gdb, I obtained the following.

---------------------------
octave:1> strptime ('09/13', '%m/%d')
. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x9110f590 in strlen ()
(gdb) where
#0  0x9110f590 in strlen ()
#1  0x019b9661 in octave_base_tm::init (this=0xbfffed50, p=0x0) at oct- 
time.cc:307
#2  0x019b97dd in octave_strptime::init (this=0xbfffed24,  
str=@0xffffffff, fmt=@0xffffffff) at oct-time.cc:379
#3  0x007b5ddd in Fstrptime (args=@0x26bfa68) at time.cc:430
#4  0x00ff929d in octave_builtin::do_multi_index_op (this=0x3460a90,  
nargout=0, args=@0x26bfa68) at ov-builtin.cc:104
#5  0x00ff8b40 in octave_builtin::subsref (this=0x3460a90,  
type=@0x26bf6f4, idx=@0xbffff07c, nargout=0) at ov-builtin.cc:54
#6  0x00fbe3d3 in octave_value::subsref (this=0xbffff08c,  
type=@0x26bf6f4, idx=@0xbffff07c, nargout=0) at ov.cc:783
#7  0x0110e402 in tree_index_expression::rvalue (this=0x26bf6d0,  
nargout=0) at pt-idx.cc:352
#8  0x011318e1 in tree_statement::eval (this=0x26bf7b0, silent=false,  
nargout=0, in_function_body=false) at pt-stmt.cc:133
#9  0x01131d33 in tree_statement_list::eval (this=0x26bf7c0,  
silent=false, nargout=0) at pt-stmt.cc:190
#10 0x00f12da4 in main_loop () at toplev.cc:225
#11 0x00e94c83 in octave_main (argc=1, argv=0xbffff3f0, embedded=0) at  
octave.cc:801
#12 0x00001ff0 in main (argc=-1, argv=0xffffffff) at main.c:35
#13 0x00001f96 in start ()
(gdb)
---------------------------

  I haven't used gdb in a looonnnggg time. If anyone can recommend a  
GUI for gdb that can be used a Mac OS X, I'd appreciate it.

Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20071206/d6c06717/attachment-0001.html 


More information about the Bug-octave mailing list