[darcs-users] Re: Segfaults on Solaris 8/SPARC darcs 1.0.2

Juliusz Chroboczek jch at pps.jussieu.fr
Tue Feb 15 19:57:53 UTC 2005


>> I cannot tell more without playing with a debugger.
>
> If you could write instructions for me to follow I would be more than
> happy to do that.

I'm afraid it might be a waste of time for you too -- it will probably
turn out I'm incompetent.

Here are a few things I would try to track that down:

0. Run 

  $ ldd /usr/local/bin/darcs

and check the integrity of all the libraries that Darcs is puling in.
Unfortunately, I have no idea how you can check the integrity of an
ELF shared object -- I'd simply try to compare with the installation
media.

1. try recompiling Darcs with no optimisation; run configure on a
fresh darcs, then edit the autoconf.mk file that was generated to change

  CFLAGS := -O2

to

  CFLAGS :=

and edit the GHCFLAGS (two lines below that) to remove ``-O'' and
replace it with ``-fvia-C''.

Then make darcs (take care to verify that the build process doesn't
run configure -- it normally shouldn't in this case).  If the above
yields a ghc that doesn't crash, we'll know your compiler is
generating buggy code; if not keep reading.

2. get a backtrace; assuming that ``darcs add foo'' is what causes
darcs to crash, do something like

 $ gdb /usr/local/bin/darcs
 (gdb) run add foo
    (message about application crashing)
 (gdb) bt

this will tell you where darcs crashed.

> An interesting thing I've noticed is:

> $ /usr/lib/ld.so
> Segmentation Fault

Same thing on the one Solaris machine I have access to, so I guess
that's the way Solaris works.

                                        Juliusz




More information about the darcs-users mailing list