Skip to content

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

4 messages · Jeff Newmiller, Sameh M. Abdulah, Ivan Krylov

#
I am getting this error when trying to install my package on CRAN. Do I need to contact
CRAN to include it on the CRAN system? or there is another solution.


/usr/bin/ld: cannot find -ludev
collect2: error: ld returned 1 exit status



--Sameh
#
This is a highly OS-specific dependency. Are you sure you need this? Is it listed in your SystemRequirements entry in your DESCRIPTION file?
On April 26, 2020 6:41:27 AM PDT, "Sameh M. Abdulah" <sameh.abdulah at kaust.edu.sa> wrote:

  
    
#
Yes, I think I will need it but I did not specify it in my DESCRIPTION file, since I know that this is an OS libs, does adding this will help?


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

            
Could you tell us why your package needs it? Perhaps there is a way
to make it an optional dependency.
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.
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
present.