[R-pkg-devel] /usr/bin/ld: cannot find -ludev

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Sun Apr 26 19:57:28 CEST 2020

On Sun, 26 Apr 2020 15:39:50 +0000
"Sameh M. Abdulah" <sameh.abdulah using kaust.edu.sa> wrote:

> Yes, I think I will need it

Could you tell us why your package needs it? Perhaps there is a way
to make it an optional dependency.

> since I know that this is an OS libs

It is true that libudev is required for successful bootup of most
desktop and server GNU/Linux installations... not so for *BSDs, macOS,
Solaris, and Windows. I think that libudev (now part of systemd) will
not even build on these platforms.

> does adding this will help?

It will help in the sense of indicating a system requirement that might
not be present on the target system, but won't get you much further.

Is libudev a hard dependency of your package? If yes, CRAN may reject
the package as not portable enough ("Packages will not normally be
accepted that do not run on at least two of the major R platforms.").
If no, consider including a configure script [*] and some #ifdefs in
your code to make the package only depend on libudev when it is

Best regards,


More information about the R-package-devel mailing list