Skip to content

make all failing #129

Open
Open

Description

@khemkasudeep

Hi

I am trying to build dtrace.
I have installed libdwarf and elfutils-libs
make all is failing with below error -
Any idea what may be going wrong.

BUILD_DIR=build-4.4.5-0.1.fm.221.49.316.metal1.x86_64
tools/mkdriver.pl driver-kmem ;
tools/build.pl build-4.4.5-0.1.fm.221.49.316.metal1.x86_64 uname -m
Executing: /tmp/dtrace/dtrace-20160613/tools/make-me
make -C /lib/modules/4.4.5-0.1.fm.221.49.316.metal1.x86_64/build M=/tmp/dtrace/dtrace-20160613/build-4.4.5-0.1.fm.221.49.316.metal1.x86_64/driver-kmem
Building modules, stage 2.
MODPOST 1 modules
gcc -o build-4.4.5-0.1.fm.221.49.316.metal1.x86_64/kcore tools/kcore.c
tools/check_dep.pl
tools/mkport.pl
/tmp/ccXV3VX4.o: In function main': root.dwarf.c:(.text+0x1f): undefined reference to dwarf_loclist'
collect2: ld returned 1 exit status
Failed to find offset
Use of uninitialized value $old_rsp in concatenation (.) or string at tools/mkport.pl line 144.
old_rsp=
We cannot find old_rsp or per_cpu__old_rsp in your kernel.
Additionally, it looks like /proc/kcore is broken on your kernel,
meaning we cannot poke to find this variable, which helps identify
kernel thread offsets.
FATAL ERROR: cannot find old_rsp
FATAL ERROR: build.pl aborting
make: *** [all] Error 25

Activity

  1. darthdeus commented on Mar 12, 2017

    @darthdeus

    I just tried on the latest arch linux with libdwarf installed as well, and getting the same error

    $ make all
    BUILD_DIR=build-4.9.11-1-ARCH \
    tools/mkdriver.pl driver-kmem ; \
    tools/build.pl build-4.9.11-1-ARCH `uname -m`
    Executing: /home/darth/projects/dtrace4linux/tools/make-me
    ERROR: /lib/modules/4.9.11-1-ARCH/build does not exist.
    gcc -o build-4.9.11-1-ARCH/kcore tools/kcore.c
    tools/check_dep.pl
    tools/mkport.pl
    /tmp/darth.dwarf.c: In function ‘main’:
    /tmp/darth.dwarf.c:5:2: warning: implicit declaration of function ‘dwarf_loclist’ [-Wimplicit-function-declaration]
      dwarf_loclist();
      ^~~~~~~~~~~~~
    /tmp/ccG4Rid1.o: In function `main':
    darth.dwarf.c:(.text+0x1f): undefined reference to `dwarf_loclist'
    collect2: error: ld returned 1 exit status
    Failed to find stub_execve
    Use of uninitialized value $old_rsp in concatenation (.) or string at tools/mkport.pl line 144.
    old_rsp=
    We cannot find old_rsp or per_cpu__old_rsp in your kernel.
    Additionally, it looks like /proc/kcore is broken on your kernel,
    meaning we cannot poke to find this variable, which helps identify
    kernel thread offsets.
    FATAL ERROR: cannot find old_rsp
    FATAL ERROR: build.pl aborting
    make: *** [makefile:67: all] Error 25
    
  2. p11o commented on Apr 9, 2017

    @p11o

    I'm having the same issue. Looks like the issue is the undefined reference to dwarf_loclist. Any ideas?

    [user@desktop dtrace-1.155]$ pacman -Q | grep 'elf\|dwarf'
    elfutils 0.168-1
    libdwarf 20161124-1
    libelf 0.168-1
    [user@desktop dtrace-1.155]$ make all
    BUILD_DIR=build-4.9.8-1-ARCH \
    tools/mkdriver.pl driver-kmem ; \
    tools/build.pl build-4.9.8-1-ARCH `uname -m`
    Executing: /home/user/Downloads/dtrace/dtrace-1.155/tools/make-me
    ERROR: /lib/modules/4.9.8-1-ARCH/build does not exist.
    gcc -o build-4.9.8-1-ARCH/kcore tools/kcore.c
    tools/check_dep.pl
    tools/mkport.pl
    /tmp/user.dwarf.c: In function 'main':
    /tmp/user.dwarf.c:5:2: warning: implicit declaration of function 'dwarf_loclist' [-Wimplicit-function-declaration]
      dwarf_loclist();
      ^~~~~~~~~~~~~
    /tmp/ccnNJ1IH.o: In function `main':
    user.dwarf.c:(.text+0x1f): undefined reference to `dwarf_loclist'
    collect2: error: ld returned 1 exit status
    
  3. juergenhoetzel commented on Feb 8, 2018

    @juergenhoetzel

    /tmp/ccnNJ1IH.o: In function main': user.dwarf.c:(.text+0x1f): undefined reference to dwarf_loclist'
    collect2: error: ld returned 1 exit status

    This seems to be related to Changes to support CentOS 7:

    The script seems check if libdw OR libdwarf should be linked. But on current Arch Linux setups dwarf_begin and dwarf_loclist are not defined in the same SO:

    juergen@samson:/usr/lib → nm -D libdw.so|egrep '(dwarf_begin|dwarf_loclist)$'
    0000000000009f80 T dwarf_begin
    juergen@samson:/usr/lib → nm -D libdwarf.so|egrep '(dwarf_begin|dwarf_loclist)$'
    0000000000029f70 T dwarf_loclist
    
  4. juergenhoetzel commented on Feb 8, 2018

    @juergenhoetzel

    The same error occurs on a Centos7 system

    tools/mkport.pl
    /tmp/ccfGMqi0.o: In function `main':
    juergen.dwarf.c:(.text+0x1f): undefined reference to `dwarf_loclist'
    collect2: error: ld returned 1 exit status
    

    but builds continues successfully

  5. 66Ton99 commented on Nov 6, 2020

    @66Ton99

    Have the same problem on Void Linux Kernel 5.8.16_1

    ➜  dtrace git:(master) ✗ nm -D /usr/lib/libdw.so|egrep '(dwarf_begin|dwarf_loclist)$'   
    0000000000030df0 T dwarf_begin
    ➜  dtrace git:(master) ✗ nm -D /usr/lib/libdwarf.so.1|egrep '(dwarf_begin|dwarf_loclist)$'
    0000000000037050 T dwarf_loclist
    
  6. KZYSAKYM commented on Nov 22, 2020

    @KZYSAKYM

    I have the same problem on Parrot OS Linux Kernel 5.9.0-2parrot1-amd64

    $  nm -D /usr/lib/x86_64-linux-gnu/libdw.so | egrep '(dwarf_begin|dwarf_loclist)' 
    0000000000033eb0 T dwarf_begin@@ELFUTILS_0.122
    0000000000034580 T dwarf_begin_elf@@ELFUTILS_0.122
    $ nm -D /usr/lib/x86_64-linux-gnu/libdwarf.so | egrep '(dwarf_begin|dwarf_loclist)'
    00000000000369f0 T dwarf_loclist
    00000000000369d0 T dwarf_loclist_from_expr
    0000000000036970 T dwarf_loclist_from_expr_a
    0000000000036800 T dwarf_loclist_from_expr_b
    0000000000038c30 T dwarf_loclist_from_expr_c
    0000000000036d10 T dwarf_loclist_n
    000000000003aac0 T _dwarf_loclists_fill_in_lle_head
    000000000003b450 T _dwarf_loclists_head_destructor
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions