{"action":"created","issue":{"url":"https://api.github.com/repos/iovisor/bcc/issues/239","labels_url":"https://api.github.com/repos/iovisor/bcc/issues/239/labels{/name}","comments_url":"https://api.github.com/repos/iovisor/bcc/issues/239/comments","events_url":"https://api.github.com/repos/iovisor/bcc/issues/239/events","html_url":"https://github.com/iovisor/bcc/issues/239","id":107581283,"number":239,"title":"failures in a VM","user":{"login":"brendangregg","id":1101211,"avatar_url":"https://avatars.githubusercontent.com/u/1101211?v=3","gravatar_id":"","url":"https://api.github.com/users/brendangregg","html_url":"https://github.com/brendangregg","followers_url":"https://api.github.com/users/brendangregg/followers","following_url":"https://api.github.com/users/brendangregg/following{/other_user}","gists_url":"https://api.github.com/users/brendangregg/gists{/gist_id}","starred_url":"https://api.github.com/users/brendangregg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendangregg/subscriptions","organizations_url":"https://api.github.com/users/brendangregg/orgs","repos_url":"https://api.github.com/users/brendangregg/repos","events_url":"https://api.github.com/users/brendangregg/events{/privacy}","received_events_url":"https://api.github.com/users/brendangregg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/iovisor/bcc/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/iovisor/bcc/labels/prio:high","name":"prio:high","color":"fad8c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-09-21T19:24:26Z","updated_at":"2015-09-21T21:19:46Z","closed_at":"2015-09-21T19:42:26Z","body":"Just tried bcc in a VBox VM. Some scripts work (hello_world, syncsnoop), others fail. Eg:\r\n\r\n```\r\nroot@ubuntu:~/bcc/examples> ./disksnoop.py \r\n<bcc-memory-buffer>:23:51: error: cannot take the address of an rvalue of type 'u64' (aka 'unsigned long long')\r\n        bpf_map_update_elem((void *)bpf_pseudo_fd(1, 3), &((u64)ctx->di), &ts, BPF_ANY);\r\n                                                         ^ ~~~~~~~~~~~~\r\n<bcc-memory-buffer>:30:60: error: use of undeclared identifier 'u'\r\n        tsp = bpf_map_lookup_elem((void *)bpf_pseudo_fd(1, 3), &((u);\r\n                                                                  ^\r\n<bcc-memory-buffer>:37:2: error: expected '}'\r\n}\r\n ^\r\n<bcc-memory-buffer>:27:65: note: to match this '{'\r\nvoid trace_completion(struct pt_regs *ctx, struct request *req) {\r\n                                                                ^\r\n3 errors generated.\r\nTraceback (most recent call last):\r\n  File \"./disksnoop.py\", line 19, in <module>\r\n    b = BPF(src_file=\"disksnoop.c\")\r\n  File \"/usr/lib/python2.7/dist-packages/bcc/__init__.py\", line 349, in __init__\r\n    raise Exception(\"Failed to compile BPF module %s\" % src_file)\r\nException: Failed to compile BPF module disksnoop.c\r\nroot@ubuntu:~/bcc/examples> uname -a\r\nLinux ubuntu 4.3.0-999-generic #201509202159 SMP Mon Sep 21 02:01:24 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux\r\n```\r\n\r\n```\r\nroot@ubuntu:~/bcc/tools> ./opensnoop \r\n<bcc-memory-buffer>:12:64: error: use of undeclared identifier 'ct'\r\n        bpf_map_update_elem((void *)bpf_pseudo_fd(1, 3), &pid, &((u64)ct, BPF_ANY);\r\n                                                                      ^\r\n<bcc-memory-buffer>:19:1: error: function definition is not allowed here\r\n{\r\n^\r\n<bcc-memory-buffer>:34:2: error: expected '}'\r\n}\r\n ^\r\n<bcc-memory-buffer>:8:1: note: to match this '{'\r\n{\r\n^\r\n3 errors generated.\r\nTraceback (most recent call last):\r\n  File \"./opensnoop\", line 80, in <module>\r\n    b = BPF(text=bpf_text)\r\n  File \"/usr/lib/python2.7/dist-packages/bcc/__init__.py\", line 349, in __init__\r\n    raise Exception(\"Failed to compile BPF module %s\" % src_file)\r\nException: Failed to compile BPF module \r\n```"},"comment":{"url":"https://api.github.com/repos/iovisor/bcc/issues/comments/142111161","html_url":"https://github.com/iovisor/bcc/issues/239#issuecomment-142111161","issue_url":"https://api.github.com/repos/iovisor/bcc/issues/239","id":142111161,"user":{"login":"drzaeus77","id":3770556,"avatar_url":"https://avatars.githubusercontent.com/u/3770556?v=3","gravatar_id":"","url":"https://api.github.com/users/drzaeus77","html_url":"https://github.com/drzaeus77","followers_url":"https://api.github.com/users/drzaeus77/followers","following_url":"https://api.github.com/users/drzaeus77/following{/other_user}","gists_url":"https://api.github.com/users/drzaeus77/gists{/gist_id}","starred_url":"https://api.github.com/users/drzaeus77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drzaeus77/subscriptions","organizations_url":"https://api.github.com/users/drzaeus77/orgs","repos_url":"https://api.github.com/users/drzaeus77/repos","events_url":"https://api.github.com/users/drzaeus77/events{/privacy}","received_events_url":"https://api.github.com/users/drzaeus77/received_events","type":"User","site_admin":false},"created_at":"2015-09-21T21:19:46Z","updated_at":"2015-09-21T21:19:46Z","body":"Yeah, I haven't updated those packages in about a week, so they are out of\ndate and incompatible with the examples that are checked into github HEAD.\n\nOn Mon, Sep 21, 2015 at 12:44 PM, Brendan Gregg <notifications@github.com>\nwrote:\n\n> Oh, and:\n>\n> root@ubuntu:~/bcc/examples> history | grep libbcc\n>   462  sudo apt-get install libbcc libbcc-examples python-bcc\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/iovisor/bcc/issues/239#issuecomment-142088776>.\n>\n"}}