lkml.org 
[lkml]   [1997]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    Subjectwierd problem with 'make dep'
    Hi

    This is probably a lib problem, but I haven't had anything like it before...

    any ideas?

    I am using the default 2.0.30 (and pre-10 doesn't fix this), and when
    I try and 'make dep' things go haywire:

    gcc -I/usr/src/linux/include -O2 -fomit-frame-pointer -o scripts/mkdep scripts/mkdep.c
    make[1]: Entering directory `/usr/src/linux/arch/i386/boot'
    make[1]: Nothing to be done for `dep'.
    make[1]: Leaving directory `/usr/src/linux/arch/i386/boot'
    scripts/mkdep init/*.c > .tmpdepend
    scripts/mkdep `find /usr/src/linux/include/asm /usr/src/linux/include/linux /usr/src/linux/include/scsi /usr/src/linux/include/net -follow -name \*.h ! -name modversions.h -print` > .hdepend
    make: *** [dep-files] Error 139

    running the command directly:
    newt:/usr/src/linux # scripts/mkdep `find /usr/src/linux/include/asm /usr/src/linux/include/linux /usr/src/linux/include/scsi /usr/src/linux/include/net -follow -name \*.h ! -name modversions.h -print` > .hdepend
    Segmentation fault

    an strace shows this:

    mprotect(0x40000000, 17813, PROT_READ|PROT_EXEC) = 0
    personality(PER_LINUX) = 0
    geteuid() = 0
    getuid() = 0
    getgid() = 0
    getegid() = 0
    open("/usr/src/linux/include/asm/unistd.h", O_RDONLY) = 3
    mmap(0, 4096, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40007000
    close(3) = 0
    --- SIGSEGV (Segmentation fault) ---
    +++ killed by SIGSEGV +++

    So I tried to compile mkdep with '-g' and found that doing
    gcc -I/usr/src/linux/include -O2 -o scripts/mkdep scripts/mkdep.c
    instead of
    gcc -I/usr/src/linux/include -O2 -fomit-frame-pointer -o scripts/mkdep scripts/mkdep.c

    Works fine.

    gdb:
    #0 0x8048967 in state_machine (next=Cannot access memory at address 0x158.
    ) at scripts/mkdep.c:126
    126 GETNEXT
    (gdb) bt
    #0 0x8048967 in state_machine (next=Cannot access memory at address 0x158.
    ) at scripts/mkdep.c:126
    #1 0x40007000 in ?? ()
    Cannot access memory at address 0x148.
    (gdb)

    Any ideas?

    The only major thing I have done recently is install glibc, and this isn't
    linked with it...

    newt:/usr/src/linux/scripts> ldd mkdep
    libc.so.5 => /lib/libc.so.5.4.23

    newt:/usr/src/linux # ld -v
    GNU ld version 2.8.1 (with BFD linux-2.8.1.0.1)
    newt:/usr/src/linux # gcc -v
    Reading specs from /usr/lib/gcc-lib/i586-unknown-linux-gnulibc1/2.7.2.3/specs
    gcc version 2.7.2.3
    ldd: version 1.8.5

    \
     
     \ /
      Last update: 2005-03-22 13:40    [W:0.019 / U:60.548 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site