named-data-ndnSIM / ndnSIM

ndnSIM: NS-3 based NDN simulator
GNU General Public License v3.0
107 stars 163 forks source link

Compilation failed #89

Closed fam4r closed 4 years ago

fam4r commented 5 years ago

Commit af97d0f7a5bcdf94f887786a8d76a34939568378 fails compilation, given error:

[OTHER COMPILATION STUFF BEFORE]
[2884/3504] Compiling src/ndnSIM/apps/ndn-consumer.cpp
[2885/3504] Compiling src/ndnSIM/apps/ndn-producer.cpp
[2886/3504] Compiling src/ndnSIM/helper/ndn-face-container.cpp
[2887/3504] Compiling src/ndnSIM/helper/ndn-fib-helper.cpp
../src/ndnSIM/apps/ndn-consumer-pcon.cpp: In static member function ‘static ns3::TypeId ns3::ndn::ConsumerPcon::GetTypeId()’:
../src/ndnSIM/apps/ndn-consumer-pcon.cpp:44:31: error: ‘CC_ALGORITHM’ was not declared in this scope
                     EnumValue(CC_ALGORITHM::AIMD),
                               ^
../src/ndnSIM/apps/ndn-consumer-pcon.cpp:46:37: error: ‘CC_ALGORITHM’ is not a class, namespace, or enumeration
                     MakeEnumChecker(CC_ALGORITHM::AIMD, "AIMD", CC_ALGORITHM::BIC, "BIC",
                                     ^
../src/ndnSIM/apps/ndn-consumer-pcon.cpp:46:65: error: ‘CC_ALGORITHM’ is not a class, namespace, or enumeration
                     MakeEnumChecker(CC_ALGORITHM::AIMD, "AIMD", CC_ALGORITHM::BIC, "BIC",
                                                                 ^
../src/ndnSIM/apps/ndn-consumer-pcon.cpp:47:37: error: ‘CC_ALGORITHM’ is not a class, namespace, or enumeration
                                     CC_ALGORITHM::CUBIC, "CUBIC"))
                                     ^
../src/ndnSIM/apps/ndn-consumer-pcon.cpp: In member function ‘void ns3::ndn::ConsumerPcon::WindowIncrease()’:
../src/ndnSIM/apps/ndn-consumer-pcon.cpp:155:24: error: ‘CC_ALGORITHM’ has not been declared
   if (m_ccAlgorithm == CC_ALGORITHM::AIMD) {
                        ^
../src/ndnSIM/apps/ndn-consumer-pcon.cpp:163:29: error: ‘CC_ALGORITHM’ has not been declared
   else if (m_ccAlgorithm == CC_ALGORITHM::CUBIC) {
                             ^
../src/ndnSIM/apps/ndn-consumer-pcon.cpp:166:29: error: ‘CC_ALGORITHM’ has not been declared
   else if (m_ccAlgorithm == CC_ALGORITHM::BIC) {
                             ^
../src/ndnSIM/apps/ndn-consumer-pcon.cpp: In member function ‘void ns3::ndn::ConsumerPcon::WindowDecrease()’:
../src/ndnSIM/apps/ndn-consumer-pcon.cpp:184:26: error: ‘CC_ALGORITHM’ has not been declared
     if (m_ccAlgorithm == CC_ALGORITHM::AIMD) {
                          ^
../src/ndnSIM/apps/ndn-consumer-pcon.cpp:189:31: error: ‘CC_ALGORITHM’ has not been declared
     else if (m_ccAlgorithm == CC_ALGORITHM::CUBIC) {
                               ^
../src/ndnSIM/apps/ndn-consumer-pcon.cpp:192:31: error: ‘CC_ALGORITHM’ has not been declared
     else if (m_ccAlgorithm == CC_ALGORITHM::BIC) {
                               ^

Waf: Leaving directory `/home/ndn/ndnSIM-lastcommit/ns-3/build'
Build failed
 -> task in 'ns3-ndnSIM' failed (exit status 1): 
    {task 140077705962512: cxx ndn-consumer-pcon.cpp -> ndn-consumer-pcon.cpp.3.o}
['/usr/bin/g++', '-std=c++0x', '-std=c++11', '-O0', '-ggdb', '-g3', '-Wall', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-std=c++11', '-fPIC', '-pthread', '-I.', '-I..', '-Ins3/ndnSIM/NFD', '-I../ns3/ndnSIM/NFD', '-Isrc/ndnSIM/NFD/core', '-I../src/ndnSIM/NFD/core', '-Isrc/ndnSIM/NFD/daemon', '-I../src/ndnSIM/NFD/daemon', '-Isrc/ndnSIM/NFD/rib', '-I../src/ndnSIM/NFD/rib', '-Ins3/ndnSIM', '-I../ns3/ndnSIM', '-Ins3/ndnSIM/ndn-cxx', '-I../ns3/ndnSIM/ndn-cxx', '-I.', '-I..', '-I/usr/include', '-DNS3_BUILD_PROFILE_DEBUG', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IS_DEFAULT_CONSTRUCTIBLE=1', '-DHAVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE=1', '-DHAVE_IS_NOTHROW_MOVE_ASSIGNABLE=1', '-DHAVE_STD_TO_STRING=1', '-DHAVE_VECTOR_INSERT_ERASE_CONST_ITERATOR=1', '-DHAVE_PTHREAD=1', '-DHAVE_SQLITE3=1', '-DHAVE_OPENSSL=1', '-DHAVE_IF_TUN_H=1', '-DHAVE_SQLITE3=1', '../src/ndnSIM/apps/ndn-consumer-pcon.cpp', '-c', '-o', '/home/ndn/ndnSIM-lastcommit/ns-3/build/src/ndnSIM/apps/ndn-consumer-pcon.cpp.3.o']

Info:

# core dependencies
sudo apt install git python libsqlite3-0 libcrypto++-dev pkg-config openssl --yes

# compiler - dev tools - libraries - ndn-cxx prerequisites
sudo apt install build-essential libsqlite3-dev libcrypto++-dev libboost-all-dev libssl-dev git python-setuptools --yes

# NS-3 python bindings
sudo apt install python-dev python-pygraphviz python-kiwi python-pygoocanvas python-gnome2 python-rsvg ipython --yes

# NDNSIM
## Downloading
mkdir ndnSIM
cd ndnSIM
git clone https://github.com/named-data-ndnSIM/ns-3-dev.git ns-3
git clone https://github.com/named-data-ndnSIM/pybindgen.git pybindgen
git clone --recursive https://github.com/named-data-ndnSIM/ndnSIM.git ns-3/src/ndnSIM
## compiling and running
cd ns-3/
./waf configure --enable-examples --enable-tests
./waf
## system installation
sudo ./waf install
spirosmastorakis commented 5 years ago

@schneiderklaus, any idea?

gabearrobo commented 5 years ago

Hello,

Should not it be "CcAlgorithm" (as in the hpp file) instead of "CC_ALGORITHM"?

Thanks!

Best regards, Gabriel Arrobo

On Wed, Jul 25, 2018 at 7:45 AM Spyridon (Spyros) Mastorakis < notifications@github.com> wrote:

@schneiderklaus https://github.com/schneiderklaus, any idea?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/named-data-ndnSIM/ndnSIM/issues/89#issuecomment-407780170, or mute the thread https://github.com/notifications/unsubscribe-auth/AkhU3LWz4GGrdBgCNVzHtMl8-oPGG7GPks5uKIR4gaJpZM4VgNo2 .

schneiderklaus commented 5 years ago

@Gabriel Arrobo: Yeah that seems to be the problem.

I'll submit the fix to Gerrit.

cawka commented 5 years ago

I already pushed a fix to gerrit

schneiderklaus commented 5 years ago

Okay, thanks!

gabearrobo commented 5 years ago

@schneiderklaus, can you provide an example script that uses your ConsumerPcon app? I am thinking in a couple "code" improvements but I want to test my edits before I submit my changes

schneiderklaus commented 5 years ago

Sure, you can use the pcon-simple scenario file below.

Put both files in the scratch folder and rename pcon-simple.cc.txt to pcon-simple.cc (Github doesn't allow to upload cc files).

topo-simple.txt

pcon-simple.cc.txt

fam4r commented 5 years ago

Thank you all for your feedback and support! If you want, you can close the issue: now it build successfully.