V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
Tonni
V2EX  ›  问与答

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

  •  
  •   Tonni · 2014-11-27 23:08:42 +08:00 · 6686 次点击
    这是一个创建于 3438 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我在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了好多也没找到解决方案
    7 条回复    2017-05-03 21:54:52 +08:00
    frogs
        1
    frogs  
       2014-11-27 23:14:50 +08:00   ❤️ 1
    不知道什么是n2n,不过碰到过类似的问题。
    你这个应该是用llvm-gcc编译的c代码,不过在mac平台得用llvm-clang来编译
    configrue构建makefile的时候,识别到了gcc命令,认为是gcc了。
    Tonni
        2
    Tonni  
    OP
       2014-11-27 23:30:35 +08:00
    @frogs 不是很了解,你先看看Makefile吧: https://github.com/meyerd/n2n/blob/master/n2n_v1/Makefile
    adieu
        3
    adieu  
       2014-11-27 23:33:56 +08:00   ❤️ 1
    我弄过,不过已经忘了具体的流程了。看报错貌似是tuntap_osx.o没有64位版本。可以考虑强行用32位来编译。
    ahui
        4
    ahui  
       2015-01-20 16:12:46 +08:00   ❤️ 1
    https://gist.github.com/tevino/9798566
    有人解决了.打个补丁.
    或手动,删除二行,添加一行.
    Tonni
        5
    Tonni  
    OP
       2015-01-20 16:27:26 +08:00
    @ahui h哈哈,我也是找到的这个解决方案,只是没更新这个帖子,谢谢了 ;-)
    kdsex
        6
    kdsex  
       2015-02-12 14:47:18 +08:00
    好像可行。。
    lovejoy
        7
    lovejoy  
       2017-05-03 21:54:52 +08:00
    官方已经修复这个问题,直接 make 就行了。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2679 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 11:11 · PVG 19:11 · LAX 04:11 · JFK 07:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.