Re: [PATCH] xf86drm: fix build error by udev dependency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28 May 2015 at 00:56, Joonyoung Shim <jy0922.shim@xxxxxxxxxxx> wrote:
> The build error is introduced by commit fde496917682 ("Add device
> enumeration interface (v4)") if don't enable udev. Can solve as check
> UDEV dependency.
>
>   CC       libdrm_la-xf86drm.lo
> xf86drm.c:66:21: fatal error: libudev.h: No such file or directory
>  #include "libudev.h"
>                      ^
> compilation terminated.
> make[2]: *** [libdrm_la-xf86drm.lo] Error 1
>
> Signed-off-by: Joonyoung Shim <jy0922.shim@xxxxxxxxxxx>
> ---
>  xf86drm.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/xf86drm.c b/xf86drm.c
> index b5a174b..4a31019 100644
> --- a/xf86drm.c
> +++ b/xf86drm.c
> @@ -63,7 +63,9 @@
>
>  #include "xf86drm.h"
>  #include "libdrm_macros.h"
> +#if defined(UDEV)
The macro you're looking for (here and below) is #if HAVE_LIBUDEV.

>  #include "libudev.h"
> +#endif
>
>  #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
>  #define DRM_MAJOR 145
> @@ -2819,6 +2821,7 @@ char *drmGetRenderDeviceNameFromFd(int fd)
>         return drmGetMinorNameForFD(fd, DRM_NODE_RENDER);
>  }
>
> +#if defined(UDEV)
>  /**
>  * Enumerate the GPU devices on the system
>  *
> @@ -2917,3 +2920,4 @@ int drmGetPciDevices(drmPciDevicePtr devSet, uint16_t vendorId)
>
>         return drmDevCount;
>  }
> +#endif
The above change will lead to a broken library as the symbol will be
missing. Just returning -ENOSYS when libudev is missing sounds
reasonable imho. Although I'm more inclined to reverting the patch,
unless we get an actual user and an implementation that does not pull
the dependency of libudev.

Thanks
Emil
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux