有人在 OS X 下编译 n2n 成功的么?

2014-11-27 23:08:42 +08:00
 Tonni
我在n2n官网下载源码在Ubuntu下编译正常,但是在OS X上编译时就会报错:

1 warning generated.
Undefined symbols for architecture x86_64:
"_tun_close", referenced from:
_tuntap_open in n2n.a(tuntap_osx.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [edge] Error 1

Google了好多也没找到解决方案
6700 次点击
所在节点    问与答
7 条回复
frogs
2014-11-27 23:14:50 +08:00
不知道什么是n2n,不过碰到过类似的问题。
你这个应该是用llvm-gcc编译的c代码,不过在mac平台得用llvm-clang来编译
configrue构建makefile的时候,识别到了gcc命令,认为是gcc了。
Tonni
2014-11-27 23:30:35 +08:00
@frogs 不是很了解,你先看看Makefile吧: https://github.com/meyerd/n2n/blob/master/n2n_v1/Makefile
adieu
2014-11-27 23:33:56 +08:00
我弄过,不过已经忘了具体的流程了。看报错貌似是tuntap_osx.o没有64位版本。可以考虑强行用32位来编译。
ahui
2015-01-20 16:12:46 +08:00
https://gist.github.com/tevino/9798566
有人解决了.打个补丁.
或手动,删除二行,添加一行.
Tonni
2015-01-20 16:27:26 +08:00
@ahui h哈哈,我也是找到的这个解决方案,只是没更新这个帖子,谢谢了 ;-)
kdsex
2015-02-12 14:47:18 +08:00
好像可行。。
lovejoy
2017-05-03 21:54:52 +08:00
官方已经修复这个问题,直接 make 就行了。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/149819

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX