无法在 Mac OSX for i386 目标上使用我的应用程序构建 Apache Thrift

Posted

技术标签:

【中文标题】无法在 Mac OSX for i386 目标上使用我的应用程序构建 Apache Thrift【英文标题】:Failure to build Apache Thrift with my application on Mac OSX for i386 target 【发布时间】:2013-06-30 13:40:07 【问题描述】:

我正在尝试使用 Thrift 构建我的 C++ 应用程序,但它失败了。我不明白这个错误。

Ld ./build/Debug/neptune.app/Contents/MacOS/neptune normal i386
    cd /Users/orsa/home/projects/neptune/xcode
    setenv MACOSX_DEPLOYMENT_TARGET 10.7
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -L/Users/orsa/home/projects/neptune/xcode/build/Debug -L/Users/orsa/home/projects/neptune/xcode/../lib -L/usr/local/lib -F/Users/orsa/home/projects/neptune/xcode/build/Debug -F../blocks/Awesomium/build/lib/macosx -filelist /Users/orsa/home/projects/neptune/xcode/./build/neptune.build/Debug/neptune.build/Objects-normal/i386/neptune.LinkFileList -mmacosx-version-min=10.7 -dead_strip ../../../software/Cinder_Github/lib/libcinder_d.a ../blocks/Cairo/lib/macosx/libcairo.a ../blocks/Cairo/lib/macosx/libpixman-1.a ../blocks/Cairo/lib/macosx/libpng14.a ../blocks/OpenCV/lib/macosx/libopencv_calib3d.a ../blocks/OpenCV/lib/macosx/libopencv_contrib.a ../blocks/OpenCV/lib/macosx/libopencv_core.a ../blocks/OpenCV/lib/macosx/libopencv_features2d.a ../blocks/OpenCV/lib/macosx/libopencv_flann.a ../blocks/OpenCV/lib/macosx/libopencv_gpu.a ../blocks/OpenCV/lib/macosx/libopencv_imgproc.a ../blocks/OpenCV/lib/macosx/libopencv_legacy.a ../blocks/OpenCV/lib/macosx/libopencv_ml.a ../blocks/OpenCV/lib/macosx/libopencv_nonfree.a ../blocks/OpenCV/lib/macosx/libopencv_objdetect.a ../blocks/OpenCV/lib/macosx/libopencv_photo.a ../blocks/OpenCV/lib/macosx/libopencv_stitching.a ../blocks/OpenCV/lib/macosx/libopencv_ts.a ../blocks/OpenCV/lib/macosx/libopencv_video.a ../blocks/OpenCV/lib/macosx/libopencv_videostab.a ../blocks/Qhull/libs/macosx/libqhullcpp.a ../blocks/Qhull/libs/macosx/libqhullstatic.a -stdlib=libc++ -lthrift -levent -llibssh2 -framework Cocoa -framework OpenGL -framework CoreVideo -framework QTKit -framework Accelerate -framework AudioToolbox -framework AudioUnit -framework CoreAudio -framework Awesomium -lcrypto -lz -o /Users/orsa/home/projects/neptune/xcode/./build/Debug/neptune.app/Contents/MacOS/neptune

Undefined symbols for architecture i386:
  "vtable for apache::thrift::server::TNonblockingServer", referenced from:
      apache::thrift::server::TNonblockingServer::TNonblockingServer<apache::thrift::TProcessor>(boost::shared_ptr<apache::thrift::TProcessor> const&, boost::shared_ptr<apache::thrift::protocol::TProtocolFactory> const&, int, boost::shared_ptr<apache::thrift::concurrency::ThreadManager> const&, boost::enable_if<boost::is_convertible<apache::thrift::TProcessor*, apache::thrift::TProcessor*>::type, void*>::type) in neptuneApp-11ADA2EE725CBF5F.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
  "apache::thrift::server::TNonblockingServer::setThreadManager(boost::shared_ptr<apache::thrift::concurrency::ThreadManager>)", referenced from:
      apache::thrift::server::TNonblockingServer::TNonblockingServer<apache::thrift::TProcessor>(boost::shared_ptr<apache::thrift::TProcessor> const&, boost::shared_ptr<apache::thrift::protocol::TProtocolFactory> const&, int, boost::shared_ptr<apache::thrift::concurrency::ThreadManager> const&, boost::enable_if<boost::is_convertible<apache::thrift::TProcessor*, apache::thrift::TProcessor*>::type, void*>::type) in neptuneApp-11ADA2EE725CBF5F.o
  "apache::thrift::server::TNonblockingServer::serve()", referenced from:
      NeptuneBrowserApp::startThriftServer() in neptuneApp-11ADA2EE725CBF5F.o
  "apache::thrift::server::TNonblockingServer::~TNonblockingServer()", referenced from:
      NeptuneBrowserApp::startThriftServer() in neptuneApp-11ADA2EE725CBF5F.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

【问题讨论】:

【参考方案1】:

不是真正的答案,但我建议将其发布在邮件列表中。

【讨论】:

这就是 cmets 的用途 ;-)

以上是关于无法在 Mac OSX for i386 目标上使用我的应用程序构建 Apache Thrift的主要内容,如果未能解决你的问题,请参考以下文章

将 32 位动态库转换为 64 位的 osx

OSX:找不到架构 i386 的符号

在mac osX下安装openCV,used for python

在 os x 上使 ruby​​ 1.9 默认 [重复]

mac osX packageMaker:如何将目标设置为用户主目录?

mysql for mac服务无法启动