hust-diangroup / ns3-ai

Enable the interaction between ns-3 and popular frameworks using Python, which mean you can train and test your AI algorithms in ns-3 without changing any frameworks you are using now!
GNU General Public License v2.0
244 stars 86 forks source link

ns3-ai loading libstdc++.so.6 from /usr/lib64 instead of updated path is $LD_LIBRARY_PATH #95

Closed isaeed3 closed 1 year ago

isaeed3 commented 1 year ago

I am successfully running examples and my own code using ns3-ai from the scratch folder. However, when I am trying to run the same code in HPC where the outdated version of libstdc++.so.6 is in the default location of /usr/lib64 and updated version is in /usr/local/easybuild-2019/easybuild/software/core/gcccore/10.2.0/lib64, the ns3-ai code fails to run with the following error. ns3 code runs fine as the $LD_LIBRARY_PATH contains the updated path. ns3-ai codes gives the error, for example, python3 scratch/a_plus_b/run.py

Could you please point to the script or file where /lib64/libstdc++.so.6 location needs to be updated?

ERROR: ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ./a_plus_b) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ./a_plus_b) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ./a_plus_b) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-aodv-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-aodv-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-aodv-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-dsr-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-dsr-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by ns3-5.0/build/lib/libns3-dev-dsr-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-mesh-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-mesh-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-netanim-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-netanim-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-netanim-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by ns3-5.0/build/lib/libns3-dev-netanim-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-wave-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-wave-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.20' not found (required by ns3-5.0/build/lib/libns3-dev-wave-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-wave-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.20' not found (required by ns3-5.0/build/lib/libns3-dev-wifi-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-wifi-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-wifi-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-wifi-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-lr-wpan-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-lr-wpan-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-lr-wpan-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-psc-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-psc-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-psc-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.20' not found (required by ns3-5.0/build/lib/libns3-dev-psc-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-lte-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.20' not found (required by ns3-5.0/build/lib/libns3-dev-lte-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-lte-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-lte-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by ns3-5.0/build/lib/libns3-dev-spectrum-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-spectrum-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-spectrum-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-spectrum-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-antenna-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-antenna-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-applications-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-applications-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-applications-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-csma-layout-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-csma-layout-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-dsdv-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-dsdv-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-dsdv-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-flow-monitor-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-flow-monitor-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-flow-monitor-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.8' not found (required by ns3-5.0/build/lib/libns3-dev-internet-apps-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-internet-apps-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-internet-apps-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-internet-apps-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-wimax-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-wimax-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.20' not found (required by ns3-5.0/build/lib/libns3-dev-wimax-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-wimax-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-point-to-point-layout-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-point-to-point-layout-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.20' not found (required by ns3-5.0/build/lib/libns3-dev-point-to-point-layout-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-nix-vector-routing-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.20' not found (required by ns3-5.0/build/lib/libns3-dev-nix-vector-routing-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-nix-vector-routing-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-nix-vector-routing-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-olsr-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-olsr-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-olsr-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-sip-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-sip-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-sip-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-sixlowpan-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-sixlowpan-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-tap-bridge-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-tap-bridge-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-tap-bridge-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-internet-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-internet-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-internet-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by ns3-5.0/build/lib/libns3-dev-internet-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-bridge-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-bridge-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-traffic-control-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-traffic-control-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-traffic-control-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-buildings-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-buildings-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by ns3-5.0/build/lib/libns3-dev-buildings-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-propagation-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-propagation-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-uan-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-uan-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-uan-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-mobility-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-mobility-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-mobility-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-energy-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-energy-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-config-store-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-config-store-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-config-store-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-csma-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-csma-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-csma-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-fd-net-device-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-fd-net-device-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-fd-net-device-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-virtual-net-device-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-virtual-net-device-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-point-to-point-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-point-to-point-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-point-to-point-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-topology-read-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-topology-read-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-topology-read-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by ns3-5.0/build/lib/libns3-dev-network-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-network-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-network-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-network-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-stats-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-stats-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-stats-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-ns3-ai-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by /ns3-5.0/build/lib/libns3-dev-ns3-ai-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-ns3-ai-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ns3-5.0/build/lib/libns3-dev-core-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionGLIBCXX_3.4.26' not found (required by ns3-5.0/build/lib/libns3-dev-core-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: version CXXABI_1.3.8' not found (required by ns3-5.0/build/lib/libns3-dev-core-debug.so) ./a_plus_b: /lib64/libstdc++.so.6: versionCXXABI_1.3.9' not found (required by ns3-5.0/build/lib/libns3-dev-core-debug.so)

isaeed3 commented 1 year ago

Fixed the issue by changing the LD_LIBRARY_PATH in run_single_ns3 function in ns3-util.py file as follows: env['LD_LIBRARY_PATH'] = os.path.abspath(os.path.join(path, 'build', 'lib')) + ':' + env['LD_LIBRARY_PATH']

and running the ns3-ai setup.py file again as follows: $ cd contrib/ns3-ai/py_interface $ pip3 install .

now the a_plus_b example runs on hpc