hyperic / sigar

System Information Gatherer And Reporter
http://sigar.hyperic.com/
Apache License 2.0
1.51k stars 504 forks source link

rpc.h not found on Arch #119

Open Sparkier opened 6 years ago

Sparkier commented 6 years ago

On my arch linux machine, rpc.h could not be found since it was moved to tirpc. I added the following line: include_directories(/usr/include/tirpc) to the linux section of your CMakeLists.txt which fixed the issue for me. Then, however, I get the following errors: ../../lib/libsigar.so.1.6.4: undefined reference to clntudp_create' ../../lib/libsigar.so.1.6.4: undefined reference toclnttcp_create' ../../lib/libsigar.so.1.6.4: undefined reference to xdr_void' ../../lib/libsigar.so.1.6.4: undefined reference to__rpc_createerr'

anatol commented 5 years ago

FYI Arch ruby quarry repository has ruby-sigar Arch package with the given gem. It works great.

What Quarry does to fix the given problem is it appending following command lines during gem file install gem install sigar -- --with-cppflags="-fgnu89-inline -I/usr/include/tirpc" --with-ldflags="-ltirpc". Haven't try it personally as I have no patched gem.

Even better if sigar ruby extension build system used pkg-config to determine compile/link flags.