0

I'm running an alpine linux box, and am trying to install radare2. I downloaded the git repo, then ran the install.sh script. It seems to run fine until running into an error:

In file included from p/native/linux/linux_debug.c:6:
/home/nomad/GitRepos/radare2/libr/include/r_debug.h:609:115: note: expected 'r_ptrace_data_t' {aka 'int'} but argument is of type 'void *'
 static inline long r_debug_ptrace(RDebug *dbg, r_ptrace_request_t request, pid_t pid, void *addr, r_ptrace_data_t data) {
                                                                                                   ~~~~~~~~~~~~~~~~^~~~
CC linux_coredump.c
p/native/linux/linux_coredump.c:10:10: fatal error: asm/ptrace.h: No such file or directory
 #include <asm/ptrace.h>
          ^~~~~~~~~~~~~~
compilation terminated.
make[4]: *** [/home/nomad/GitRepos/radare2/libr/../global.mk:36: p/native/linux/linux_coredump.o] Error 1
make[3]: *** [Makefile:13: foo] Error 2
make[2]: *** [Makefile:157: debug] Error 2
make[1]: *** [Makefile:28: all] Error 2
make: *** [Makefile:61: all] Error 2

I've had a look around online, but haven't been able to find much relating to "Error 2". From the error it looks like I'm missing a library, but I'm not sure what library it is, or how to install it as I'm relatively new to alpine linux.

  • fatal error: asm/ptrace.h: No such file. .... Is a kernel header. Example location: `/usr/src/kernel-devel-5.0.2//arch/x86/include/asm/ptrace.h´ – Knud Larsen Sep 18 '19 at 10:53
0

On Alpine Linux, the asm/ptrace.h header is provided by the linux-headers package.

For installing the Linux headers package, run the following:

apk add linux-headers

Then, try repeating the install process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.