Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Compile error on Ubuntu 12.04 #167

Closed
sshamray opened this issue Nov 19, 2015 · 8 comments
Closed

Compile error on Ubuntu 12.04 #167

sshamray opened this issue Nov 19, 2015 · 8 comments

Comments

@sshamray
Copy link

Hello.
If you know, please help me.
I try to compile Ostinato from source by manual
https://github.com/pstavirs/ostinato/wiki/BuildingFromSource

But while I try to make then I receive error message:

/home/user/Documents/ostinato/ostinato_1/rpc/rpcconn.cpp:380: error: 'NewCallback' is not a member of 'google::protobuf'
google::protobuf::NewCallback(this, &RpcConnection::sendRpcReply,

My steps to do this:

  1. inatall qt
    $ sudo apt-get install qt4-default
    $ sudo apt-get install qt4-qmake
  2. install Protocol Buffers 2.3+ by instruction from: https://github.com/google/protobuf
    git clone https://github.com/google/protobuf
    $ ./configure
    $ make
    $ make check
    $ make install
  3. Install libpcap
    $ sudo apt-geanothert install libpcap
  4. Compiling Ostinato
    $ qmake
    $ make

And after compiling some files I have error message:

/home/user/Documents/ostinato/ostinato_1/rpc/rpcconn.cpp:380: error: 'NewCallback' is not a member of 'google::protobuf'
google::protobuf::NewCallback(this, &RpcConnection::sendRpcReply,

Why it's happens? Can you help me?
Thanks.

@pstavirs
Copy link
Owner

Maybe you are using protobuf version 3? You need protobuf version 2.x

Unless you are fairly sure its a bug or issue, please use the mailing list for such queries - there are more people there that can help you.

Closing the issue for now. Will reopen if a bug is indeed identified.

@pstavirs
Copy link
Owner

It was confirmed on the mailing list that the compilation issue reported here was indeed caused by protobuf version 3.x. See https://groups.google.com/forum/#!topic/ostinato/NVNGltYVobw

@rathnaTech
Copy link

Hello,
I am having the following issue please provide solution as soon as possible.

**QT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I../rpc -I/usr/include/qt5 -I/usr/include/qt5/QtScript -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtCore -I. -o pcapport.o pcapport.cpp
pcapport.cpp: In constructor ‘PcapPort::PortCapturer::PortCapturer(const char_)’:
pcapport.cpp:755:15: error: ‘fromAscii’ is not a member of ‘QString’
device_ = QString::fromAscii(device);
^
pcapport.cpp:762:49: error: ‘class QString’ has no member named ‘toAscii’
qDebug("cap file = %s", capFile_.fileName().toAscii().constData());
^
pcapport.cpp: In member function ‘virtual void PcapPort::PortCapturer::run()’:
pcapport.cpp:786:38: error: ‘class QString’ has no member named ‘toAscii’
handle_ = pcap_open_live(device_.toAscii().constData(), 65535,
^
pcapport.cpp:794:29: error: ‘class QString’ has no member named ‘toAscii’
device_.toAscii().constData());
^
pcapport.cpp:801:29: error: ‘class QString’ has no member named ‘toAscii’
device_.toAscii().constData(), errbuf);
^
pcapport.cpp:807:33: error: ‘class QString’ has no member named ‘toAscii’
capFile_.fileName().toAscii().constData());
^
make[1]: *_* [pcapport.o] Error 1
make[1]: Leaving directory `/home/nbox/Downloads/ostinato-master/server'
make: * [server-make_first] Error 2

@sshamray
Copy link
Author

I use QT4 - not QT5. And all ok)
This is a step by stwp instructions to run under Ubuntu 14.04LTS

Install packages

sudo apt-get install qt4-default
sudo apt-get install qt4-qmake
sudo apt-get install git
sudo apt-get install libpcap-dev
sudo apt-get install libprotobuf-dev
sudo apt-get install protobuf-compiler
sudo apt-get install protobuf-c-compiler
sudo apt-get install build-essential

https://github.com/pstavirs/ostinato/wiki/BuildingFromSource

git clone https://github.com/pstavirs/ostinato.git
qmake
make
make install

to run.
1.run drone as ROOT!!!
sudo drone

2.run ostinato
ostinato

@sebastic
Copy link

@pstavirs wrote:

Maybe you are using protobuf version 3? You need protobuf version 2.x
[...]
Closing the issue for now. Will reopen if a bug is indeed identified.

Debian is migrating to protobuf 3.x and the ostinato package failed to build due to this issue as reported in Debian Bug #835435.

Please consider re-opening this issue and supporting protobuf 3.x.

@kartikm
Copy link

kartikm commented Aug 26, 2016

As @sebastic mentioned. Otherwise, package need to removed from Debian :/

@pstavirs
Copy link
Owner

Have opened #193 to track protobuf 3.x support

@pstavirs
Copy link
Owner

Updates to this issue are available on #193 - please subscribe to that issue for further updates

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants