* [rdma-core] Compile issue with DRM headers
@ 2021-03-19 8:43 liweihang
2021-03-19 16:50 ` Xiong, Jianxin
0 siblings, 1 reply; 6+ messages in thread
From: liweihang @ 2021-03-19 8:43 UTC (permalink / raw)
To: jianxin.xiong@intel.com, linux-rdma@vger.kernel.org
Cc: Jason Gunthorpe, Leon Romanovsky, Linuxarm
Hi Jianxin,
I met a compile error with recent version of rdma-core on my server with Ubuntu
14.04:
./pyverbs/dmabuf_alloc.c:16:24: fatal error: amdgpu_drm.h: No such file or
directory
#include <amdgpu_drm.h>
^
compilation terminated.
I found it is related with dma-buf based commits. And the commit 3788aa843b4b
("configure: Add check for DRM headers") adds a check for libdrm headers. I have
installed it but my version(2.4.67-1ubuntu0.14.04.2) isn't new enough, there is
no 'amdgpu_drm.h' in DRM_INCLUDE_DIRS(/usr/include/drm).
So I think we may need some check for the the version of libdrm in CMakeList.txt
or something else :) Could you please give me some suggestions?
Thanks
Weihang
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [rdma-core] Compile issue with DRM headers
2021-03-19 8:43 [rdma-core] Compile issue with DRM headers liweihang
@ 2021-03-19 16:50 ` Xiong, Jianxin
2021-03-21 12:06 ` Leon Romanovsky
0 siblings, 1 reply; 6+ messages in thread
From: Xiong, Jianxin @ 2021-03-19 16:50 UTC (permalink / raw)
To: liweihang, linux-rdma@vger.kernel.org
Cc: Jason Gunthorpe, Leon Romanovsky, Linuxarm
> -----Original Message-----
> From: liweihang <liweihang@huawei.com>
> Sent: Friday, March 19, 2021 1:44 AM
> To: Xiong, Jianxin <jianxin.xiong@intel.com>; linux-rdma@vger.kernel.org
> Cc: Jason Gunthorpe <jgg@ziepe.ca>; Leon Romanovsky <leon@kernel.org>; Linuxarm <linuxarm@huawei.com>
> Subject: [rdma-core] Compile issue with DRM headers
>
> Hi Jianxin,
>
> I met a compile error with recent version of rdma-core on my server with Ubuntu
> 14.04:
>
> ../pyverbs/dmabuf_alloc.c:16:24: fatal error: amdgpu_drm.h: No such file or directory #include <amdgpu_drm.h>
> ^
> compilation terminated.
>
> I found it is related with dma-buf based commits. And the commit 3788aa843b4b
> ("configure: Add check for DRM headers") adds a check for libdrm headers. I have installed it but my version(2.4.67-1ubuntu0.14.04.2) isn't
> new enough, there is no 'amdgpu_drm.h' in DRM_INCLUDE_DIRS(/usr/include/drm).
>
> So I think we may need some check for the the version of libdrm in CMakeList.txt or something else :) Could you please give me some
> suggestions?
>
> Thanks
> Weihang
Hi Weihang,
The simplest way is to replace the check of "drm.h" with "amdgpu_drm.h". This is
reasonable since dma-buf based MR won't work with old kernel anyway.
Alternatively, we can add a check for "amdgpu_drm.h" in CMakeLists.txt and add
some #ifdef's to dmabuf_alloc.c around the code related to amdgpu.
-Jianxin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [rdma-core] Compile issue with DRM headers
2021-03-19 16:50 ` Xiong, Jianxin
@ 2021-03-21 12:06 ` Leon Romanovsky
2021-03-21 15:53 ` Jason Gunthorpe
0 siblings, 1 reply; 6+ messages in thread
From: Leon Romanovsky @ 2021-03-21 12:06 UTC (permalink / raw)
To: Xiong, Jianxin
Cc: liweihang, linux-rdma@vger.kernel.org, Jason Gunthorpe, Linuxarm
On Fri, Mar 19, 2021 at 04:50:53PM +0000, Xiong, Jianxin wrote:
>
> > -----Original Message-----
> > From: liweihang <liweihang@huawei.com>
> > Sent: Friday, March 19, 2021 1:44 AM
> > To: Xiong, Jianxin <jianxin.xiong@intel.com>; linux-rdma@vger.kernel.org
> > Cc: Jason Gunthorpe <jgg@ziepe.ca>; Leon Romanovsky <leon@kernel.org>; Linuxarm <linuxarm@huawei.com>
> > Subject: [rdma-core] Compile issue with DRM headers
> >
> > Hi Jianxin,
> >
> > I met a compile error with recent version of rdma-core on my server with Ubuntu
> > 14.04:
> >
> > ../pyverbs/dmabuf_alloc.c:16:24: fatal error: amdgpu_drm.h: No such file or directory #include <amdgpu_drm.h>
> > ^
> > compilation terminated.
> >
> > I found it is related with dma-buf based commits. And the commit 3788aa843b4b
> > ("configure: Add check for DRM headers") adds a check for libdrm headers. I have installed it but my version(2.4.67-1ubuntu0.14.04.2) isn't
> > new enough, there is no 'amdgpu_drm.h' in DRM_INCLUDE_DIRS(/usr/include/drm).
> >
> > So I think we may need some check for the the version of libdrm in CMakeList.txt or something else :) Could you please give me some
> > suggestions?
> >
> > Thanks
> > Weihang
>
> Hi Weihang,
>
> The simplest way is to replace the check of "drm.h" with "amdgpu_drm.h". This is
> reasonable since dma-buf based MR won't work with old kernel anyway.
>
> Alternatively, we can add a check for "amdgpu_drm.h" in CMakeLists.txt and add
> some #ifdef's to dmabuf_alloc.c around the code related to amdgpu.
Let's add compilation test that checks all those files at the same time:
14 #include <drm.h>
15 #include <i915_drm.h>
16 #include <amdgpu_drm.h>
17 #include <radeon_drm.h>
Thanks
>
> -Jianxin
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [rdma-core] Compile issue with DRM headers
2021-03-21 12:06 ` Leon Romanovsky
@ 2021-03-21 15:53 ` Jason Gunthorpe
2021-03-22 6:00 ` Xiong, Jianxin
0 siblings, 1 reply; 6+ messages in thread
From: Jason Gunthorpe @ 2021-03-21 15:53 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Xiong, Jianxin, liweihang, linux-rdma@vger.kernel.org, Linuxarm
On Sun, Mar 21, 2021 at 02:06:55PM +0200, Leon Romanovsky wrote:
> On Fri, Mar 19, 2021 at 04:50:53PM +0000, Xiong, Jianxin wrote:
> >
> > > From: liweihang <liweihang@huawei.com>
> > > Sent: Friday, March 19, 2021 1:44 AM
> > > To: Xiong, Jianxin <jianxin.xiong@intel.com>; linux-rdma@vger.kernel.org
> > > Cc: Jason Gunthorpe <jgg@ziepe.ca>; Leon Romanovsky <leon@kernel.org>; Linuxarm <linuxarm@huawei.com>
> > > Subject: [rdma-core] Compile issue with DRM headers
> > >
> > > Hi Jianxin,
> > >
> > > I met a compile error with recent version of rdma-core on my server with Ubuntu
> > > 14.04:
> > >
> > > ../pyverbs/dmabuf_alloc.c:16:24: fatal error: amdgpu_drm.h: No such file or directory #include <amdgpu_drm.h>
> > > ^
> > > compilation terminated.
> > >
> > > I found it is related with dma-buf based commits. And the commit 3788aa843b4b
> > > ("configure: Add check for DRM headers") adds a check for libdrm headers. I have installed it but my version(2.4.67-1ubuntu0.14.04.2) isn't
> > > new enough, there is no 'amdgpu_drm.h' in DRM_INCLUDE_DIRS(/usr/include/drm).
> > >
> > > So I think we may need some check for the the version of libdrm in CMakeList.txt or something else :) Could you please give me some
> > > suggestions?
> > >
> > > Thanks
> > > Weihang
> >
> > Hi Weihang,
> >
> > The simplest way is to replace the check of "drm.h" with "amdgpu_drm.h". This is
> > reasonable since dma-buf based MR won't work with old kernel anyway.
> >
> > Alternatively, we can add a check for "amdgpu_drm.h" in CMakeLists.txt and add
> > some #ifdef's to dmabuf_alloc.c around the code related to amdgpu.
>
> Let's add compilation test that checks all those files at the same time:
> 14 #include <drm.h>
> 15 #include <i915_drm.h>
> 16 #include <amdgpu_drm.h>
> 17 #include <radeon_drm.h>
Yes please
Jason
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [rdma-core] Compile issue with DRM headers
2021-03-21 15:53 ` Jason Gunthorpe
@ 2021-03-22 6:00 ` Xiong, Jianxin
2021-03-22 6:25 ` liweihang
0 siblings, 1 reply; 6+ messages in thread
From: Xiong, Jianxin @ 2021-03-22 6:00 UTC (permalink / raw)
To: Jason Gunthorpe, Leon Romanovsky
Cc: liweihang, linux-rdma@vger.kernel.org, Linuxarm
> -----Original Message-----
> From: Jason Gunthorpe <jgg@ziepe.ca>
> Sent: Sunday, March 21, 2021 8:53 AM
> To: Leon Romanovsky <leon@kernel.org>
> Cc: Xiong, Jianxin <jianxin.xiong@intel.com>; liweihang <liweihang@huawei.com>; linux-rdma@vger.kernel.org; Linuxarm
> <linuxarm@huawei.com>
> Subject: Re: [rdma-core] Compile issue with DRM headers
>
> On Sun, Mar 21, 2021 at 02:06:55PM +0200, Leon Romanovsky wrote:
> > On Fri, Mar 19, 2021 at 04:50:53PM +0000, Xiong, Jianxin wrote:
....
> >
> > Let's add compilation test that checks all those files at the same time:
> > 14 #include <drm.h>
> > 15 #include <i915_drm.h>
> > 16 #include <amdgpu_drm.h>
> > 17 #include <radeon_drm.h>
>
> Yes please
>
> Jason
I will work on this.
Thanks,
Jianxin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [rdma-core] Compile issue with DRM headers
2021-03-22 6:00 ` Xiong, Jianxin
@ 2021-03-22 6:25 ` liweihang
0 siblings, 0 replies; 6+ messages in thread
From: liweihang @ 2021-03-22 6:25 UTC (permalink / raw)
To: Xiong, Jianxin, Jason Gunthorpe, Leon Romanovsky
Cc: linux-rdma@vger.kernel.org, Linuxarm
On 2021/3/22 14:00, Xiong, Jianxin wrote:
>> -----Original Message-----
>> From: Jason Gunthorpe <jgg@ziepe.ca>
>> Sent: Sunday, March 21, 2021 8:53 AM
>> To: Leon Romanovsky <leon@kernel.org>
>> Cc: Xiong, Jianxin <jianxin.xiong@intel.com>; liweihang <liweihang@huawei.com>; linux-rdma@vger.kernel.org; Linuxarm
>> <linuxarm@huawei.com>
>> Subject: Re: [rdma-core] Compile issue with DRM headers
>>
>> On Sun, Mar 21, 2021 at 02:06:55PM +0200, Leon Romanovsky wrote:
>>> On Fri, Mar 19, 2021 at 04:50:53PM +0000, Xiong, Jianxin wrote:
> ....
>
>>>
>>> Let's add compilation test that checks all those files at the same time:
>>> 14 #include <drm.h>
>>> 15 #include <i915_drm.h>
>>> 16 #include <amdgpu_drm.h>
>>> 17 #include <radeon_drm.h>
>>
>> Yes please
>>
>> Jason
>
> I will work on this.
>
> Thanks,
>
> Jianxin
>
Thank you. I will help test on my server after your work is done :)
Weihang
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-22 6:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-19 8:43 [rdma-core] Compile issue with DRM headers liweihang
2021-03-19 16:50 ` Xiong, Jianxin
2021-03-21 12:06 ` Leon Romanovsky
2021-03-21 15:53 ` Jason Gunthorpe
2021-03-22 6:00 ` Xiong, Jianxin
2021-03-22 6:25 ` liweihang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox