Bug 100563 - Compile fails with radeonsi / LLVM (git)
Summary: Compile fails with radeonsi / LLVM (git)
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-04 19:34 UTC by Chris Rankin
Modified: 2017-04-05 20:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Chris Rankin 2017-04-04 19:34:13 UTC
Trying to compile Mesa from git, but fails:

In file included from si_debug.c:30:0:
sid_tables.h:134:9: error: implicit declaration of function ‘S_414_BYTE_COUNT’ [-Werror=implicit-function-declaration]
  {1127, S_414_BYTE_COUNT(~0u)},
         ^~~~~~~~~~~~~~~~

Other unknown symbols include:
- S_414_DISABLE_WR_CONFIRM
- S_008F14_DATA_FORMAT
- S_008F14_NUM_FORMAT
- S_008F20_PITCH
- S_0098F8_PIPE_INTERLEAVE_SIZE
- S_0098F8_NUM_SHADER_ENGINES
- S_0098F8_NUM_GPUS
- S_00B02C_EXCP_EN_CIK
- S_00B12C_EXCP_EN_CIK
- S_00B22C_EXCP_EN_CIK
- S_00B854_WAVES_PER_SH_CIK
- S_028350_SE_XSEL
- S_028350_SE_YSEL
- S_028354_SE_PAIR_XSEL
- S_028354_SE_PAIR_YSEL
- S_0287E4_BASE_ADDR
- S_028A7C_RDREQ_POLICY_VI
- S_028A90_ADDRESS_HI
- S_028B6C_RDREQ_POLICY_VI

My configuration options are:
$ CFLAGS='-O2 -g -gdwarf-2' ./autogen.sh --prefix=/home/chris/Programs/local-mesa --libdir=/home/chris/Programs/local-mesa/lib64 --with-vdpau-libdir=/home/chris/Programs/local-mesa/lib64/vdpau --with-gallium-drivers=radeonsi,swrast --with-egl-platforms=drm,x11 --with-llvm-prefix=/home/chris/Programs/local-llvm --enable-llvm-shared-libs --with-dri-drivers= -enable-texture-float --enable-64-bit --enable-nine

And my LLVM installation is fresh from Git.
Comment 1 Nicolai Hähnle 2017-04-05 14:01:10 UTC
This has nothing to do with LLVM. It looks like your sid_tables.h is stale -- please remove it (it's auto-generated) and try again.
Comment 2 Nicolai Hähnle 2017-04-05 14:02:21 UTC
To add a bit more explanation: sid_tables.h is usually updated automatically; but it was moved some time ago, and it's possible that you have an old copy in the old location.
Comment 3 Chris Rankin 2017-04-05 18:43:17 UTC
(In reply to Nicolai Hähnle from comment #2)
> To add a bit more explanation: sid_tables.h is usually updated
> automatically; but it was moved some time ago, and it's possible that you
> have an old copy in the old location.

OK, thanks. I'll give that a try, although I run "make distclean" before each build precisely to avoid this kind of error.
Comment 4 Jan Vesely 2017-04-05 19:45:16 UTC
(In reply to Chris Rankin from comment #3)
> (In reply to Nicolai Hähnle from comment #2)
> > To add a bit more explanation: sid_tables.h is usually updated
> > automatically; but it was moved some time ago, and it's possible that you
> > have an old copy in the old location.
> 
> OK, thanks. I'll give that a try, although I run "make distclean" before
> each build precisely to avoid this kind of error.

I don't think make distclean would help here. the old header is unknown to the build system, you'd need to run distclean before pulling in the changeset.

git status should show it as untracked file (git clean -f should work as well, but that removes all untracked files)
Comment 5 Chris Rankin 2017-04-05 20:40:11 UTC
Removing the old file fixes the build. Thanks.


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.