raboof/nethogs

[libnethogs.so.0.8.7] undefined symbol: pidsToWatch

Galicarnax opened this issue ยท 14 comments

After nethogs updated to 0.8.7 on Arch Linux, Python wrapper for nethogs library stopped working, saying

OSError: /usr/lib/libnethogs.so.0.8.7: undefined symbol: pidsToWatch

Looking into the sources, I can see that pidsToWatch is declared in process.cpp as extern std::set<pid_t> pidsToWatch;, but it is defined in main.cpp, which is not part of the library (if I understand correctly).

I will take a look this week.

I had the same problem and I think the pidsToWatch should put into process.cpp.

Gentle ping.

(I don't have the bandwidth to work on nethogs myself right now, but a PR is definitely appreciated!)

bphd commented

Gentle ping.

Gentle ping.

x2

Looking into it!

Hi, I have made this commit which might fix everything.

Which makes the fixes as suggested @NeilZhy

I had the same problem and I think the pidsToWatch should put into process.cpp.

I have made make and make libnethogs

And compiled successfully.

Do you have any other command to check if everything will work? For example, compile with python bindings. I havent worked with bindinds yet, so, I you could help me.
I would be glad @Galicarnax

This is my terminal output

image

Am I missing something?

Hi, I have made this commit which might fix everything.

tested, works for me. ๐Ÿ‘