Skip to content

BUILD Issue Ubuntu 18.x Protoc version issue #114

@gateway

Description

@gateway

Hi, I'm in hell right now trying to get all this neual stuff set up on ubuntu 18. I started with 16 it had issues now 18 etc.. anyhow long story short I have made my way thought torch, caffe , pytorch and have all that working. One of the software packages I'm using requires loadcaffe but when trying to build it complains about protoc which well on my system I have 2 of them and assuming both are to new to compile with.

build error:

gateway@gateway-media:~/temp/loadcaffe$  luarocks install loadcaffe
Installing https://raw.githubusercontent.com/torch/rocks/master/loadcaffe-1.0-0.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/loadcaffe-1.0-0.rockspec... switching to 'build' mode
Cloning into 'loadcaffe'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 18 (delta 0), reused 5 (delta 0), pack-reused 0
Receiving objects: 100% (18/18), 19.28 KiB | 9.64 MiB/s, done.
cmake -E make_directory build;
cd build;
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/gateway/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/gateway/torch/install/lib/luarocks/rocks/loadcaffe/1.0-0"; 
make
   
-- The C compiler identification is GNU 6.5.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Torch7 in /home/gateway/torch/install
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
CMake Warning at /usr/share/cmake-3.10/Modules/FindProtobuf.cmake:455 (message):
  Protobuf compiler version 3.6.1 doesn't match library version 3.0.0
Call Stack (most recent call first):
  CMakeLists.txt:7 (FIND_PACKAGE)


-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.0.0") 
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_loadcaffe-1.0-0-4095/loadcaffe/build
[ 25%] Running C++ protocol buffer compiler on caffe.proto
Scanning dependencies of target loadcaffe
[ 50%] Building CXX object CMakeFiles/loadcaffe.dir/loadcaffe.cpp.o
In file included from /tmp/luarocks_loadcaffe-1.0-0-4095/loadcaffe/loadcaffe.cpp:32:0:
/tmp/luarocks_loadcaffe-1.0-0-4095/loadcaffe/build/caffe.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is
 #error This file was generated by a newer version of protoc which is
  ^~~~~
/tmp/luarocks_loadcaffe-1.0-0-4095/loadcaffe/build/caffe.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
 #error incompatible with your Protocol Buffer headers.  Please update
  ^~~~~
/tmp/luarocks_loadcaffe-1.0-0-4095/loadcaffe/build/caffe.pb.h:14:2: error: #error your headers.
 #error your headers.
  ^~~~~
In file included from /tmp/luarocks_loadcaffe-1.0-0-4095/loadcaffe/loadcaffe.cpp:32:0:
/tmp/luarocks_loadcaffe-1.0-0-4095/loadcaffe/build/caffe.pb.h:25:10: fatal error: google/protobuf/generated_message_table_driven.h: No such file or directory
 #include <google/protobuf/generated_message_table_driven.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/loadcaffe.dir/build.make:70: recipe for target 'CMakeFiles/loadcaffe.dir/loadcaffe.cpp.o' failed
make[2]: *** [CMakeFiles/loadcaffe.dir/loadcaffe.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/loadcaffe.dir/all' failed
make[1]: *** [CMakeFiles/loadcaffe.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Error: Build error: Failed building.
gateway@gateway-media:~/temp/loadcaffe$ 


protoc versions

gateway@gateway-media:~/temp/loadcaffe$ protoc --version
libprotoc 3.6.1
gateway@gateway-media:~/temp/loadcaffe$ which protoc
/usr/local/bin/protoc
gateway@gateway-media:~/temp/loadcaffe$ /usr/bin/protoc --version
libprotoc 3.0.0

Any ideas on what I could to to get this to compile under this situation.

Btw thank you for all your hard work!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions