arthurgervais / Bitcoin-Simulator

Bitcoin and Blockchain Simulator
http://arthurgervais.github.io/Bitcoin-Simulator/
186 stars 75 forks source link

Adding --enable-examples #8

Open renintw opened 6 years ago

renintw commented 6 years ago

After adding

--enable-examples

in compile configuration

CXXFLAGS="-std=c++11" ./waf configure --build-profile=debug --with-pybindgen=/home/ren/Desktop/workspace/ns-allinone-3.25/pybindgen-0.17.0.post49+ng0e4e3bc --enable-mpi --enable-static --enable-tests

I got compile errors below:

./waf
Waf: Entering directory /home/ren/Desktop/workspace/ns-allinone-3.25/ns-3.25/build'
[2217/2457] Linking build/src/csma/examples/ns3.25-csma-broadcast-debug
[2222/2457] Linking build/src/dsdv/examples/ns3.25-dsdv-manet-debug
[2223/2457] Linking build/src/fd-net-device/examples/ns3.25-fd-emu-onoff-debug
[2231/2457] Linking build/src/traffic-control/examples/ns3.25-codel-vs-pfifo-basic-test-debug
./libns3.25-applications-debug.a(bitcoin-topology-helper.cc.1.o): In function ns3::BitcoinTopologyHelper::BitcoinTopologyHelper(unsigned int, unsigned int, unsigned int, ns3::BitcoinRegion*, ns3::Cryptocurrency, int, int, double, unsigned int)':
bitcoin-topology-helper.cc:(.text+0x90a6): undefined reference to ns3::PointToPointHelper::PointToPointHelper()'
bitcoin-topology-helper.cc:(.text+0xa2f5): undefined reference to ns3::PointToPointHelper::SetDeviceAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ns3::AttributeValue const&)'
bitcoin-topology-helper.cc:(.text+0xa3ad): undefined reference to ns3::PointToPointHelper::SetChannelAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ns3::AttributeValue const&)'
bitcoin-topology-helper.cc:(.text+0xa497): undefined reference to ns3::PointToPointHelper::Install(ns3::Ptr<ns3::Node>, ns3::Ptr<ns3::Node>)'
bitcoin-topology-helper.cc:(.text+0xb142): undefined reference to ns3::PointToPointHelper::SetDeviceAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ns3::AttributeValue const&)'
bitcoin-topology-helper.cc:(.text+0xb1fa): undefined reference to ns3::PointToPointHelper::SetChannelAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ns3::AttributeValue const&)'
bitcoin-topology-helper.cc:(.text+0xb2dc): undefined reference to ns3::PointToPointHelper::Install(ns3::Ptr<ns3::Node>, ns3::Ptr<ns3::Node>)'
./libns3.25-applications-debug.a(bitcoin-topology-helper.cc.1.o): In function ns3::PointToPointHelper::~PointToPointHelper()':
bitcoin-topology-helper.cc:(.text._ZN3ns318PointToPointHelperD2Ev[_ZN3ns318PointToPointHelperD5Ev]+0xd): undefined reference to vtable for ns3::PointToPointHelper'
bitcoin-topology-helper.cc:(.text._ZN3ns318PointToPointHelperD2Ev[_ZN3ns318PointToPointHelperD5Ev]+0x19): undefined reference to vtable for ns3::PointToPointHelper'
collect2: error: ld returned 1 exit status

./libns3.25-applications-debug.a(bitcoin-topology-helper.cc.1.o): In function ns3::BitcoinTopologyHelper::BitcoinTopologyHelper(unsigned int, unsigned int, unsigned int, ns3::BitcoinRegion*, ns3::Cryptocurrency, int, int, double, unsigned int)':
bitcoin-topology-helper.cc:(.text+0x90a6): undefined reference to ns3::PointToPointHelper::PointToPointHelper()'
bitcoin-topology-helper.cc:(.text+0xa2f5): undefined reference to ns3::PointToPointHelper::SetDeviceAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ns3::AttributeValue const&)'
bitcoin-topology-helper.cc:(.text+0xa3ad): undefined reference to ns3::PointToPointHelper::SetChannelAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ns3::AttributeValue const&)'
bitcoin-topology-helper.cc:(.text+0xa497): undefined reference to ns3::PointToPointHelper::Install(ns3::Ptr<ns3::Node>, ns3::Ptr<ns3::Node>)'
bitcoin-topology-helper.cc:(.text+0xb142): undefined reference to ns3::PointToPointHelper::SetDeviceAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ns3::AttributeValue const&)'
bitcoin-topology-helper.cc:(.text+0xb1fa): undefined reference to ns3::PointToPointHelper::SetChannelAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ns3::AttributeValue const&)'
bitcoin-topology-helper.cc:(.text+0xb2dc): undefined reference to ns3::PointToPointHelper::Install(ns3::Ptr<ns3::Node>, ns3::Ptr<ns3::Node>)'
./libns3.25-applications-debug.a(bitcoin-topology-helper.cc.1.o): In function ns3::PointToPointHelper::~PointToPointHelper()':
bitcoin-topology-helper.cc:(.text._ZN3ns318PointToPointHelperD2Ev[_ZN3ns318PointToPointHelperD5Ev]+0xd): undefined reference to vtable for ns3::PointToPointHelper'
bitcoin-topology-helper.cc:(.text._ZN3ns318PointToPointHelperD2Ev[_ZN3ns318PointToPointHelperD5Ev]+0x19): undefined reference to vtable for ns3::PointToPointHelper'
collect2: error: ld returned 1 exit status

../libns3.25-applications-debug.a(bitcoin-topology-helper.cc.1.o): In function ns3::BitcoinTopologyHelper::BitcoinTopologyHelper(unsigned int, unsigned int, unsigned int, ns3::BitcoinRegion*, ns3::Cryptocurrency, int, int, double, unsigned int)':
bitcoin-topology-helper.cc:(.text+0x90a6): undefined reference to ns3::PointToPointHelper::PointToPointHelper()'
bitcoin-topology-helper.cc:(.text+0xa2f5): undefined reference to ns3::PointToPointHelper::SetDeviceAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ns3::AttributeValue const&)'
bitcoin-topology-helper.cc:(.text+0xa3ad): undefined reference to ns3::PointToPointHelper::SetChannelAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ns3::AttributeValue const&)'
bitcoin-topology-helper.cc:(.text+0xa497): undefined reference to ns3::PointToPointHelper::Install(ns3::Ptr<ns3::Node>, ns3::Ptr<ns3::Node>)'
bitcoin-topology-helper.cc:(.text+0xb142): undefined reference to ns3::PointToPointHelper::SetDeviceAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ns3::AttributeValue const&)'
bitcoin-topology-helper.cc:(.text+0xb1fa): undefined reference to ns3::PointToPointHelper::SetChannelAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ns3::AttributeValue const&)'
bitcoin-topology-helper.cc:(.text+0xb2dc): undefined reference to ns3::PointToPointHelper::Install(ns3::Ptr<ns3::Node>, ns3::Ptr<ns3::Node>)'
./libns3.25-applications-debug.a(bitcoin-topology-helper.cc.1.o): In function ns3::PointToPointHelper::~PointToPointHelper()':
bitcoin-topology-helper.cc:(.text._ZN3ns318PointToPointHelperD2Ev[_ZN3ns318PointToPointHelperD5Ev]+0xd): undefined reference to vtable for ns3::PointToPointHelper'
bitcoin-topology-helper.cc:(.text._ZN3ns318PointToPointHelperD2Ev[_ZN3ns318PointToPointHelperD5Ev]+0x19): undefined reference tovtable for ns3::PointToPointHelper'
collect2: error: ld returned 1 exit status

Waf: Leaving directory /home/ren/Desktop/workspace/ns-allinone-3.25/ns-3.25/build'
Build failed
 -> task in 'csma-broadcast' failed (exit status 1): 
    {task 139675765720016: cxxprogram csma-broadcast.cc.2.o -> ns3.25-csma-broadcast-debug}
['/usr/bin/g++', '-pthread', '-pthread', '-Wl,--enable-new-dtags', '-Wl,-rpath,/usr/lib/openmpi/lib', '-pthread', 'src/csma/examples/csma-broadcast.cc.2.o', '-o', '/home/ren/Desktop/workspace/ns-allinone-3.25/ns-3.25/build/src/csma/examples/ns3.25-csma-broadcast-debug', '-Wl,-rpath,/usr/lib/openmpi/lib', '-Wl,-Bstatic,--whole-archive', '-L.', '-lns3.25-csma-debug', '-lns3.25-applications-debug', '-lns3.25-internet-debug', '-lns3.25-bridge-debug', '-lns3.25-mpi-debug', '-lns3.25-traffic-control-debug', '-lns3.25-config-store-debug', '-lns3.25-network-debug', '-lns3.25-stats-debug', '-lns3.25-core-debug', '-Wl,-Bdynamic,--no-whole-archive', '-L/usr/lib/openmpi/lib', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lsqlite3', '-lmpi_cxx', '-lmpi', '-lgtk-x11-2.0', '-lgdk-x11-2.0', '-lpangocairo-1.0', '-latk-1.0', '-lcairo', '-lgdk_pixbuf-2.0', '-lgio-2.0', '-lpangoft2-1.0', '-lpango-1.0', '-lgobject-2.0', '-lglib-2.0', '-lfontconfig', '-lfreetype', '-lxml2']
 -> task in 'fd-emu-onoff' failed (exit status 1): 
    {task 139675765425744: cxxprogram fd-emu-onoff.cc.7.o -> ns3.25-fd-emu-onoff-debug}
['/usr/bin/g++', '-pthread', '-pthread', '-Wl,--enable-new-dtags', '-Wl,-rpath,/usr/lib/openmpi/lib', '-pthread', 'src/fd-net-device/examples/fd-emu-onoff.cc.7.o', '-o', '/home/ren/Desktop/workspace/ns-allinone-3.25/ns-3.25/build/src/fd-net-device/examples/ns3.25-fd-emu-onoff-debug', '-Wl,-rpath,/usr/lib/openmpi/lib', '-Wl,-Bstatic,--whole-archive', '-L.', '-lns3.25-fd-net-device-debug', '-lns3.25-applications-debug', '-lns3.25-internet-debug', '-lns3.25-bridge-debug', '-lns3.25-mpi-debug', '-lns3.25-traffic-control-debug', '-lns3.25-config-store-debug', '-lns3.25-network-debug', '-lns3.25-stats-debug', '-lns3.25-core-debug', '-Wl,-Bdynamic,--no-whole-archive', '-L/usr/lib/openmpi/lib', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lsqlite3', '-lmpi_cxx', '-lmpi', '-lgtk-x11-2.0', '-lgdk-x11-2.0', '-lpangocairo-1.0', '-latk-1.0', '-lcairo', '-lgdk_pixbuf-2.0', '-lgio-2.0', '-lpangoft2-1.0', '-lpango-1.0', '-lgobject-2.0', '-lglib-2.0', '-lfontconfig', '-lfreetype', '-lxml2']
 -> task in 'dsdv-manet' failed (exit status 1): 
    {task 139675765763024: cxxprogram dsdv-manet.cc.1.o -> ns3.25-dsdv-manet-debug}
['/usr/bin/g++', '-pthread', '-pthread', '-Wl,--enable-new-dtags', '-Wl,-rpath,/usr/lib/openmpi/lib', '-pthread', 'src/dsdv/examples/dsdv-manet.cc.1.o', '-o', '/home/ren/Desktop/workspace/ns-allinone-3.25/ns-3.25/build/src/dsdv/examples/ns3.25-dsdv-manet-debug', '-Wl,-rpath,/usr/lib/openmpi/lib', '-Wl,-Bstatic,--whole-archive', '-L.', '-lns3.25-wifi-debug', '-lns3.25-propagation-debug', '-lns3.25-mobility-debug', '-lns3.25-energy-debug', '-lns3.25-dsdv-debug', '-lns3.25-applications-debug', '-lns3.25-internet-debug', '-lns3.25-bridge-debug', '-lns3.25-mpi-debug', '-lns3.25-traffic-control-debug', '-lns3.25-config-store-debug', '-lns3.25-network-debug', '-lns3.25-stats-debug', '-lns3.25-core-debug', '-Wl,-Bdynamic,--no-whole-archive', '-L/usr/lib/openmpi/lib', '-lrt', '-lgsl', '-lgslcblas', '-lm', '-lsqlite3', '-lmpi_cxx', '-lmpi', '-lgtk-x11-2.0', '-lgdk-x11-2.0', '-lpangocairo-1.0', '-latk-1.0', '-lcairo', '-lgdk_pixbuf-2.0', '-lgio-2.0', '-lpangoft2-1.0', '-lpango-1.0', '-lgobject-2.0', '-lglib-2.0', '-lfontconfig', '-lfreetype', '-lxml2']

How can I fix it?

thx