segmentation fault

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

segmentation fault

arthur blair
I'm trying to compile 202 for linux. I've upgraded to redhat 4 and
went on to install gcc 2.7.2.1 & g77 & all the latest libraries that
were on this CD (infomagic dec 96).
./configure --enable-shared
and make appear to run & complete just fine now. But the executable
crashes with a segmentation fault shortly after displaying the usual
startup messages. The las few lines of 'strace octave' are:
fstat(1, {st_mode=S_IFREG|0664, st_size=15824, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x404dc000
write(1, "Octave, version 2.0.2 (i586-pc-l"..., 159Octave, version 2.0.2 (i586-pc-linux-gnu).
Copyright (C) 1996 John W. Eaton.
This is free software with ABSOLUTELY NO WARRANTY.
For details, type `warranty'.

) = 159
open("/usr/local/share/octave/site/m/startup/octaverc", O_RDONLY) = 3
brk(0x810e000)                          = 0x810e000
ioctl(3, TCGETS, 0xbffff408)            = -1 ENOTTY (Not a typewriter)
fstat(3, {st_mode=S_IFREG|0644, st_size=164, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x404dd000
read(3, "## System-wide startup file for "..., 4096) = 164
--- SIGSEGV (Segmentation fault) ---
--- SIGSEGV (Segmentation fault) ---
sigaction(SIGABRT, {SIG_DFL}, {0x400cba30, [], 0}) = 0
--- SIGSEGV (Segmentation fault) ---
sigaction(SIGABRT, {SIG_DFL}, {SIG_DFL}) = 0
--- SIGSEGV (Segmentation fault) ---          
those last 2 lines are repeated a few thousand times.

Any clues? Suggestions? Whatelse can I do to troubleshoot this?
Thanx,
Art.

Reply | Threaded
Open this post in threaded view
|

Re: segmentation fault

Craig Earls-2
arthur blair wrote:
>
> I'm trying to compile 202 for linux. I've upgraded to redhat 4 and
> went on to install gcc 2.7.2.1 & g77 & all the latest libraries that
> were on this CD (infomagic dec 96).

        This is a common problem with the newer linux libraries, it is caused
by the fact that the libc and libg++ shared libraries both use libio,
and therefore collide. I managed to get octave 2.0.2 to compile and run
using -enable-lite-kernel -enable-shared by installing libg++2.7.2.1
FIRST, then installing libc5.4.17. Reinstalling in the reverse order
brought the segmentation fault back.

        If that doesn't work, revert to ealier versions of libc and libg++, but
install libg++ first. CAUTION, be VERY careful how you revert libc,
install the old version, sync the hard disk three times, delete the new
version, then re-boot, because NOTHING else will work.
If you can figure out an easier way to back down a library version, let
me know. ldconfig may be statically linked, but when I deleted my newer
libc nothing else would run, which forced me to reboot, ldconfig runs at
system startup, so it linked in the older library. If you have compiled
programs wiuth the new libraries (>5.4.X I think) they will not be
binary compatible with libraries <5.3.X due to locale changes.

        I have corresponded with the libc and libg++ developers about this, but
have gotten no useful insight as to why the order of installation
matters. You may have to bypass the redhat package manager and install
the binaries from tsx-11 directly. I don't use any package manager so I
can't help you with the particulars of either slackware or red hat.

--
-----------------------------------------------------------------
Craig P Earls      [hidden email]
LT US Navy, MIT Ocean Engineering      [hidden email]
-----------------------------------------------------------------