在Mac OS上编译Halide的camera_pipe应用程序时出现问题

时间:2017-03-16 20:20:45

标签: c++ x86-64 halide

我是Halide的新手,刚从源代码中成功编译了Halide。我想从源代码(https://github.com/halide/Halide/tree/master/apps/camera_pipe)中试用camera_pipe应用程序,但是我收到了以下错误,而且我不确定如何调试/修复它。提前感谢您的任何建议或帮助!

我的系统正在运行Mac OS Sierrar(10.12.3)

这是Makefile运行的命令:

c++ -std=c++11 -I ../../include/ -I ../../tools/ -I ../../apps/support/ -g -fno-rtti camera_pipe_generator.cpp ../../lib/libHalide.a ../../tools/GenGen.cpp -o bin/camera_pipe_exec -L/usr/local/lib -ldl -lpthread -lz

这是我得到的错误输出:

Undefined symbols for architecture x86_64:
      "_del_curterm", referenced from:
          llvm::sys::Process::FileDescriptorHasColors(int) in libHalide.a(llvm_460_Process.cpp.o)
      "_set_curterm", referenced from:
          llvm::sys::Process::FileDescriptorHasColors(int) in libHalide.a(llvm_460_Process.cpp.o)
      "_setupterm", referenced from:
          llvm::sys::Process::FileDescriptorHasColors(int) in libHalide.a(llvm_460_Process.cpp.o)
      "_tigetnum", referenced from:
          llvm::sys::Process::FileDescriptorHasColors(int) in libHalide.a(llvm_460_Process.cpp.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: *** [bin/camera_pipe_exec] Error 1

1 个答案:

答案 0 :(得分:0)

看起来你的llvm依赖于terminfo,但相机管道默认没有链接它。尝试将-ltinfo与-lpthread -lz等一起添加到makefile中