Skip to content

Added build scripts to enable easy building for other environments#1

Open
dagelf wants to merge 29 commits into
pollere:masterfrom
dagelf:master
Open

Added build scripts to enable easy building for other environments#1
dagelf wants to merge 29 commits into
pollere:masterfrom
dagelf:master

Conversation

@dagelf
Copy link
Copy Markdown

@dagelf dagelf commented Mar 3, 2018

No description provided.

@dagelf dagelf changed the title Really cool, was about to finally do something similar but now I don't have to. Thanks :-) Added build scripts to enable easy building for other environments Apr 17, 2018
@dagelf
Copy link
Copy Markdown
Author

dagelf commented Apr 17, 2018

So, how do you get an old Linux to support C++14?

coenraad@e7450:/usr/src/pping$ make g++ -I/home/coenraad/src/libtins/include -std=c++14 -g -O3 -Wall -o pping pping.cpp -L/home/coenraad/src/libtins/lib -ltins -lpcap g++: error: unrecognized command line option ‘-std=c++14’ make: *** [pping] Error 1 coenraad@e7450:/usr/src/pping$ vi Makefile coenraad@e7450:/usr/src/pping$ make g++ -I/home/coenraad/src/libtins/include -std=c++11 -g -O3 -Wall -o pping pping.cpp -L/home/coenraad/src/libtins/lib -ltins -lpcap /tmp/cc2kBvPD.o: In function `main': /usr/src/pping/pping.cpp:504: undefined reference to `Tins::SnifferConfiguration::SnifferConfiguration()' /usr/src/pping/pping.cpp:505: undefined reference to `Tins::SnifferConfiguration::set_filter(std::string const&)' /usr/src/pping/pping.cpp:506: undefined reference to `Tins::SnifferConfiguration::set_promisc_mode(bool)' /usr/src/pping/pping.cpp:507: undefined reference to `Tins::SnifferConfiguration::set_snap_len(unsigned int)' /usr/src/pping/pping.cpp:508: undefined reference to `Tins::SnifferConfiguration::set_timeout(unsigned int)' /usr/src/pping/pping.cpp:512: undefined reference to `Tins::Sniffer::Sniffer(std::string const&, Tins::SnifferConfiguration const&)' /usr/src/pping/pping.cpp:536: undefined reference to `Tins::BaseSniffer::begin()' /usr/src/pping/pping.cpp:536: undefined reference to `Tins::BaseSniffer::end()' /tmp/cc2kBvPD.o: In function `process_packet': /usr/src/pping/pping.cpp:255: undefined reference to `Tins::Timestamp::seconds() const' /usr/src/pping/pping.cpp:267: undefined reference to `Tins::Timestamp::seconds() const' /usr/src/pping/pping.cpp:268: undefined reference to `Tins::Timestamp::microseconds() const' /usr/src/pping/pping.cpp:235: undefined reference to `Tins::TCP::flags() const' /usr/src/pping/pping.cpp:257: undefined reference to `Tins::Timestamp::seconds() const' /usr/src/pping/pping.cpp:259: undefined reference to `Tins::Timestamp::microseconds() const' /tmp/cc2kBvPD.o: In function `main': /usr/src/pping/pping.cpp:521: undefined reference to `Tins::FileSniffer::FileSniffer(std::string const&, Tins::SnifferConfiguration const&)' collect2: error: ld returned 1 exit status make: *** [pping] Error 1 coenraad@e7450:/usr/src/pping$

Short answer: you don't. I have libtins1 and libtins-dev installed... No time to figure it out. Solution:

apt-get install docker.io; cd docker; ./go.sh

Build done... exactly dockers' initial use case.

./pping
Works.

@jon-da-thon
Copy link
Copy Markdown

Really cool, was about to finally do something similar but now I don't have to. Thanks :-)

hah same @dagelf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants