Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: fsck seg fault failure on vmware -i386?

On Mon, 8 Feb 2010, wrote:

> >   | I should be, but gdb is in /usr so I can copy it out...don't
> >   | know about dependencies,
> >
> > It has a few libraries it needs
> Is there an easy way to check which libraries it needs?

man ldd

Another option is to build a statically linked binary.  This means 

1) cd to src/lib/libc do a `make clean' to get rid of the old libc then a:

        make DBG=-g MKDEBUGLIB=yes libc_g.a

to build a debug libc_g.a (you may want a USE_TOOLS=no there too)

2) copy libc_g.a somewhere it's easy to find such as /tmp

3) cd to src/sbin/fsck_ffs do a `make clean' then a `make DBG=-g' to build 
a new fsck_ffs.

4) re-link the bindary statically with the debug libc something like this:

ld -Bstatic -o fsck_ffs_debug *.o -L /tmp/libc_g.a -lutil -lprop

Hopefully you will have a single staticall linked debug fsck_ffs_debug you 
can copy to anther machine without needing to copy any shared libs.


Home | Main Index | Thread Index | Old Index