Solaris 10: 'gmake check' dumps core
John W. Eaton
jwe at bevo.che.wisc.edu
Mon Aug 4 12:47:52 CDT 2008
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
X=x exec /usr/bin/env | grep X
? 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.
| 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?
| --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?
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?
jwe
More information about the Bug-octave
mailing list