Tonni
V2EX  ›  问与答

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

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