LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-22-2020, 08:19 AM   #1
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Protobuf compiler version 3.0.0 doesn't match library version 2.6.1 - Aspera Transfer SDK


Have downloaded Transfer SDK from here:

https://api.ibm.com/explorer/catalog...k/doc/overview

Have installed protobuf-2.6.1 from source. Default protobuf that comes with Ubuntu is of higher version.

Code:
    ~$ protoc --version
    libprotoc 2.6.1
cmake .. result:

Code:
    /aspera/transfer-sdk/linux-amd64/connectors/cpp/build$ cmake ..
    -- The C compiler identification is GNU 7.5.0
    -- The CXX compiler identification is GNU 7.5.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 Protobuf: /usr/local/lib/libprotobuf.so;-lpthread (found version "2.6.1") 
    -- Configuring done
    -- Generating done
    -- Build files have been written to: .....work/aspera/transfer-sdk/linux-amd64/connectors/cpp/build
It is detecting protobuf 2.6.1 but make doesn't want this version of protobuf.


Code:
    $ make
    Scanning dependencies of target asperatransfer
    [ 14%] Building CXX object CMakeFiles/asperatransfer.dir/transfer.pb.cc.o
    In file included from .../work/aspera/transfer-sdk/linux-amd64/connectors/cpp/transfer.pb.cc:4:0:
    .../work/aspera/transfer-sdk/linux-amd64/connectors/cpp/transfer.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
     #error This file was generated by an older version of protoc which is
      ^~~~~
    .../work/aspera/transfer-sdk/linux-amd64/connectors/cpp/transfer.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
     #error incompatible with your Protocol Buffer headers. Please
      ^~~~~
    .../work/aspera/transfer-sdk/linux-amd64/connectors/cpp/transfer.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
     #error regenerate this file with a newer version of protoc.
According to the errors of make I am not sure which version of protobuf does it want?

What more information should I provide here?
Please help.
 
Old 10-22-2020, 09:42 AM   #2
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731

Original Poster
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Protobuf compiler version 3.0.0 doesn't match library version 2.6.1 - Aspera Transfer SDK

I am attempting to compile the sample programs from this tar ball: https://api.ibm.com/explorer/catalog...k/doc/overview


Code:
    $ cmake ..
    -- The C compiler identification is GNU 7.5.0
    -- The CXX compiler identification is GNU 7.5.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
    CMake Warning at /usr/local/share/cmake-3.16/Modules/FindProtobuf.cmake:499 (message):
      Protobuf compiler version 3.0.0 doesn't match library version 2.6.1
    Call Stack (most recent call first):
      CMakeLists.txt:11 (include)
    
    
    -- Found Protobuf: /usr/local/lib/libprotobuf.so;-lpthread (found version "2.6.1") 
    CMake Warning at /usr/local/share/cmake-3.16/Modules/FindProtobuf.cmake:499 (message):
      Protobuf compiler version 3.0.0 doesn't match library version 2.6.1
    Call Stack (most recent call first):
      CMakeLists.txt:12 (find_package)
    
    
    -- Configuring done
    -- Generating done
What does this error message mean? How am I supposed to upgrade libprotobuf.so found in /usr/local/lib?

Does this mean I am supposed to download and compile protobuf by source? Currently I installed it through apt-get.

I am on Ubuntu 18.04.

Code:
    ~$ which protoc
    /usr/bin/protoc
    
    ~$ protoc --version
    libprotoc 3.0.0
 
Old 10-22-2020, 12:13 PM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,366

Rep: Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335
Protobuf is in cmake. If there's a protobuf in your download, there could be a version mismatch. With the typical linux 3 figure versions package-x.y.z, in increment in a number means as follows

z+1 = bug fix
y+1 = feature addition
x+1 = compatability break.

So somehow protobuf-2.n.n is being asked to talk to protobuf-3.n.n and they're incompatible.
 
1 members found this post helpful.
Old 10-23-2020, 12:56 AM   #4
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731

Original Poster
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
I realized that:
Quote:
Found Protobuf: /usr/local/lib/libprotobuf.so;-lpthread (found version "2.6.1")
What should be done to install version 3 of libprotobuf.so?
 
Old 10-23-2020, 03:44 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,366

Rep: Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335Reputation: 2335
It should be in cmake. If not find out if your (undisclosed) distro installs it se[paraltely. You mat want to check the lib is found by stuff also.
 
Old 10-23-2020, 08:01 AM   #6
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731

Original Poster
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
I deleted this .so manually, and manually installed version 3.13.1.
That solved this problem.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to use Protobuf for data interchange LXer Syndicated Linux News 0 10-22-2019 05:03 AM
How to capture 1000 lines before a string match and 1000 line a string match including line of string match ? sysmicuser Linux - Newbie 12 11-14-2017 05:21 AM
"Unable to run mksdcard SDK tool." tried to install android SDK Carl_cj Ubuntu 15 01-21-2016 02:01 PM
LXer: The iPhone SDK and free software: not a match LXer Syndicated Linux News 0 04-16-2008 03:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration