* [PATCH] xf86drm: fix build error by udev dependency
@ 2015-05-28 0:56 Joonyoung Shim
2015-05-28 1:04 ` Deucher, Alexander
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Joonyoung Shim @ 2015-05-28 0:56 UTC (permalink / raw)
To: dri-devel; +Cc: Alexander.Deucher, emil.l.velikov
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@samsung.com>
---
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)
#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
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: [PATCH] xf86drm: fix build error by udev dependency
2015-05-28 0:56 [PATCH] xf86drm: fix build error by udev dependency Joonyoung Shim
@ 2015-05-28 1:04 ` Deucher, Alexander
2015-05-28 8:53 ` Zhou, Jammy
2015-05-28 13:02 ` Emil Velikov
2 siblings, 0 replies; 7+ messages in thread
From: Deucher, Alexander @ 2015-05-28 1:04 UTC (permalink / raw)
To: Joonyoung Shim, dri-devel@lists.freedesktop.org; +Cc: emil.l.velikov@gmail.com
> -----Original Message-----
> From: Joonyoung Shim [mailto:jy0922.shim@samsung.com]
> Sent: Wednesday, May 27, 2015 8:57 PM
> To: dri-devel@lists.freedesktop.org
> Cc: emil.l.velikov@gmail.com; Zhou, Jammy; Deucher, Alexander;
> jy0922.shim@samsung.com
> Subject: [PATCH] xf86drm: fix build error by udev dependency
>
> 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@samsung.com>
Sorry about that.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> 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)
> #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
> --
> 1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] xf86drm: fix build error by udev dependency
2015-05-28 0:56 [PATCH] xf86drm: fix build error by udev dependency Joonyoung Shim
2015-05-28 1:04 ` Deucher, Alexander
@ 2015-05-28 8:53 ` Zhou, Jammy
2015-05-28 13:02 ` Emil Velikov
2 siblings, 0 replies; 7+ messages in thread
From: Zhou, Jammy @ 2015-05-28 8:53 UTC (permalink / raw)
To: Joonyoung Shim, dri-devel@lists.freedesktop.org
Cc: Deucher, Alexander, emil.l.velikov@gmail.com
Thanks for catching this. Patch is Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Regards,
Jammy
-----Original Message-----
From: Joonyoung Shim [mailto:jy0922.shim@samsung.com]
Sent: Thursday, May 28, 2015 8:57 AM
To: dri-devel@lists.freedesktop.org
Cc: emil.l.velikov@gmail.com; Zhou, Jammy; Deucher, Alexander; jy0922.shim@samsung.com
Subject: [PATCH] xf86drm: fix build error by udev dependency
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@samsung.com>
---
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)
#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
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] xf86drm: fix build error by udev dependency
2015-05-28 0:56 [PATCH] xf86drm: fix build error by udev dependency Joonyoung Shim
2015-05-28 1:04 ` Deucher, Alexander
2015-05-28 8:53 ` Zhou, Jammy
@ 2015-05-28 13:02 ` Emil Velikov
2015-05-29 6:34 ` Joonyoung Shim
2 siblings, 1 reply; 7+ messages in thread
From: Emil Velikov @ 2015-05-28 13:02 UTC (permalink / raw)
To: Joonyoung Shim; +Cc: Alex Deucher, ML dri-devel
On 28 May 2015 at 00:56, Joonyoung Shim <jy0922.shim@samsung.com> 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@samsung.com>
> ---
> 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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xf86drm: fix build error by udev dependency
2015-05-28 13:02 ` Emil Velikov
@ 2015-05-29 6:34 ` Joonyoung Shim
2015-05-30 13:02 ` Emil Velikov
0 siblings, 1 reply; 7+ messages in thread
From: Joonyoung Shim @ 2015-05-29 6:34 UTC (permalink / raw)
To: Emil Velikov; +Cc: Alex Deucher, ML dri-devel
On 05/28/2015 10:02 PM, Emil Velikov wrote:
> On 28 May 2015 at 00:56, Joonyoung Shim <jy0922.shim@samsung.com> 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@samsung.com>
>> ---
>> 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.
>
I'm not sure it's right using HAVE_LIBUDEV instead of UDEV because
currently UDEV is used from .c file but HAVE_LIBUDEV is not.
>> #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.
>
Sure, it's reasonable to use #if in function.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xf86drm: fix build error by udev dependency
2015-05-29 6:34 ` Joonyoung Shim
@ 2015-05-30 13:02 ` Emil Velikov
2015-06-01 2:52 ` Joonyoung Shim
0 siblings, 1 reply; 7+ messages in thread
From: Emil Velikov @ 2015-05-30 13:02 UTC (permalink / raw)
To: Joonyoung Shim; +Cc: Alex Deucher, ML dri-devel
On 29 May 2015 at 07:34, Joonyoung Shim <jy0922.shim@samsung.com> wrote:
> On 05/28/2015 10:02 PM, Emil Velikov wrote:
>> On 28 May 2015 at 00:56, Joonyoung Shim <jy0922.shim@samsung.com> 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@samsung.com>
>>> ---
>>> 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.
>>
>
> I'm not sure it's right using HAVE_LIBUDEV instead of UDEV because
> currently UDEV is used from .c file but HAVE_LIBUDEV is not.
>
I'm afraid that I giggled a bit while I read this. Surely you know the
difference between udev and libudev, and after a brief inspection of
the code, original and newly added, you can see that it differs
significantly. Additionally the newly added LIBUDEV_{CFLAGS,LIBS}
should be a nice give-away :-)
That aside, I'll send a revert in a second as mentioned previously.
Thanks
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] xf86drm: fix build error by udev dependency
2015-05-30 13:02 ` Emil Velikov
@ 2015-06-01 2:52 ` Joonyoung Shim
0 siblings, 0 replies; 7+ messages in thread
From: Joonyoung Shim @ 2015-06-01 2:52 UTC (permalink / raw)
To: Emil Velikov; +Cc: Alex Deucher, ML dri-devel
On 05/30/2015 10:02 PM, Emil Velikov wrote:
> On 29 May 2015 at 07:34, Joonyoung Shim <jy0922.shim@samsung.com> wrote:
>> On 05/28/2015 10:02 PM, Emil Velikov wrote:
>>> On 28 May 2015 at 00:56, Joonyoung Shim <jy0922.shim@samsung.com> 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@samsung.com>
>>>> ---
>>>> 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.
>>>
>>
>> I'm not sure it's right using HAVE_LIBUDEV instead of UDEV because
>> currently UDEV is used from .c file but HAVE_LIBUDEV is not.
>>
> I'm afraid that I giggled a bit while I read this. Surely you know the
> difference between udev and libudev, and after a brief inspection of
> the code, original and newly added, you can see that it differs
> significantly. Additionally the newly added LIBUDEV_{CFLAGS,LIBS}
> should be a nice give-away :-)
>
Thanks for pointing that.
> That aside, I'll send a revert in a second as mentioned previously.
>
Good. Thanks.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-01 2:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-28 0:56 [PATCH] xf86drm: fix build error by udev dependency Joonyoung Shim
2015-05-28 1:04 ` Deucher, Alexander
2015-05-28 8:53 ` Zhou, Jammy
2015-05-28 13:02 ` Emil Velikov
2015-05-29 6:34 ` Joonyoung Shim
2015-05-30 13:02 ` Emil Velikov
2015-06-01 2:52 ` Joonyoung Shim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox