Re: Error while running first.cc

203 views
Skip to first unread message
Message has been deleted

Jay Patel

unread,
Sep 4, 2019, 9:25:34 AM9/4/19
to ns-3-...@googlegroups.com
Hi there,

I think there might be issue with your building ns. Did you configure ./waf with examples ? Because error says that no example program is found in scratch, please copy the file first.cc from your ns-3.30/example/tutorial and paste the same in ns-3.30/scratch and then try to compile it. It worked like charm.

Thanks.

Regards,
Jay

On Wed, Sep 4, 2019 at 10:20 AM Boong Baang <bipl...@gmail.com> wrote:
I have done the installation as per the documentation, and all my tests passed successfully. Tio verify the installation, I ran the Hello Simulator program and get the desired output.
However, when I run the first.cc from my scratch folder, I get the following error.
./waf --run scratch/myfirst

Waf: Entering directory `/home/winser/ns-allinone-3.30/ns-3.30/build'
program 'scratch/myfirst' not found; available programs are: ['aodv', 'src/aodv/examples/aodv', 'three-gpp-http-example', 'src/applications/examples/three-gpp-http-example', 'csma-bridge', 'src/bridge/examples/csma-bridge', 'csma-bridge-one-hop', 'src/bridge/examples/csma-bridge-one-hop', 'buildings-pathloss-profiler', 'src/buildings/examples/buildings-pathloss-profiler', 'config-store-save', 'src/config-store/examples/config-store-save', 'main-callback', 'src/core/examples/main-callback', 'sample-simulator', 'src/core/examples/sample-simulator', 'main-ptr', 'src/core/examples/main-ptr', 'main-random-variable-stream', 'src/core/examples/main-random-variable-stream', 'sample-random-variable', 'src/core/examples/sample-random-variable', 'sample-random-variable-stream', 'src/core/examples/sample-random-variable-stream', 'command-line-example', 'src/core/examples/command-line-example', 'hash-example', 'src/core/examples/hash-example', 'sample-log-time-format', 'src/core/examples/sample-log-time-format', 'test-string-value-formatting', 'src/core/examples/test-string-value-formatting', 'sample-show-progress', 'src/core/examples/sample-show-progress', 'main-test-sync', 'src/core/examples/main-test-sync', 'csma-one-subnet', 'src/csma/examples/csma-one-subnet', 'csma-broadcast', 'src/csma/examples/csma-broadcast', 'csma-packet-socket', 'src/csma/examples/csma-packet-socket', 'csma-multicast', 'src/csma/examples/csma-multicast', 'csma-raw-ip-socket', 'src/csma/examples/csma-raw-ip-socket', 'csma-ping', 'src/csma/examples/csma-ping', 'csma-star', 'src/csma-layout/examples/csma-star', 'dsdv-manet', 'src/dsdv/examples/dsdv-manet', 'dsr', 'src/dsr/examples/dsr', 'li-ion-energy-source', 'src/energy/examples/li-ion-energy-source', 'rv-battery-model-test', 'src/energy/examples/rv-battery-model-test', 'basic-energy-model-test', 'src/energy/examples/basic-energy-model-test', 'dummy-network', 'src/fd-net-device/examples/dummy-network', 'fd2fd-onoff', 'src/fd-net-device/examples/fd2fd-onoff', 'realtime-dummy-network', 'src/fd-net-device/examples/realtime-dummy-network', 'realtime-fd2fd-onoff', 'src/fd-net-device/examples/realtime-fd2fd-onoff', 'fd-emu-ping', 'src/fd-net-device/examples/fd-emu-ping', 'fd-emu-udp-echo', 'src/fd-net-device/examples/fd-emu-udp-echo', 'fd-emu-onoff', 'src/fd-net-device/examples/fd-emu-onoff', 'fd-tap-ping', 'src/fd-net-device/examples/fd-tap-ping', 'fd-tap-ping6', 'src/fd-net-device/examples/fd-tap-ping6', 'main-simple', 'src/internet/examples/main-simple', 'dhcp-example', 'src/internet-apps/examples/dhcp-example', 'lr-wpan-packet-print', 'src/lr-wpan/examples/lr-wpan-packet-print', 'lr-wpan-phy-test', 'src/lr-wpan/examples/lr-wpan-phy-test', 'lr-wpan-data', 'src/lr-wpan/examples/lr-wpan-data', 'lr-wpan-error-model-plot', 'src/lr-wpan/examples/lr-wpan-error-model-plot', 'lr-wpan-error-distance-plot', 'src/lr-wpan/examples/lr-wpan-error-distance-plot', 'lena-cqi-threshold', 'src/lte/examples/lena-cqi-threshold', 'lena-dual-stripe', 'src/lte/examples/lena-dual-stripe', 'lena-fading', 'src/lte/examples/lena-fading', 'lena-intercell-interference', 'src/lte/examples/lena-intercell-interference', 'lena-ipv6-addr-conf', 'src/lte/examples/lena-ipv6-addr-conf', 'lena-ipv6-ue-rh', 'src/lte/examples/lena-ipv6-ue-rh', 'lena-ipv6-ue-ue', 'src/lte/examples/lena-ipv6-ue-ue', 'lena-pathloss-traces', 'src/lte/examples/lena-pathloss-traces', 'lena-profiling', 'src/lte/examples/lena-profiling', 'lena-rem', 'src/lte/examples/lena-rem', 'lena-rem-sector-antenna', 'src/lte/examples/lena-rem-sector-antenna', 'lena-rlc-traces', 'src/lte/examples/lena-rlc-traces', 'lena-simple', 'src/lte/examples/lena-simple', 'lena-simple-epc', 'src/lte/examples/lena-simple-epc', 'lena-simple-epc-backhaul', 'src/lte/examples/lena-simple-epc-backhaul', 'lena-deactivate-bearer', 'src/lte/examples/lena-deactivate-bearer', 'lena-x2-handover', 'src/lte/examples/lena-x2-handover', 'lena-x2-handover-measures', 'src/lte/examples/lena-x2-handover-measures', 'lena-frequency-reuse', 'src/lte/examples/lena-frequency-reuse', 'lena-distributed-ffr', 'src/lte/examples/lena-distributed-ffr', 'lena-uplink-power-control', 'src/lte/examples/lena-uplink-power-control', 'lena-radio-link-failure', 'src/lte/examples/lena-radio-link-failure', 'lena-simple-epc-emu', 'src/lte/examples/lena-simple-epc-emu', 'mesh', 'src/mesh/examples/mesh', 'main-grid-topology', 'src/mobility/examples/main-grid-topology', 'main-random-topology', 'src/mobility/examples/main-random-topology', 'main-random-walk', 'src/mobility/examples/main-random-walk', 'mobility-trace-example', 'src/mobility/examples/mobility-trace-example', 'ns2-mobility-trace', 'src/mobility/examples/ns2-mobility-trace', 'bonnmotion-ns2-example', 'src/mobility/examples/bonnmotion-ns2-example', 'simple-distributed', 'src/mpi/examples/simple-distributed', 'third-distributed', 'src/mpi/examples/third-distributed', 'nms-p2p-nix-distributed', 'src/mpi/examples/nms-p2p-nix-distributed', 'simple-distributed-empty-node', 'src/mpi/examples/simple-distributed-empty-node', 'dumbbell-animation', 'src/netanim/examples/dumbbell-animation', 'grid-animation', 'src/netanim/examples/grid-animation', 'star-animation', 'src/netanim/examples/star-animation', 'wireless-animation', 'src/netanim/examples/wireless-animation', 'uan-animation', 'src/netanim/examples/uan-animation', 'colors-link-description', 'src/netanim/examples/colors-link-description', 'resources-counters', 'src/netanim/examples/resources-counters', 'main-packet-header', 'src/network/examples/main-packet-header', 'main-packet-tag', 'src/network/examples/main-packet-tag', 'packet-socket-apps', 'src/network/examples/packet-socket-apps', 'nix-simple', 'src/nix-vector-routing/examples/nix-simple', 'nms-p2p-nix', 'src/nix-vector-routing/examples/nms-p2p-nix', 'simple-point-to-point-olsr', 'src/olsr/examples/simple-point-to-point-olsr', 'olsr-hna', 'src/olsr/examples/olsr-hna', 'main-attribute-value', 'src/point-to-point/examples/main-attribute-value', 'main-propagation-loss', 'src/propagation/examples/main-propagation-loss', 'jakes-propagation-model-example', 'src/propagation/examples/jakes-propagation-model-example', 'example-sixlowpan', 'src/sixlowpan/examples/example-sixlowpan', 'example-ping-lr-wpan', 'src/sixlowpan/examples/example-ping-lr-wpan', 'adhoc-aloha-ideal-phy', 'src/spectrum/examples/adhoc-aloha-ideal-phy', 'adhoc-aloha-ideal-phy-matrix-propagation-loss-model', 'src/spectrum/examples/adhoc-aloha-ideal-phy-matrix-propagation-loss-model', 'adhoc-aloha-ideal-phy-with-microwave-oven', 'src/spectrum/examples/adhoc-aloha-ideal-phy-with-microwave-oven', 'tv-trans-example', 'src/spectrum/examples/tv-trans-example', 'tv-trans-regional-example', 'src/spectrum/examples/tv-trans-regional-example', 'gnuplot-example', 'src/stats/examples/gnuplot-example', 'double-probe-example', 'src/stats/examples/double-probe-example', 'time-probe-example', 'src/stats/examples/time-probe-example', 'gnuplot-aggregator-example', 'src/stats/examples/gnuplot-aggregator-example', 'gnuplot-helper-example', 'src/stats/examples/gnuplot-helper-example', 'file-aggregator-example', 'src/stats/examples/file-aggregator-example', 'file-helper-example', 'src/stats/examples/file-helper-example', 'tap-csma', 'src/tap-bridge/examples/tap-csma', 'tap-csma-virtual-machine', 'src/tap-bridge/examples/tap-csma-virtual-machine', 'tap-wifi-virtual-machine', 'src/tap-bridge/examples/tap-wifi-virtual-machine', 'tap-wifi-dumbbell', 'src/tap-bridge/examples/tap-wifi-dumbbell', 'topology-example-sim', 'src/topology-read/examples/topology-example-sim', 'red-tests', 'src/traffic-control/examples/red-tests', 'red-vs-ared', 'src/traffic-control/examples/red-vs-ared', 'adaptive-red-tests', 'src/traffic-control/examples/adaptive-red-tests', 'pfifo-vs-red', 'src/traffic-control/examples/pfifo-vs-red', 'codel-vs-pfifo-basic-test', 'src/traffic-control/examples/codel-vs-pfifo-basic-test', 'codel-vs-pfifo-asymmetric', 'src/traffic-control/examples/codel-vs-pfifo-asymmetric', 'pie-example', 'src/traffic-control/examples/pie-example', 'uan-cw-example', 'src/uan/examples/uan-cw-example', 'uan-rc-example', 'src/uan/examples/uan-rc-example', 'uan-raw-example', 'src/uan/examples/uan-raw-example', 'uan-ipv4-example', 'src/uan/examples/uan-ipv4-example', 'uan-ipv6-example', 'src/uan/examples/uan-ipv6-example', 'uan-6lowpan-example', 'src/uan/examples/uan-6lowpan-example', 'virtual-net-device', 'src/virtual-net-device/examples/virtual-net-device', 'wave-simple-80211p', 'src/wave/examples/wave-simple-80211p', 'wave-simple-device', 'src/wave/examples/wave-simple-device', 'vanet-routing-compare', 'src/wave/examples/vanet-routing-compare', 'wifi-phy-test', 'src/wifi/examples/wifi-phy-test', 'test-interference-helper', 'src/wifi/examples/test-interference-helper', 'wifi-manager-example', 'src/wifi/examples/wifi-manager-example', 'wifi-trans-example', 'src/wifi/examples/wifi-trans-example', 'wifi-phy-configuration', 'src/wifi/examples/wifi-phy-configuration', 'wimax-ipv4', 'src/wimax/examples/wimax-ipv4', 'wimax-multicast', 'src/wimax/examples/wimax-multicast', 'wimax-simple', 'src/wimax/examples/wimax-simple', 'matrix-topology', 'examples/matrix-topology/matrix-topology', 'socket-bound-static-routing', 'examples/socket/socket-bound-static-routing', 'socket-bound-tcp-static-routing', 'examples/socket/socket-bound-tcp-static-routing', 'socket-options-ipv4', 'examples/socket/socket-options-ipv4', 'socket-options-ipv6', 'examples/socket/socket-options-ipv6', 'tcp-large-transfer', 'examples/tcp/tcp-large-transfer', 'tcp-nsc-lfn', 'examples/tcp/tcp-nsc-lfn', 'tcp-nsc-zoo', 'examples/tcp/tcp-nsc-zoo', 'tcp-star-server', 'examples/tcp/tcp-star-server', 'star', 'examples/tcp/star', 'tcp-bulk-send', 'examples/tcp/tcp-bulk-send', 'tcp-pcap-nanosec-example', 'examples/tcp/tcp-pcap-nanosec-example', 'tcp-nsc-comparison', 'examples/tcp/tcp-nsc-comparison', 'tcp-variants-comparison', 'examples/tcp/tcp-variants-comparison', 'tcp-pacing', 'examples/tcp/tcp-pacing', 'realtime-udp-echo', 'examples/realtime/realtime-udp-echo', 'wifi-example-sim', 'examples/stats/wifi-example-sim', 'simple-error-model', 'examples/error-model/simple-error-model', 'mixed-wired-wireless', 'examples/wireless/mixed-wired-wireless', 'wifi-adhoc', 'examples/wireless/wifi-adhoc', 'wifi-clear-channel-cmu', 'examples/wireless/wifi-clear-channel-cmu', 'wifi-ap', 'examples/wireless/wifi-ap', 'wifi-wired-bridging', 'examples/wireless/wifi-wired-bridging', 'multirate', 'examples/wireless/multirate', 'wifi-simple-adhoc', 'examples/wireless/wifi-simple-adhoc', 'wifi-simple-adhoc-grid', 'examples/wireless/wifi-simple-adhoc-grid', 'wifi-simple-infra', 'examples/wireless/wifi-simple-infra', 'wifi-simple-interference', 'examples/wireless/wifi-simple-interference', 'wifi-blockack', 'examples/wireless/wifi-blockack', 'dsss-validation', 'examples/wireless/dsss-validation', 'ofdm-validation', 'examples/wireless/ofdm-validation', 'ofdm-ht-validation', 'examples/wireless/ofdm-ht-validation', 'ofdm-vht-validation', 'examples/wireless/ofdm-vht-validation', 'wifi-hidden-terminal', 'examples/wireless/wifi-hidden-terminal', 'ht-wifi-network', 'examples/wireless/ht-wifi-network', 'vht-wifi-network', 'examples/wireless/vht-wifi-network', 'wifi-timing-attributes', 'examples/wireless/wifi-timing-attributes', 'wifi-sleep', 'examples/wireless/wifi-sleep', 'power-adaptation-distance', 'examples/wireless/power-adaptation-distance', 'power-adaptation-interference', 'examples/wireless/power-adaptation-interference', 'rate-adaptation-distance', 'examples/wireless/rate-adaptation-distance', 'wifi-aggregation', 'examples/wireless/wifi-aggregation', 'wifi-txop-aggregation', 'examples/wireless/wifi-txop-aggregation', 'simple-ht-hidden-stations', 'examples/wireless/simple-ht-hidden-stations', '80211n-mimo', 'examples/wireless/80211n-mimo', 'mixed-network', 'examples/wireless/mixed-network', 'wifi-tcp', 'examples/wireless/wifi-tcp', '80211e-txop', 'examples/wireless/80211e-txop', 'wifi-spectrum-per-example', 'examples/wireless/wifi-spectrum-per-example', 'wifi-spectrum-per-interference', 'examples/wireless/wifi-spectrum-per-interference', 'wifi-spectrum-saturation-example', 'examples/wireless/wifi-spectrum-saturation-example', 'ofdm-he-validation', 'examples/wireless/ofdm-he-validation', 'he-wifi-network', 'examples/wireless/he-wifi-network', 'wifi-multi-tos', 'examples/wireless/wifi-multi-tos', 'wifi-backward-compatibility', 'examples/wireless/wifi-backward-compatibility', 'wifi-pcf', 'examples/wireless/wifi-pcf', 'wifi-spatial-reuse', 'examples/wireless/wifi-spatial-reuse', 'dynamic-global-routing', 'examples/routing/dynamic-global-routing', 'static-routing-slash32', 'examples/routing/static-routing-slash32', 'global-routing-slash32', 'examples/routing/global-routing-slash32', 'global-injection-slash32', 'examples/routing/global-injection-slash32', 'simple-global-routing', 'examples/routing/simple-global-routing', 'simple-alternate-routing', 'examples/routing/simple-alternate-routing', 'mixed-global-routing', 'examples/routing/mixed-global-routing', 'simple-routing-ping6', 'examples/routing/simple-routing-ping6', 'manet-routing-compare', 'examples/routing/manet-routing-compare', 'ripng-simple-network', 'examples/routing/ripng-simple-network', 'rip-simple-network', 'examples/routing/rip-simple-network', 'global-routing-multi-switch-plus-router', 'examples/routing/global-routing-multi-switch-plus-router', 'hello-simulator', 'examples/tutorial/hello-simulator', 'first', 'examples/tutorial/first', 'second', 'examples/tutorial/second', 'third', 'examples/tutorial/third', 'fourth', 'examples/tutorial/fourth', 'fifth', 'examples/tutorial/fifth', 'sixth', 'examples/tutorial/sixth', 'seventh', 'examples/tutorial/seventh', 'icmpv6-redirect', 'examples/ipv6/icmpv6-redirect', 'ping6', 'examples/ipv6/ping6', 'radvd', 'examples/ipv6/radvd', 'radvd-two-prefix', 'examples/ipv6/radvd-two-prefix', 'test-ipv6', 'examples/ipv6/test-ipv6', 'fragmentation-ipv6', 'examples/ipv6/fragmentation-ipv6', 'fragmentation-ipv6-two-MTU', 'examples/ipv6/fragmentation-ipv6-two-MTU', 'loose-routing-ipv6', 'examples/ipv6/loose-routing-ipv6', 'wsn-ping6', 'examples/ipv6/wsn-ping6', 'energy-model-example', 'examples/energy/energy-model-example', 'energy-model-with-harvesting-example', 'examples/energy/energy-model-with-harvesting-example', 'udp-client-server', 'examples/udp-client-server/udp-client-server', 'udp-trace-client-server', 'examples/udp-client-server/udp-trace-client-server', 'traffic-control', 'examples/traffic-control/traffic-control', 'queue-discs-benchmark', 'examples/traffic-control/queue-discs-benchmark', 'red-vs-fengadaptive', 'examples/traffic-control/red-vs-fengadaptive', 'red-vs-nlred', 'examples/traffic-control/red-vs-nlred', 'tbf-example', 'examples/traffic-control/tbf-example', 'cobalt-vs-codel', 'examples/traffic-control/cobalt-vs-codel', 'object-names', 'examples/naming/object-names', 'udp-echo', 'examples/udp/udp-echo', 'scratch-simulator', 'scratch/scratch-simulator', 'subdir', 'scratch/subdir/subdir', 'test-runner', 'utils/test-runner', 'bench-simulator', 'utils/bench-simulator', 'bench-packets', 'utils/bench-packets', 'print-introspected-doxygen', 'utils/print-introspected-doxygen', 'tap-device-creator', 'src/fd-net-device/tap-device-creator', 'raw-sock-creator', 'src/fd-net-device/raw-sock-creator', 'tap-creator', 'src/tap-bridge/tap-creator']


The output of ./waf is 
 ./waf

Waf: Entering directory `/home/winser/ns-allinone-3.30/ns-3.30/build'
Waf: Leaving directory `/home/winser/ns-allinone-3.30/ns-3.30/build'
Build commands will be stored in build/compile_commands.json
'build' finished successfully (1.256s)

Modules built:
antenna                   aodv                      applications              
bridge                    buildings                 config-store              
core                      csma                      csma-layout               
dsdv                      dsr                       energy                    
fd-net-device             flow-monitor              internet                  
internet-apps             lr-wpan                   lte                       
mesh                      mobility                  mpi                       
netanim (no Python)       network                   nix-vector-routing        
olsr                      point-to-point            point-to-point-layout     
propagation               sixlowpan                 spectrum                  
stats                     tap-bridge                test (no Python)          
topology-read             traffic-control           uan                       
virtual-net-device        wave                      wifi                      
wimax                     

Modules not built (see ns-3 tutorial for explanation):
brite                     click                     openflow                  
visualizer                

 
I had the issue with ns3.29 so I removed it and installed ns3.30 but the issue persists.

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/e62705c4-df53-401b-a85a-944cf6dd4a19%40googlegroups.com.
--
With Regards,
Jay Patel
Reply all
Reply to author
Forward
0 new messages