> -----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. -Jianxin