Bug 77305 - Compile error in pipe-loader files (pipe_r300.c pipe_r600.c pipe_radeonsi.c egl_pipe.c)
Summary: Compile error in pipe-loader files (pipe_r300.c pipe_r600.c pipe_radeonsi.c e...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
: 77358 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-04-11 07:09 UTC by Knut Andre Tidemann
Modified: 2014-04-13 00:38 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
patch for build failure (2.57 KB, text/plain)
2014-04-11 07:09 UTC, Knut Andre Tidemann
Details
patch for build failure with r600 and radeonsi (595 bytes, patch)
2014-04-12 02:13 UTC, Simone Scanzoni
Details | Splinter Review

Description Knut Andre Tidemann 2014-04-11 07:09:25 UTC
Created attachment 97213 [details]
patch for build failure

When building the latest mesa code today from git (227049098b59bca88883a750602fdad41949c996), I was unable to build due to an error that looks like a missing radeon_winsys.h include after the following commit: 3b0b44f7def0acb4f7a7aef086c0bece321418a6.

Example of error:
pipe_r300.c: In function 'create_screen':
pipe_r300.c:13:38: error: dereferencing pointer to incomplete type
    return sws ? debug_screen_wrap(sws->screen) : NULL;
                                      ^

I've attached a patch that fixes the build issue for me.

I build mesa with the following options:

  ./autogen.sh --prefix=/usr \
    --sysconfdir=/etc \
    --with-dri-driverdir=/usr/lib/xorg/modules/dri \
    --with-gallium-drivers=r300,r600,radeonsi,nouveau,svga,swrast \
    --with-dri-drivers=i915,i965,r200,radeon,nouveau,swrast \
    --with-egl-platforms=drm,x11,wayland \
    --with-llvm-shared-libs \
    --enable-gallium-egl --enable-shared-glapi \
    --enable-gallium-llvm \
    --enable-glx-tls \
    --enable-gles1 \
    --enable-gles2 \
    --enable-egl \
    --enable-dri \
    --enable-glx \
    --enable-xa \
    --enable-osmesa \
    --enable-gbm \
    --enable-texture-float \
    --enable-vdpau \
    --enable-opencl \
    --enable-opencl-icd
Comment 1 Tom Stellard 2014-04-11 15:26:43 UTC
Committed the patch as ac3435a47c616286c5a5ee16148f829493c2127, thanks!
Comment 2 Simone Scanzoni 2014-04-12 02:13:51 UTC
Created attachment 97248 [details] [review]
patch for build failure with r600 and radeonsi

The bug isn't fixed upstream for r600 and radeonsi.

The attached patch solves the problem fixing these:

egl_pipe.c: In function 'pipe_r600_create_screen':
egl_pipe.c:153:4: error: implicit declaration of function 'radeon_drm_winsys_create' [-Werror=implicit-function-declaration]
egl_pipe.c:154:36: error: dereferencing pointer to incomplete type

egl_pipe.c: In function 'pipe_radeonsi_create_screen':
egl_pipe.c:168:4: error: implicit declaration of function 'radeon_drm_winsys_create' [-Werror=implicit-function-declaration]
egl_pipe.c:169:36: error: dereferencing pointer to incomplete type
Comment 3 Laurent carlier 2014-04-12 06:04:42 UTC
*** Bug 77358 has been marked as a duplicate of this bug. ***
Comment 4 Knut Andre Tidemann 2014-04-12 07:37:05 UTC
I think 9d36a8d4d27230dd91d4c4002a781edeec22d044 broke it again if you do not build with R300 as well.

It works fine here when I build with R300.

The attached patch fixes the issue when R300 is not built.
Comment 5 Simone Scanzoni 2014-04-12 14:00:08 UTC
(In reply to comment #4)
> I think 9d36a8d4d27230dd91d4c4002a781edeec22d044 broke it again if you do
> not build with R300 as well.
> 
> It works fine here when I build with R300.
> 
> The attached patch fixes the issue when R300 is not built.

You are probably right.
My wording wasn't exact, the patch I attached fixes the build failure when building only r600 or radeonsi, or both.
Comment 6 Alexandre Demers 2014-04-12 15:56:51 UTC
(In reply to comment #2)
> Created attachment 97248 [details] [review] [review]
> patch for build failure with r600 and radeonsi
> 
> The bug isn't fixed upstream for r600 and radeonsi.
> 
> The attached patch solves the problem fixing these:
> 
> egl_pipe.c: In function 'pipe_r600_create_screen':
> egl_pipe.c:153:4: error: implicit declaration of function
> 'radeon_drm_winsys_create' [-Werror=implicit-function-declaration]
> egl_pipe.c:154:36: error: dereferencing pointer to incomplete type
> 
> egl_pipe.c: In function 'pipe_radeonsi_create_screen':
> egl_pipe.c:168:4: error: implicit declaration of function
> 'radeon_drm_winsys_create' [-Werror=implicit-function-declaration]
> egl_pipe.c:169:36: error: dereferencing pointer to incomplete type


Your patch was applied and tested on 857f3a68ea7370d1db2ef5faca181a36ada7d49d and I confirm this fixes the build.

Tested-by: Alexandre Demers
Comment 7 Marek Olšák 2014-04-13 00:38:51 UTC
(In reply to comment #2)
> Created attachment 97248 [details] [review] [review]
> patch for build failure with r600 and radeonsi
> 
> The bug isn't fixed upstream for r600 and radeonsi.
> 
> The attached patch solves the problem fixing these:
> 
> egl_pipe.c: In function 'pipe_r600_create_screen':
> egl_pipe.c:153:4: error: implicit declaration of function
> 'radeon_drm_winsys_create' [-Werror=implicit-function-declaration]
> egl_pipe.c:154:36: error: dereferencing pointer to incomplete type
> 
> egl_pipe.c: In function 'pipe_radeonsi_create_screen':
> egl_pipe.c:168:4: error: implicit declaration of function
> 'radeon_drm_winsys_create' [-Werror=implicit-function-declaration]
> egl_pipe.c:169:36: error: dereferencing pointer to incomplete type

I pushed your patch. Closing.


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.