Solaris 10: 'gmake check' dumps core
Ole Tange
octave at tange.dk
Mon Aug 4 15:29:32 CDT 2008
On 8/4/08, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:
> On 4-Aug-2008, Ole Tange wrote:
>
> | Bug report for Octave 3.0.1 configured for i386-pc-solaris2.10
> |
> | Description:
> | -----------
> |
> | I have made a fresh install of Solaris 10 to determine the
> | requirements for compiling Octave 3.0.1, so the requirements can be
> | detected reliably by configure and a failing compilation can be
> | avoided.
> |
> | When I tried 'gmake check' it would not even start octave.
> |
> | run-octave dumps core.
> |
> |
> | Repeat-By:
> | ---------
> |
> | I made a fresh install of Solaris 10. Then installed GCC, gmake,
> | texinfo, and gsed. Then:
> |
> | ./configure; gmake
> |
> | Then:
> |
> | gmake check
> |
> | This fails:
> |
> | gmake -f octMakefile check
> | gmake[1]: Entering directory `/octave/octave-3.0.1'
> | gmake -C test check
> | gmake[2]: Entering directory `/octave/octave-3.0.1/test'
> | ../run-octave --norc --silent --no-history ./fntests.m .
> | ld.so.1: octave: fatal: liboctinterp.so: open failed: No such file or directory
> | gmake[2]: *** [check] Killed
> | gmake[2]: Leaving directory `/octave/octave-3.0.1/test'
> | gmake[1]: *** [check] Error 2
> | gmake[1]: Leaving directory `/octave/octave-3.0.1'
> | gmake: *** [check] Error 2
> |
> | I assume it has to do with using /bin/sh on Solaris is not the same as
> | using /bin/bash. So I changed run-octave:
> |
> | --- run-octave.old 2008-08-04 19:36:00.000000000 +0200
> | +++ run-octave.new 2008-08-04 19:36:47.000000000 +0200
> | @@ -65,8 +65,12 @@
> | fi
> | fi
> |
> | -OCTAVE_SITE_INITFILE="$top_srcdir/scripts/startup/main-rcfile" \
> | -LD_PRELOAD="$liboctinterp $liboctave $libcruft" \
> | -LD_LIBRARY_PATH="$builddir/src:$builddir/liboctave:$builddir/libcruft:$LD_LIBRARY_PATH"
> | \
> | +OCTAVE_SITE_INITFILE="$top_srcdir/scripts/startup/main-rcfile"
> | +export OCTAVE_SITE_INITFILE
> | +LD_PRELOAD="$liboctinterp $liboctave $libcruft"
> | +export LD_PRELOAD
> | +LD_LIBRARY_PATH="$builddir/src:$builddir/liboctave:$builddir/libcruft:$LD_LIBRARY_PATH"
> | +export LD_LIBRARY_PATH
> | +
> | exec $driver "$builddir/src/octave" --no-initial-path
> | --path="$LOADPATH" --image-path="$IMAGEPATH" --info-file="$INFOFILE"
> | "$@"
>
>
> Hmm. What do the following do with /bin/sh on a Solaris system?
>
> X=x /usr/bin/env | grep X
Result:
X=x
> X=x exec /usr/bin/env | grep X
Result:
[nothing]
> ? I would expect that both would print "X=x", but if not, then we can
> modify the script to export these variables instead of setting them
> for just that command.
Clearly that is needed.
> | This fixes the problem not being able to find liboctinterp.so. Now I get:
> |
> | # gmake check
> | gmake -f octMakefile check
> | gmake[1]: Entering directory `/octave/octave-3.0.1'
> | gmake -C test check
> | gmake[2]: Entering directory `/octave/octave-3.0.1/test'
> | ../run-octave --norc --silent --no-history ./fntests.m .
> | gmake[2]: *** [check] Segmentation Fault (core dumped)
> | gmake[2]: Leaving directory `/octave/octave-3.0.1/test'
> | gmake[1]: *** [check] Error 2
> | gmake[1]: Leaving directory `/octave/octave-3.0.1'
> | gmake: *** [check] Error 2
> |
> | To see a little more on what is going on I installed gdb:
> |
> | ./run_octave -g
> |
> | # ./run-octave -g
> | Segmentation Fault (core dumped)
>
>
> That's strange, since ./run-octave -g should just put you at the (gdb)
> prompt and not actually try to start Octave.
>
>
> | Then I tried setting the enviroment variables manually and run the
> | command line manually:
> |
> | # gdb --args "/octave/octave-3.0.1/src/octave" --no-initial-path
> | --path="{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}:{}"
>
>
> Where did you get this value of --path? Perhaps the find commands in
> the run-octave script are not being executed properly?
I simply echo'ed the lines that would run from run-octave.
> | --image-path="/octave/octave-3.0.1/scripts/image"
> | --info-file="/octave/octave-3.0.1/doc/interpreter/octave.info" ""
> | GNU gdb 6.6
> | Copyright (C) 2006 Free Software Foundation, Inc.
> | GDB is free software, covered by the GNU General Public License, and you are
> | welcome to change it and/or distribute copies of it under certain conditions.
> | Type "show copying" to see the conditions.
> | There is absolutely no warranty for GDB. Type "show warranty" for details.
> | This GDB was configured as "i386-pc-solaris2.8"...
> | (no debugging symbols found)
> | (gdb) run
> | Starting program: /octave/octave-3.0.1/src/octave --no-initial-path
> | --path=\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}:\{\}
> | --image-path=/octave/octave-3.0.1/scripts/image
> | --info-file=/octave/octave-3.0.1/doc/interpreter/octave.info ''
> | (no debugging symbols found)
> | warning: Temporarily disabling breakpoints for unloaded shared library
> | "/usr/lib/ld.so.1"
> |
> | Program received signal SIGSEGV, Segmentation fault.
> | 0xfd5a5c01 in std::string::find () from /opt/csw/lib/libstdc++.so.6
> | (gdb) bt
> | #0 0xfd5a5c01 in std::string::find () from /opt/csw/lib/libstdc++.so.6
> | #1 0xfd907471 in file_ops::is_dir_sep (c=47 '/') at file-ops.cc:857
> | #2 0xfd90c7f2 in file_ops::concat (dir=@0x8047780, file=@0x8047790)
> | at /opt/csw/gcc3/lib/gcc/i386-pc-solaris2.8/3.4.5/../../../../include/c++/3.4.5/bits/basic_string.h:541
>
>
> Can you move up to this frame and examine the values of dir and file
> at this point?
See below.
> I agree that Octave should not crash if given a bad value for --path
> so that is probably worth fixing, but if Octave's path doesn't include
> anything useful, there is no way Octave is going to work properly. So
> the first thing to do is fix the --path setting in the run-octave script.
>
> Have you tried installing Octave (in that case, the --path argument
> won't be needed to run it)? Does it give you a prompt then?
You are thinking 'gmake install', right?
# gmake install
[...]
# /usr/local/bin/octave
Segmentation Fault (core dumped)
# gdb /usr/local/bin/octave
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.8"...
(no debugging symbols found)
(gdb) run
Starting program: /usr/local/bin/octave
(no debugging symbols found)
warning: Temporarily disabling breakpoints for unloaded shared library
"/usr/lib/ld.so.1"
Program received signal SIGSEGV, Segmentation fault.
0xfd5a5c01 in std::string::find () from /opt/csw/lib/libstdc++.so.6
(gdb) bt
#0 0xfd5a5c01 in std::string::find () from /opt/csw/lib/libstdc++.so.6
#1 0xfd907471 in file_ops::is_dir_sep (c=47 '/') at file-ops.cc:857
#2 0xfd90c7f2 in file_ops::concat (dir=@0x8047980, file=@0x8047990)
at /opt/csw/gcc3/lib/gcc/i386-pc-solaris2.8/3.4.5/../../../../include/c++/3.4.5/bits/basic_string.h:541
#3 0xfe4b842a in __static_initialization_and_destruction_0
(__initialize_p=1, __priority=0)
at /opt/csw/gcc3/lib/gcc/i386-pc-solaris2.8/3.4.5/../../../../include/c++/3.4.5/ext/new_allocator.h:62
#4 0xfe842d0d in __do_global_ctors_aux ()
at /opt/csw/gcc3/lib/gcc/i386-pc-solaris2.8/3.4.5/../../../../include/c++/3.4.5/bits/list.tcc:69
#5 0xfe842d22 in _init () at
/opt/csw/gcc3/lib/gcc/i386-pc-solaris2.8/3.4.5/../../../../include/c++/3.4.5/bits/list.tcc:69
#6 0xfefd58fc in call_init () from /lib/ld.so.1
#7 0xfefd5681 in is_dep_init () from /lib/ld.so.1
#8 0xfefdf7c5 in elf_bndr () from /lib/ld.so.1
#9 0xfefcc1d4 in elf_rtbndr () from /lib/ld.so.1
#10 0xfefb0460 in ?? ()
#11 0x00000d98 in ?? ()
#12 0xfd931758 in __static_initialization_and_destruction_0
(__initialize_p=-17103776, __priority=1) at DiagArray2.h:115
#13 0xfdc64531 in __do_global_ctors_aux ()
at /opt/csw/gcc3/lib/gcc/i386-pc-solaris2.8/3.4.5/../../../../include/c++/3.4.5/bits/stl_construct.h:106
#14 0xfdc64546 in _init () at
/opt/csw/gcc3/lib/gcc/i386-pc-solaris2.8/3.4.5/../../../../include/c++/3.4.5/bits/stl_construct.h:106
#15 0xfefd58fc in call_init () from /lib/ld.so.1
#16 0xfefd4fcc in setup () from /lib/ld.so.1
#17 0xfefe0734 in _setup () from /lib/ld.so.1
#18 0xfefcc0b8 in _rt_boot () from /lib/ld.so.1
#19 0x08047d5c in ?? ()
#20 0xfeffab18 in _GLOBAL_OFFSET_TABLE_ () from /lib/ld.so.1
#21 0x00000003 in ?? ()
#22 0x08047da0 in ?? ()
#23 0x00000004 in ?? ()
#24 0x08047da8 in ?? ()
#25 0x00000005 in ?? ()
#26 0x08047df0 in ?? ()
#27 0x00000000 in ?? ()
(gdb) frame 2
#2 0xfd90c7f2 in file_ops::concat (dir=@0x8047980, file=@0x8047990)
at /opt/csw/gcc3/lib/gcc/i386-pc-solaris2.8/3.4.5/../../../../include/c++/3.4.5/bits/basic_string.h:541
541 length() const { return _M_rep()->_M_length; }
Current language: auto; currently c++
(gdb) info args
dir = (const string &) @0x8047980: {static npos = 4294967295,
_M_dataplus = {<std::allocator<char>> =
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data
fields>},
_M_p = 0x8060a6c "/"}}
file = (const string &) @0x8047990: {static npos = 4294967295,
_M_dataplus = {<std::allocator<char>> =
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data
fields>},
_M_p = 0x806188c ".octave_hist"}}
(gdb)
The "/" changes if I change $HOME.
/Ole
More information about the Bug-octave
mailing list