Tonni
V2EX  ›  问与答

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

  •  
  •   Tonni · Nov 27, 2014 · 7634 views
    This topic created in 4210 days ago, the information mentioned may be changed or developed.
    我在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 replies    2017-05-03 21:54:52 +08:00
    frogs
        1
    frogs  
       Nov 27, 2014   ❤️ 1
    不知道什么是n2n,不过碰到过类似的问题。
    你这个应该是用llvm-gcc编译的c代码,不过在mac平台得用llvm-clang来编译
    configrue构建makefile的时候,识别到了gcc命令,认为是gcc了。
    Tonni
        2
    Tonni  
    OP
       Nov 27, 2014
    @frogs 不是很了解,你先看看Makefile吧: https://github.com/meyerd/n2n/blob/master/n2n_v1/Makefile
    adieu
        3
    adieu  
       Nov 27, 2014   ❤️ 1
    我弄过,不过已经忘了具体的流程了。看报错貌似是tuntap_osx.o没有64位版本。可以考虑强行用32位来编译。
    ahui
        4
    ahui  
       Jan 20, 2015   ❤️ 1
    https://gist.github.com/tevino/9798566
    有人解决了.打个补丁.
    或手动,删除二行,添加一行.
    Tonni
        5
    Tonni  
    OP
       Jan 20, 2015
    @ahui h哈哈,我也是找到的这个解决方案,只是没更新这个帖子,谢谢了 ;-)
    kdsex
        6
    kdsex  
       Feb 12, 2015
    好像可行。。
    lovejoy
        7
    lovejoy  
       May 3, 2017
    官方已经修复这个问题,直接 make 就行了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   6081 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 76ms · UTC 03:16 · PVG 11:16 · LAX 20:16 · JFK 23:16
    ♥ Do have faith in what you're doing.