"Graham Bentley" <[EMAIL PROTECTED]> writes:

> I have often wondered what to do if I compile a port and
> immediatly after trying to run it I get a seg fault.
> In the past I have just tried to find an alternative port
> that did the same job, but it has always felt as though I
> wasnt trying hard enough.
> Yesterday after upgrading all my ports tree I decided to
> get printing working and cups / HP stuff all works fine
> as does the web gui to cups so I decided to try and
> make xpp.
> The result is 'Segmentation Fault' - thats it!
> How do I go about finding out what caused it and how to
> get the program running?
> Any tips etc appreciated!

Segmentation fault means (roughly) accessing a region of memory that
hadn't even been mapped into that process.  Generally you need some
software debugging skills to go after these problems directly.

There are some less direct steps you can take that can help.  For one,
make sure your ports are up-to-date with your installed ports tree
before installing more ports.  You can run the program under truss(1),
which will help you figure out what kind of bad data is being passed
to system calls (assuming that's where the failure is, but it's not
unusual for that to be the case).  You can generate a crash dump of
the program, and (you or someone else) can use a debugger to see where
it was when it failed -- usually a strong hint.

And of course, asking for help in figuring out a specific problem is
an option as well.  I'd look at xpp, but at the moment my machines
with the ports collection installed are powered down...

Lowell Gilbert, embedded/networking software engineer, Boston area
freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to