Skip to content

Conversation

tmfink
Copy link

@tmfink tmfink commented Apr 22, 2022

NetBSD requires linking to the libkvm library to use functions like kvm_openfiles().

Otherwise, you get a link error like:

  = note: ld: /home/user/sys-info-rs/target/debug/build/sys-info-296322ef26a55e63/out/libinfo.a(netbsd.o): in function `get_proc_total':
          /home/user/sys-info-rs/c/netbsd.c:73: undefined reference to `kvm_openfiles'                        
          ld: /home/user//sys-info-rs/c/netbsd.c:76: undefined reference to `kvm_getprocs'                     
          ld: /home/user/sys-info-rs/c/netbsd.c:77: undefined reference to `kvm_close'                        
          ld: /home/usersys-info-rs/c/netbsd.c:81: undefined reference to `kvm_close'                        
                                                                                                                      
  = help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link                                                       

NetBSD requires linking to the libkvm library to use functions like
kvm_openfiles().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant