[Crash-utility] How to use scripts in crash?

Bruce Korb bruce.korb at gmail.com
Thu Mar 8 15:35:13 UTC 2012


Hi Lei,

On Thu, Mar 8, 2012 at 7:11 AM, Lei Wen <adrian.wenl at gmail.com> wrote:
> Seem I get no luck to build out the pykdump...
....
> Makefile:24: slocal.mk: No such file or directory
> make: *** No rule to make target `slocal.mk'.  Stop.
>
> Any idea?

It's true the build mechanisms of pykdump leave a lot to be desired.
You have to tell the thing where to find the python build tree, too,
because the process involves rolling up a largish subset of python
into the .so file.  After configuring there should be *three* .mk files.
I've attached a file showing how mine got set up for my platform
with my layout, meaning you won't be able to use it (directly), but
you'll see more-or-less what you need.  You'll find the pykdump guy
helpful 'cuz he helped me through exactly the same problems.  Weeks
ago now, so I've forgotten what exactly I had to do.... :)

Good luck.  Cheers - Bruce

$ ls -l $(find * -name '*.so')
-rwxrwxrwx  1 bruce  staff  6302242 Feb  8 15:54 Extension/mpykdump.so
-rwxrwxrwx  1 bruce  staff  5896299 Feb  8 12:41 Extension/pykdump_c.so
-------------- next part --------------
$ head -3000 *.mk
==> crash.mk <==
# Configuration options for 'crash' tree
CRASHDIR := /mnt/home-work/TOOLS/crash-5.1.1-patched
GDBDIR := /mnt/home-work/TOOLS/crash-5.1.1-patched/gdb-7.0/gdb
GDBINCL =  -I$(GDBDIR)  -I$(GDBDIR)/config  -I$(GDBDIR)/../bfd \
  -I$(GDBDIR)/../include -I$(GDBDIR)/../intl
EXTRA := -DGDB7 -I$(GDBDIR)/common
TARGET := X86_64
CRASHVERS := 5.1.1

==> local.mk <==
# Configuration options for local build
PYTHON := python
PYINCLUDE := -I/usr/include/python2.6
CC := gcc -pthread
CFLAGS := -fPIC
LIBS := -L. -lpython2.6 -lpthread -ldl  -lutil -lm
LINKFLAGS :=  -nostartfiles -shared -Xlinker -export-dynamic
TOPDIR := /mnt/home-work/TOOLS/pykdump-bld

==> slocal.mk <==
# Configuration options for static-build
PYTHONDIR := /mnt/home-work/TOOLS/Python-2.6.7
PYTHON := env LD_LIBRARY_PATH=/mnt/home-work/TOOLS/Python-2.6.7 /mnt/home-work/TOOLS/Python-2.6.7/python
PYINCLUDE := -I/mnt/home-work/TOOLS/Python-2.6.7/Include -I/mnt/home-work/TOOLS/Python-2.6.7
CC := gcc -pthread
CFLAGS := -fPIC
LIBS := /mnt/home-work/TOOLS/Python-2.6.7/libpython2.6.a -lpthread -ldl  -lutil -lm
LINKFLAGS :=  -nostartfiles -shared -Xlinker -export-dynamic
TOPDIR := /mnt/home-work/TOOLS/pykdump-bld
STDLIBP :=  /mnt/home-work/TOOLS/Python-2.6.7/local/lib/python2.6
COMPALL :=  /mnt/home-work/TOOLS/Python-2.6.7/local/lib/python2.6/compileall.py
MINPYLIB_FILES := minpylib-2.6.lst


More information about the Crash-utility mailing list