emmericp / MoonGen

MoonGen is a fully scriptable high-speed packet generator built on DPDK and LuaJIT. It can saturate a 10 Gbit/s connection with 64 byte packets on a single CPU core while executing user-provided Lua scripts for each packet. Multi-core support allows for even higher rates. It also features precise and accurate timestamping and rate control.
MIT License
1.04k stars 234 forks source link

Add a required library #265

Open jshuhnow opened 4 years ago

jshuhnow commented 4 years ago

Without libtbb-dev, the example, 'sudo ./build/MoonGen examples/l3-load-latency.lua 0 1', generates a following error message:

./build/MoonGen: error while loading shared libraries: libtbbmalloc.so.2: cannot open shared object file: No such file or directory

Running Environment

emmericp commented 4 years ago

thank you for your pull request, i'd prefer a different solution. the dependency on libtbb installed on the system is a bug; we embed libtbb and it should use that version.

however, i haven't managed to reproduce this particular issue yet, maybe i need to try with ubuntu

theleos88 commented 4 years ago

Hi, I was also encountering the same problem as iriszero. I guess that the issue appears when using MoonGen with sudo, as I was doing in another machine.

I actually tried to preserve the environment with sudo -E, but it was not working either (very strange that in another machine there is no need to do anything).

In the end, I just did

sudo su; export LD_LIBRARY_PATH=$HOME/MoonGen/build/libmoon/tbb_cmake_build/tbb_cmake_build_subdir_release:$LD_LIBRARY_PATH and run the script as root. I wonder what is the problem in the linked library.

HypoGump commented 3 years ago

I was also encountering the same problem as iriszero, and theleos88's method doesn't work for me. Installing libtbb on system can be a workaround.

My OS is Ubuntu 18.04.1. It looks like a common problem related to Ubuntu.

jshuhnow commented 3 years ago

@emmericp gentle reminder for the issue.

Sidiox commented 3 years ago

Confirmed here to be happening on fresh clone of MoonGen on Ubuntu 18.04. Theleos88's work around works perfectly for me when running as root.

JackKuo-tw commented 3 years ago

Ubuntu 20.04 solution:

sudo apt install libtbb2