Problem (and solution) building graphics/dri using WITH_GALLIUM

Jim Pingle lists at pingle.org
Tue Apr 8 21:25:48 UTC 2014


Hopefully this saves someone else some time/Googling in case they hit
the same problem I had:

I upgraded from FreeBSD 9.x to 10.x over the weekend and have been
recompiling my ports ever since. Decided to try WITH_NEW_XORG and
WITH_GALLIUM to see how well it worked.

After the usual rounds of recompiling everything and getting up to date,
I switched those knobs on and followed the directions.

Everything seemed to compile except for graphics/dri, which I was unable
to compile using WITH_GALLIUM. I tried on its own, with portupgrade,
with and without BATCH set, with and without MAKE_JOBS_UNSAFE, and so on.

Looking closer at the errors, it appeared I had multiple conflicting
llvm packages installed and I did have two llvm packages there. But even
after checking and cleaning that up and ensuring just one was present,
there were still errors about llvm structures being redefined.

Turns out there was an orphaned set of llvm include files in
/usr/local/include/llvm and /usr/local/include/llvm-c that did not
belong to any package still on my filesystem. After removing those files
I was able to successfully build graphics/dri with Gallium.

Here's a sample of the build log for searching:

===============================================
In file included from gallivm/lp_bld_misc.cpp:64:
In file included from /usr/local/llvm33/include/llvm/IR/IRBuilder.h:21:
In file included from /usr/local/llvm33/include/llvm/IR/BasicBlock.h:19:
In file included from /usr/local/llvm33/include/llvm/IR/Instruction.h:19:
In file included from /usr/local/llvm33/include/llvm/IR/User.h:22:
In file included from /usr/local/llvm33/include/llvm/IR/Value.h:17:
/usr/local/llvm33/include/llvm/IR/Use.h:45:7: error: redefinition of
'llvm::PointerLikeTypeTraits<llvm::Use **>'
class PointerLikeTypeTraits<Use**> {
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/llvm/Use.h:43:7: note: previous definition is here
class PointerLikeTypeTraits<Use**> {
      ^
In file included from gallivm/lp_bld_misc.cpp:64:
In file included from /usr/local/llvm33/include/llvm/IR/IRBuilder.h:21:
In file included from /usr/local/llvm33/include/llvm/IR/BasicBlock.h:19:
In file included from /usr/local/llvm33/include/llvm/IR/Instruction.h:19:
In file included from /usr/local/llvm33/include/llvm/IR/User.h:22:
In file included from /usr/local/llvm33/include/llvm/IR/Value.h:17:
/usr/local/llvm33/include/llvm/IR/Use.h:60:7: error: redefinition of 'Use'
class Use {
      ^
/usr/local/include/llvm/Use.h:58:7: note: previous definition is here
class Use {
      ^
In file included from gallivm/lp_bld_misc.cpp:64:
In file included from /usr/local/llvm33/include/llvm/IR/IRBuilder.h:21:
In file included from /usr/local/llvm33/include/llvm/IR/BasicBlock.h:19:
In file included from /usr/local/llvm33/include/llvm/IR/Instruction.h:19:
In file included from /usr/local/llvm33/include/llvm/IR/User.h:22:
In file included from /usr/local/llvm33/include/llvm/IR/Value.h:17:
/usr/local/llvm33/include/llvm/IR/Use.h:152:19: error: redefinition of
'llvm::simplify_type<llvm::Use>'
template<> struct simplify_type<Use> {
                  ^~~~~~~~~~~~~~~~~~
/usr/local/include/llvm/Use.h:151:19: note: previous definition is here
template<> struct simplify_type<Use> {
                  ^
===============================================

Full build log for the curious:
https://gist.githubusercontent.com/jim-p/10140152/raw/9e71c62e00c7a7fdcbf1d151d7c4a66902ad26fa/gistfile1.txt

I don't know if there is a way the port could be more specific about the
include path to possibly avoid this situation in an automated way, but
if so it might be worth investigating. Less foot shooting == More
testing. :-)

At the moment I'm happily rolling along with VT Console + KMS and
Gallium + New X.org, and it's beautiful. Transparency and other effects
work smooth and look amazing.

[  1022.000] (--) RADEON(0): Chipset: "ATI RV730 PRO [Radeon HD 4650]"
(ChipID = 0x9498)

Thanks for all the hard work!

Jim


More information about the freebsd-x11 mailing list