Bug 101335 - build failure: nouveau_screen.c:105:8: error: implicit declaration of function ‘nouveau_drm_new’;
Summary: build failure: nouveau_screen.c:105:8: error: implicit declaration of functi...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/nouveau (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: Nouveau Project
QA Contact: Nouveau Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-07 20:19 UTC by David Ronis
Modified: 2017-06-12 20:18 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description David Ronis 2017-06-07 20:19:16 UTC
I'm trying to build the git master on an 32 bit machine.  The build dies with:

 CC     nouveau_surface.lo
nouveau_screen.c: In function ‘nouveau_init_screen2’:
nouveau_screen.c:105:8: error: implicit declaration of function ‘nouveau_drm_new’; did you mean ‘nouveau_bo_new’? [-Werror=implicit-function-declaration]
  ret = nouveau_drm_new(dri_screen->fd, &screen->drm);
        ^~~~~~~~~~~~~~~
        nouveau_bo_new
nouveau_screen.c:111:8: error: implicit declaration of function ‘nouveau_device_new’; did you mean ‘nouveau_device_del’? [-Werror=implicit-function-declaration]
  ret = nouveau_device_new(&screen->drm->client, NV_DEVICE,
        ^~~~~~~~~~~~~~~~~~
        nouveau_device_del
nouveau_screen.c:111:39: error: dereferencing pointer to incomplete type ‘struct nouveau_drm’
  ret = nouveau_device_new(&screen->drm->client, NV_DEVICE,
                                       ^~
  CC     nouveau_texture.lo
nouveau_screen.c: In function ‘nouveau_destroy_screen’:
nouveau_screen.c:230:2: error: implicit declaration of function ‘nouveau_drm_del’; did you mean ‘nouveau_bo_ref’? [-Werror=implicit-function-declaration]
  nouveau_drm_del(&screen->drm);
  ^~~~~~~~~~~~~~~
  nouveau_bo_ref
cc1: some warnings being treated as errors
Comment 1 Karol Herbst 2017-06-07 20:27:36 UTC
(In reply to David Ronis from comment #0)
> I'm trying to build the git master on an 32 bit machine.  The build dies
> with:
> 
>  CC     nouveau_surface.lo
> nouveau_screen.c: In function ‘nouveau_init_screen2’:
> nouveau_screen.c:105:8: error: implicit declaration of function
> ‘nouveau_drm_new’; did you mean ‘nouveau_bo_new’?
> [-Werror=implicit-function-declaration]
>   ret = nouveau_drm_new(dri_screen->fd, &screen->drm);
>         ^~~~~~~~~~~~~~~
>         nouveau_bo_new
> nouveau_screen.c:111:8: error: implicit declaration of function
> ‘nouveau_device_new’; did you mean ‘nouveau_device_del’?
> [-Werror=implicit-function-declaration]
>   ret = nouveau_device_new(&screen->drm->client, NV_DEVICE,
>         ^~~~~~~~~~~~~~~~~~
>         nouveau_device_del
> nouveau_screen.c:111:39: error: dereferencing pointer to incomplete type
> ‘struct nouveau_drm’
>   ret = nouveau_device_new(&screen->drm->client, NV_DEVICE,
>                                        ^~
>   CC     nouveau_texture.lo
> nouveau_screen.c: In function ‘nouveau_destroy_screen’:
> nouveau_screen.c:230:2: error: implicit declaration of function
> ‘nouveau_drm_del’; did you mean ‘nouveau_bo_ref’?
> [-Werror=implicit-function-declaration]
>   nouveau_drm_del(&screen->drm);
>   ^~~~~~~~~~~~~~~
>   nouveau_bo_ref
> cc1: some warnings being treated as errors

you need to build against drm-next kernel tree or a different tree the module is actually based on. Check for the last drm-next commit in the tree.
Comment 2 Pierre Moreau 2017-06-07 20:36:13 UTC
(In reply to Karol Herbst from comment #1)
> you need to build against drm-next kernel tree or a different tree the
> module is actually based on. Check for the last drm-next commit in the tree.

Ben’s tree is currently built against v4.12-rc3 from Linus’ tree, rather than a version of drm-next.

However, I think that David is building Mesa here, rather than the kernel. It seems like you do not have the proper version of libdrm.
Comment 3 Karol Herbst 2017-06-07 21:06:25 UTC
(In reply to Pierre Moreau from comment #2)
> (In reply to Karol Herbst from comment #1)
> > you need to build against drm-next kernel tree or a different tree the
> > module is actually based on. Check for the last drm-next commit in the tree.
> 
> Ben’s tree is currently built against v4.12-rc3 from Linus’ tree, rather
> than a version of drm-next.
> 
> However, I think that David is building Mesa here, rather than the kernel.
> It seems like you do not have the proper version of libdrm.

ohhhh, right. I got confused, cause I hit a simliar issue rebasing my trees :/
Comment 4 David Ronis 2017-06-09 17:55:52 UTC
Thanks for the replies.  I am trying to build mesa (git/master) and have rebuilt <span class="hiddenSpellError" pre="rebuilt ">drm (also the git/master).
Here are the configure flags I use:

    drm  "--with-kernel-source=/<span class="hiddenSpellError" pre="">usr/src/<span class="hiddenSpellError" pre="">linux --without-udev"

and

    mesa " --<span class="hiddenSpellError" pre="">enable-gbm --enable-opengl  --<span class="hiddenSpellError" pre="">enable-gles1 --enable-gles2 --with-gallium-drivers=nouveau  --disable-glamor --<span class="hiddenSpellError" pre="">disable-gallium-llvm"

An additional oddity.  I've tried building on two machines and i686 and an x86_64.  The build fails on the <span class="hiddenSpellError" pre="the ">i686 but succeeds on the x86_64.
Comment 5 David Ronis 2017-06-12 20:18:21 UTC
Problem solved.  It turns out that an older or <span class="hiddenSpellError" pre="or ">slackware pagage of <span class="hiddenSpellError" pre="of ">drm installed its include files in /usr/include/drm nor /usr/include/libdrm, something that wasn't fixed when calling pkg-config --cflags drm which is now libdrm).


I manually removed any drm installed files, ran make uninstall, and rebuilt/installed with no problems.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.