public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: "Xiong, Jianxin" <jianxin.xiong@intel.com>
Cc: liweihang <liweihang@huawei.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	Jason Gunthorpe <jgg@ziepe.ca>, Linuxarm <linuxarm@huawei.com>
Subject: Re: [rdma-core] Compile issue with DRM headers
Date: Sun, 21 Mar 2021 14:06:55 +0200	[thread overview]
Message-ID: <YFc2348DwMqm6e3r@unreal> (raw)
In-Reply-To: <MW3PR11MB4555FC2C195C0AAB5D804326E5689@MW3PR11MB4555.namprd11.prod.outlook.com>

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
> 

  reply	other threads:[~2021-03-21 12:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-03-21 15:53     ` Jason Gunthorpe
2021-03-22  6:00       ` Xiong, Jianxin
2021-03-22  6:25         ` liweihang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YFc2348DwMqm6e3r@unreal \
    --to=leon@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=jianxin.xiong@intel.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=liweihang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox