memsharded / conan-protobuf

Google protocol buffers conan package
MIT License
1 stars 17 forks source link

MacOS Error #3

Closed Narquadah closed 8 years ago

Narquadah commented 8 years ago

While trying to use protobuf in a project I encountered an error. So I cloned the Repository and ran conan test which gave the following result:

arch=x86_64 build_type=Release compiler=apple-clang compiler.libcxx=libc++ compiler.version=7.3 os=Macos

dyld: Symbol not found: __ZN6google8protobuf8compiler20CommandLineInterface12AllowPluginsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
  Referenced from: conan-protobuf/test_package/build/da39a3ee5e6b4b0d3255bfef95601890afd80709/./bin/protoc (which was built for Mac OS X 10.11)
  Expected in: /usr/local/lib/libprotoc.9.dylib
 in conan-protobuf/test_package/build/da39a3ee5e6b4b0d3255bfef95601890afd80709/./bin/protoc
ERROR: Error 5 while executing ./bin/protoc ../../message.proto --proto_path=../.. --cpp_out="."

When I tested it on Linux it worked fine. Any help would be appreciated.

memsharded commented 8 years ago

Thanks for reporting, will check asap.

memsharded commented 8 years ago

I have checked with those settings and everything works fine. Is it possible that you have another version of Protobuf in your system path? Which OSX version?

Narquadah commented 8 years ago

I had another version in my path and removed it, but there still was an error. I have MacOS 10.11.

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: string table not at the end of the file (can't be processed) in file: ./libprotobuf-lite.9.dylib.dSYM/Contents/Resources/DWARF/libprotobuf-lite.9.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: string table not at the end of the file (can't be processed) in file: ./libprotobuf.9.dylib.dSYM/Contents/Resources/DWARF/libprotobuf.9.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: string table not at the end of the file (can't be processed) in file: ./libprotoc.9.dylib.dSYM/Contents/Resources/DWARF/libprotoc.9.dylib
Protobuf/2.6.1@memsharded/testing package(): Copied 115 '.h' files
Protobuf/2.6.1@memsharded/testing package(): Copied 1 '' files: protoc
Protobuf/2.6.1@memsharded/testing package(): Copied 12 '.dylib' files
Protobuf/2.6.1@memsharded/testing: Package 'ceef3be852ace1018c035b1a57df80271ed52e65' created
PROJECT: Generated cmake created conanbuildinfo.cmake
PROJECT: Generated conaninfo.txt
PROJECT imports(): Copied 1 '' files: protoc
PROJECT imports(): Copied 3 '.dylib' files: libprotobuf-lite.9.dylib, libprotoc.9.dylib, libprotobuf.9.dylib
Documents/workspace/pulls/testing/conan-protobuf/test_package/build/da39a3ee5e6b4b0d3255bfef95601890afd80709
dyld: Library not loaded: @executable_path/libprotobuf.9.dylib
  Referenced from: workspace/pulls/testing/conan-protobuf/test_package/build/da39a3ee5e6b4b0d3255bfef95601890afd80709/./bin/protoc
  Reason: no suitable image found.  Did find:
       workspace/pulls/testing/conan-protobuf/test_package/build/da39a3ee5e6b4b0d3255bfef95601890afd80709/./bin/libprotobuf.9.dylib: mach-o, but wrong filetype
       workspace/pulls/testing/conan-protobuf/test_package/build/da39a3ee5e6b4b0d3255bfef95601890afd80709/bin/libprotobuf.9.dylib: mach-o, but wrong filetype
ERROR: Error 5 while executing ./bin/protoc ../../message.proto --proto_path=../.. --cpp_out="."
Narquadah commented 8 years ago

Ok I found the problem I had a gcc 6 linked in my path. It works now Thanks for your quick response!

memsharded commented 8 years ago

Great! Thanks to you for reporting. Some comments:

Cheers