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' encounter error #11

Open
luckypoem opened this issue Sep 22, 2019 · 5 comments
Open

'make' encounter error #11

luckypoem opened this issue Sep 22, 2019 · 5 comments

Comments

@luckypoem
Copy link

hi.

yudeMacBook-Air:tunsocks-by-russdill brite$ make
depbase=echo lwip-udhcpd/dhcpd.o | sed 's|[^/]*$|.deps/&|;s|\.o$||';
gcc -DPACKAGE_NAME="tunsocks" -DPACKAGE_TARNAME="tunsocks" -DPACKAGE_VERSION="1.0" -DPACKAGE_STRING="tunsocks\ 1.0" -DPACKAGE_BUGREPORT="russ.dill@gmail.com" -DPACKAGE_URL="https://github.com/russdill/tunsocks\" -DPACKAGE="tunsocks" -DVERSION="1.0" -DHAVE_PCAP=1 -I. -I./lwip/src/include -I./lwip/src/include/ipv4 -I./lwip/src/include/ipv6 -I./lwip-libevent/include -I./lwip-udhcpd -I./lwip-nat/include -I./include -Wall -Og -g -DUSE_PCAP -g -O2 -MT lwip-udhcpd/dhcpd.o -MD -MP -MF $depbase.Tpo -c -o lwip-udhcpd/dhcpd.o lwip-udhcpd/dhcpd.c &&
mv -f $depbase.Tpo $depbase.Po
lwip-udhcpd/dhcpd.c:24:10: fatal error: 'netinet/ether.h' file not found
#include <netinet/ether.h>
^
1 error generated.
make: *** [lwip-udhcpd/dhcpd.o] Error 1
yudeMacBook-Air:tunsocks-by-russdill brite$

how to fix it?

@russdill
Copy link
Owner

It's left over from the udhcp port. Just remove the offending line and you should be fine.

@luckypoem
Copy link
Author

hi.
i removed the line: #include <netinet/ether.h> from dhcpd.c ,then i ran "make" again,but encountered another error:

yudeMacBook-Air:tunsocks-by-russdill brite$ make
it shows:
...
lwip-libevent/netif/slirpif_udp.c:130:40: error: use of undeclared identifier
'SOCK_NONBLOCK'
fd = socket(sa.sa_family, SOCK_DGRAM|SOCK_NONBLOCK, IPPR...
^
1 error generated.
make: *** [lwip-libevent/netif/slirpif_udp.o] Error 1
yudeMacBook-Air:tunsocks-by-russdill brite$

how to fix it?

@russdill
Copy link
Owner

Looks like there are some more linux'isms lurking. You'll have to do some work cleaning them up for it to compile.

@luckypoem
Copy link
Author

hi.

i removed line 130 from lwip-libevent/netif/slirpif_udp.c ,and "make" again, encountered another error:
...
lwip-libevent/netif/udptapif.c:273:34: error: use of undeclared identifier 'SOCK_NONBLOCK'
fd = socket(AF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_UDP);
^
2 warnings and 1 error generated.
make: *** [lwip-libevent/netif/udptapif.o] Error 1

i removed line 273 from lwip-libevent/netif/udptapif.c ,and "make" again, encountered another error:

it shows:
...
lwip-libevent/netif/tunif.c:9:10: fatal error: 'linux/if_tun.h' file not found
#include <linux/if_tun.h>
^
1 error generated.
make: *** [lwip-libevent/netif/tunif.o] Error 1

does this error:"fatal error: 'linux/if_tun.h' file not found" mean that i cannot solve it at all?
bcoz there is no if_tun.h file in mac os x?

@yggdrasil-tynor
Copy link

same

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

3 participants