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

Make file build failing with hcxdumptool.c:4775:16: error: 'ETH_ALEN' undeclared #62

Closed
namanchikara opened this issue Jun 17, 2019 · 3 comments

Comments

@namanchikara
Copy link

I'm on Ubuntu 18.04, Below are the logs of make

/home/o_o/miniconda/bin/x86_64-conda_cos6-linux-gnu-cc -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -std=gnu99 -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -o hcxpioff hcxpioff.c -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections
/home/o_o/miniconda/bin/x86_64-conda_cos6-linux-gnu-cc -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -std=gnu99 -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -o hcxdumptool hcxdumptool.c -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections
In file included from /home/o_o/miniconda/x86_64-conda_cos6-linux-gnu/sysroot/usr/include/endian.h:61:0,
                 from /home/o_o/miniconda/x86_64-conda_cos6-linux-gnu/sysroot/usr/include/ctype.h:41,
                 from hcxdumptool.c:2:
hcxdumptool.c: In function 'opensocket':
hcxdumptool.c:4664:51: error: 'ETH_P_ALL' undeclared (first use in this function); did you mean 'ETH_TP_MDI'?
 if((fd_socket = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL))) < 0)
                                                   ^
hcxdumptool.c:4664:51: note: each undeclared identifier is reported only once for each function it appears in
hcxdumptool.c:4775:16: error: 'ETH_ALEN' undeclared (first use in this function); did you mean 'ETH_P_ALL'?
 ll.sll_halen = ETH_ALEN;
                ^~~~~~~~
                ETH_P_ALL
Makefile:20: recipe for target 'build' failed
make: *** [build] Error 1

@namanchikara
Copy link
Author

Somehow, Running sudo make instead of make does the trick! Maybe Documentations requires a bit of update?

Compile

Simply run:

`make`
`make install (as super user)`

@ZerBea
Copy link
Owner

ZerBea commented Jun 17, 2019

No, documentation is ok.
Your environment is broken because you are not able to access some of your include files as "normal user".

@namanchikara
Copy link
Author

Oh Okay, Got it.

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

No branches or pull requests

2 participants