{"action":"created","issue":{"url":"https://api.github.com/repos/libpnet/rust-netmap/issues/1","labels_url":"https://api.github.com/repos/libpnet/rust-netmap/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/libpnet/rust-netmap/issues/1/comments","events_url":"https://api.github.com/repos/libpnet/rust-netmap/issues/1/events","html_url":"https://github.com/libpnet/rust-netmap/issues/1","id":59818076,"number":1,"title":"build.rs not working","user":{"login":"larseggert","id":200328,"avatar_url":"https://avatars.githubusercontent.com/u/200328?v=3","gravatar_id":"","url":"https://api.github.com/users/larseggert","html_url":"https://github.com/larseggert","followers_url":"https://api.github.com/users/larseggert/followers","following_url":"https://api.github.com/users/larseggert/following{/other_user}","gists_url":"https://api.github.com/users/larseggert/gists{/gist_id}","starred_url":"https://api.github.com/users/larseggert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larseggert/subscriptions","organizations_url":"https://api.github.com/users/larseggert/orgs","repos_url":"https://api.github.com/users/larseggert/repos","events_url":"https://api.github.com/users/larseggert/events{/privacy}","received_events_url":"https://api.github.com/users/larseggert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-04T16:00:11Z","updated_at":"2015-03-05T08:02:21Z","closed_at":null,"body":"I'm trying to build this on my local Linux box, and the stuff in `build.rs` seems to be failing.\r\n\r\nFirst, I think I needed to install `clang`, which wasn't super-obvious. But even with that done, I still hit this error:\r\n````\r\n[lars@tux: ~/rustcore] cargo build -v\r\n   Compiling rust-netmap v0.0.4 (https://github.com/libpnet/rust-netmap.git#ab947ee2)\r\n     Running `rustc /tmp/git/checkouts/rust-netmap-2baeba280d3ef56f/master/src/lib.rs --crate-name rust-netmap --crate-type rlib --crate-type dylib -C prefer-dynamic -g --cfg feature=\"default\" --cfg feature=\"netmap_with_libs\" -C metadata=10a85511dfe14665 -C extra-filename=-10a85511dfe14665 --out-dir /mnt/home/vmhome/rustcore/target/deps --emit=dep-info,link -L dependency=/mnt/home/vmhome/rustcore/target/deps -L dependency=/mnt/home/vmhome/rustcore/target/deps -Awarnings -L native=/mnt/home/vmhome/rustcore/target/build/rust-netmap-10a85511dfe14665/out -l static=rust_netmap_user`\r\nerror: could not find native static library `rust_netmap_user`, perhaps an -L flag is missing?\r\nCould not compile `rust-netmap`.\r\n\r\nCaused by:\r\n  Process didn't exit successfully: `rustc /tmp/git/checkouts/rust-netmap-2baeba280d3ef56f/master/src/lib.rs --crate-name rust-netmap --crate-type rlib --crate-type dylib -C prefer-dynamic -g --cfg feature=\"default\" --cfg feature=\"netmap_with_libs\" -C metadata=10a85511dfe14665 -C extra-filename=-10a85511dfe14665 --out-dir /mnt/home/vmhome/rustcore/target/deps --emit=dep-info,link -L dependency=/mnt/home/vmhome/rustcore/target/deps -L dependency=/mnt/home/vmhome/rustcore/target/deps -Awarnings -L native=/mnt/home/vmhome/rustcore/target/build/rust-netmap-10a85511dfe14665/out -l static=rust_netmap_user` (exit code: 101)\r\n````\r\n\r\nLooking at `build.rs`, I noticed that `/usr/include/net/netmap_user.h` does not exist on my netmap-enabled system, but even after making this a symlink to my `netmap_user.h`, I see this failure."},"comment":{"url":"https://api.github.com/repos/libpnet/rust-netmap/issues/comments/77321999","html_url":"https://github.com/libpnet/rust-netmap/issues/1#issuecomment-77321999","issue_url":"https://api.github.com/repos/libpnet/rust-netmap/issues/1","id":77321999,"user":{"login":"larseggert","id":200328,"avatar_url":"https://avatars.githubusercontent.com/u/200328?v=3","gravatar_id":"","url":"https://api.github.com/users/larseggert","html_url":"https://github.com/larseggert","followers_url":"https://api.github.com/users/larseggert/followers","following_url":"https://api.github.com/users/larseggert/following{/other_user}","gists_url":"https://api.github.com/users/larseggert/gists{/gist_id}","starred_url":"https://api.github.com/users/larseggert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larseggert/subscriptions","organizations_url":"https://api.github.com/users/larseggert/orgs","repos_url":"https://api.github.com/users/larseggert/repos","events_url":"https://api.github.com/users/larseggert/events{/privacy}","received_events_url":"https://api.github.com/users/larseggert/received_events","type":"User","site_admin":false},"created_at":"2015-03-05T08:02:21Z","updated_at":"2015-03-05T08:02:21Z","body":"Thanks for looking into this. I run Debian in a local VM on my Mac:\r\n````\r\n[lars@tux: ~] lsb_release -a\r\nNo LSB modules are available.\r\nDistributor ID:\tDebian\r\nDescription:\tDebian GNU/Linux 8.0 (jessie)\r\nRelease:\t8.0\r\nCodename:\tjessie\r\n````\r\nI'm running the `next` branch of Luigi's public netmap repo at https://code.google.com/p/netmap/. Build and installed via `make` and `sudo make install`, plus adding `netmap` to `/etc/modules` and adding some udev rules so non-root can use `/dev/netmap`.\r\n\r\nAfter `cargo build`, the directory is empty:\r\n````\r\n[lars@tux: ~/rustcore] cargo build\r\n    Updating git repository `https://github.com/libpnet/rust-netmap.git`\r\n   Compiling rust-netmap v0.0.4 (https://github.com/libpnet/rust-netmap.git#ab947ee2)\r\nerror: could not find native static library `rust_netmap_user`, perhaps an -L flag is missing?\r\nCould not compile `rust-netmap`.\r\n\r\nTo learn more, run the command again with --verbose.\r\n[lars@tux: ~/rustcore] ls target/build/rust-netmap-*/out\r\n[lars@tux: ~/rustcore]\r\n````\r\nAs for the `clang` command (I guess you meant `-Dstatic=` and not `=Dstatic=`):\r\n````\r\n[lars@tux: ~/rustcore] clang -DNETMAP_WITH_LIBS -Dstatic= -Dinline= -x c -fPIC -O2 -c /usr/include/net/netmap_user.h -o $(mktemp)\r\n/usr/include/net/netmap_user.h:77:10: fatal error: 'net/netmap.h' file not found\r\n#include <net/netmap.h>\r\n         ^\r\n1 error generated.\r\n````\r\nIt looks like `make install` in netmap doesn't install the header files. Hm. Let me go digging."}}