Re: [rdma-core] Compile issue with DRM headers

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

 



On Fri, Mar 19, 2021 at 04:50:53PM +0000, Xiong, Jianxin wrote:
> 
> > -----Original Message-----
> > From: liweihang <liweihang@xxxxxxxxxx>
> > Sent: Friday, March 19, 2021 1:44 AM
> > To: Xiong, Jianxin <jianxin.xiong@xxxxxxxxx>; linux-rdma@xxxxxxxxxxxxxxx
> > Cc: Jason Gunthorpe <jgg@xxxxxxxx>; Leon Romanovsky <leon@xxxxxxxxxx>; Linuxarm <linuxarm@xxxxxxxxxx>
> > 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
> 



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux