Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a typo: __KERNEL -> __KERNEL__ #1

Closed
wants to merge 1 commit into from

Conversation

msabramo
Copy link
Contributor

-# else /* !__KERNEL */
+# else /* !__KERNEL__ */

@dtrace4linux
Copy link
Owner

Super - thanks Marc. Merged.

On 28 February 2012 21:20, Marc Abramowitz
reply@reply.github.com
wrote:

You can merge this Pull Request by running:

 git pull https://github.com/msabramo/linux misc_tweaks

Or you can view, comment on it, or merge it online at:

 #1

-- Commit Summary --

  • Fix a typo: KERNEL -> __KERNEL

-- File Changes --

M linux/linux_types.h (2)

-- Patch Links --

 https://github.com/dtrace4linux/linux/pull/1.patch
 https://github.com/dtrace4linux/linux/pull/1.diff


Reply to this email directly or view it on GitHub:
#1

@dtrace4linux
Copy link
Owner

Am confused by your other mail. I compile fine on Ubuntu 11.10 - your
first error is:

In file included from ../linux/sys/types.h:4:0,
from ctf_lib.c:29:
.../linux/linux_types.h:146:38: fatal error: /usr/include/sys/types.h: No
such file or directory

which implies you dont have the gcc dev kit installed. My get-deps.pl
is probably more for 64bit kernel,
so you may want to validate what you have or are missing.

Ubuntu tends to be my primary dev platform, so it should just work,
assuming the dependencies are
there (I am getting better at tracking what I install on my system,
but am not perfect yet).

tx

On 28 February 2012 21:56, Paul Fox paul.d.fox@gmail.com wrote:

Super - thanks Marc. Merged.

On 28 February 2012 21:20, Marc Abramowitz
reply@reply.github.com
wrote:

You can merge this Pull Request by running:

 git pull https://github.com/msabramo/linux misc_tweaks

Or you can view, comment on it, or merge it online at:

 #1

-- Commit Summary --

  • Fix a typo: KERNEL -> __KERNEL

-- File Changes --

M linux/linux_types.h (2)

-- Patch Links --

 https://github.com/dtrace4linux/linux/pull/1.patch
 https://github.com/dtrace4linux/linux/pull/1.diff


Reply to this email directly or view it on GitHub:
#1

@msabramo
Copy link
Contributor Author

marca@ubuntu:~/src/dtrace4linux/dtrace-20120225$ cat /etc/debian_version 
wheezy/sid
marca@ubuntu:~/src/dtrace4linux/dtrace-20120225$ uname -a
Linux ubuntu 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:34:47 UTC 2011 i686 i686 i386 GNU/Linux

Here's what seemed to do the trick for me to get me /usr/include/sys/types.h:

$ sudo apt-get install libc6-dev-amd64

(kind of weird since uname says that my arch is i686; not amd64 -- but maybe that's just a naming thing). I already had libc6-dev and build-essential and even tried reinstalling it and that didn't help. Installing libc6-dev-amd64 seems to be necessary.

With that I got:

...
cd cmd/ctfconvert ; make --no-print-directory
=================================================================
=== You need /usr/lib/libdwarf.a and /usr/lib/libbfd.a installed to build.
=== 
=== apt-get install binutils-dev
=== apt-get install libdw-dev
=== 
=== Without these, we will not build ctfconvert (needed for 
=== SDT structure definitions).
=================================================================
...
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/marca/src/dtrace4linux/dtrace-20120225/build-3.0.0-14-generic/driver/dtracedrv.mod.o
  LD [M]  /home/marca/src/dtrace4linux/dtrace-20120225/build-3.0.0-14-generic/driver/dtracedrv.ko
tools/mkctf.sh
build/ctfconvert not available - so not building the linux.ctf file
NOTE: The build is complete, but build/ctfconvert is not available.
      This means you will get run time errors from the io.d and sched.d files
      due to undefined kernel structure definitions. Simply delete or rename
      these files until a fix can be put in place to handle older
      distros which do not have the required libdwarf dependencies.

      (Typical error is references to undefined struct definitions such
      as dtrace_cpu_t).

sync

I tried installing libdw-dev as the message suggested, but that did not help as libdw-dev does not provide libdwarf.a. Instead, I installed libdwarf-dev and that seemed to do the trick so that it could build ctfconvert.

So here's the whole list of packages that I recommend for Ubuntu users:

sudo apt-get install build-essential flex libelf-dev libc6-dev-amd64 binutils-dev libdwarf-dev

Thank you so much for doing this work to port DTrace to Linux!!!

azat added a commit to azat-archive/dtrace4linux that referenced this pull request Aug 7, 2013
I see this is happens in gdb:

gdb bt:
 #0  taskq_dispatch2 (tq=0xffff88003712e600, func=0x0 <irq_stack_union>,
     arg=0x0 <irq_stack_union>, flags=0, delay=1)
     at /usr/src/dtrace4linux/build-3.11.0-rc4+/driver/taskq.c:263
 dtrace4linux#1  0xffffffffa0369433 in timeout (
     func=func@entry=0xffffffffa035c9d5 <fasttrap_pid_cleanup_cb>,
     arg=arg@entry=0x0 <irq_stack_union>, ticks=ticks@entry=1)
     at /usr/src/dtrace4linux/build-3.11.0-rc4+/driver/taskq.c:306
 dtrace4linux#2  0xffffffffa035c9c0 in fasttrap_pid_cleanup ()
     at /usr/src/dtrace4linux/build-3.11.0-rc4+/driver/fasttrap.c:505
 dtrace4linux#3  0xffffffffa035cdbf in fasttrap_provider_retire (pid=<optimized out>,
     name=0xffffffffa037eb8f "pid", name@entry=0x140ef <Address 0x140ef out of bounds>,
     mprov=mprov@entry=0) at /usr/src/dtrace4linux/build-3.11.0-rc4+/driver/fasttrap.c:1713
 dtrace4linux#4  0xffffffffa035ce08 in fasttrap_exec_exit (p=0xffff8800371d3b18)
     at /usr/src/dtrace4linux/build-3.11.0-rc4+/driver/fasttrap.c:596
 dtrace4linux#5  0xffffffffa0358c09 in proc_exit_notifier (n=<optimized out>, code=<optimized out>,
     ptr=<optimized out>)
     at /usr/src/dtrace4linux/build-3.11.0-rc4+/driver/dtrace_linux.c:2020
 dtrace4linux#6  0xffffffff8139b2d3 in notifier_call_chain (
     nl=nl@entry=0xffffffff81634da0 <task_exit_notifier+32>, val=val@entry=0,
     v=v@entry=0xffff88007b62b040, nr_to_call=nr_to_call@entry=-1,
     nr_calls=nr_calls@entry=0x0 <irq_stack_union>) at kernel/notifier.c:93
 dtrace4linux#7  0xffffffff8105824b in __blocking_notifier_call_chain (
     nh=nh@entry=0xffffffff81634d80 <task_exit_notifier>, val=val@entry=0,
     v=0xffff88007b62b040, nr_to_call=nr_to_call@entry=-1,
     nr_calls=nr_calls@entry=0x0 <irq_stack_union>) at kernel/notifier.c:314
 dtrace4linux#8  0xffffffff81058273 in blocking_notifier_call_chain (
     nh=nh@entry=0xffffffff81634d80 <task_exit_notifier>, val=val@entry=0,
     v=<optimized out>) at kernel/notifier.c:325
 dtrace4linux#9  0xffffffff810750f5 in profile_task_exit (task=<optimized out>) at kernel/profile.c:143
 dtrace4linux#10 0xffffffff8103a3cf in do_exit ()
 dtrace4linux#11 0xffffffff8103b87c in do_group_exit ()
 dtrace4linux#12 0xffffffff81047522 in get_signal_to_deliver ()
 dtrace4linux#13 0xffffffff81002176 in do_signal ()
 dtrace4linux#14 0xffffffff810025d3 in do_notify_resume ()
 dtrace4linux#15 <signal handler called>
 dtrace4linux#16 0x00007fed3818fff8 in ?? ()

 Refs dtrace4linux#61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants