Closed Arethusag closed 7 months ago
The nvimcom package includes a TCP server application run by Vim, not by R. The nvimcom C library connects with the TCP server and, then, the connection between Vim and R is established.
Possibly, a C header is missing or is in the wrong order. You could compare lines 10-30 of nvimcom.c with lines 7-11 of https://docs.freebsd.org/en/books/developers-handbook/sockets/#sockets-first-client and try changing the order of header inclusion or including missing headers.
Hi @jalvesaq
Thanks for the suggestions. I included some missing header files #include <netinet/in.h>
and tried to get the correct order, and this helped with the initial error I was having. However the build now fails with this error.
Sorry I am not a C-programmer and the logic for the server is complex, I may try getting a minimum producable example. Any suggestion is welcome.
The error is the same, but now in the server:
nvimrserver.c:303:24: error: variable has incomplete type 'struct sockaddr_in'
You may fix it in the same way, including headers and changing their order in R/nvimcom/src/apps/nvimrserver.c
.
Thanks @jalvesaq
nvimcom now builds after including the additional header file. I tested starting R and it all seems to work nicely. Did you want a PR to add FreeBSD support?
Yes, please.
Hi All,
Asking any maintainer of this plugin for some guidance on the build steps of the nvimcom server. I have a minimal .vimrc and here is the output of :RDebugInfo after nvimcom fails to compile.
Looks like the issue is some of the structs could be unsupported by the FreeBSD version of clang compiler.
I think once I know more about what the plugin is expecting here, and if this is just an idiosyncracy between FreeBSD and Linux, then I will know how to proceed. I will report back if I figure out anything else.
Thanks for you time!