After commit#0efd773f719dd2deddb4b6703edf022b294cd349 #ifdef HAVE_LIBDRM is used in include/GL/internal/dri_interface.h. "HAVE_LIBDRM" macro is defined in configure script and used in build of Mesa itself, OK, works fine. It is a part of installed header files, but HAVE_LIBDRM is not defined anywhere in installed files, NG, because it may cause build failure with "redefinition of typedef" for the case source code includes both "include/GL/internal/dri_interface.h" and "libdrm/drm.h".
Where in particular is this an issue? Can't such software #define or #undef HAVE_DRM as required before including the header (and perhaps revert HAVE_DRM to the state it was in originally)?
Oops, I meant HAVE_LIBDRM
It's xorg-server/glx/glxdri2.c.
(In reply to OBATA Akio from comment #3) > It's xorg-server/glx/glxdri2.c. Oh
Hi OBATA, Can you give a specific example (failing config/build log, platform info) of the issue. I recall giving the last 4 xserver branches a try and did not notice anything wrong.
I can not reproduce this. Which platform and which version of the X server?
Maybe, depend on compiler (I'm using gcc-4.5.3). related changes in GCC? https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=ce3765bf44e49ef0568a1ad4a0b7f807591d6412
Which binutils?
With gcc-4.6 and later, you can reproduce such error with "-pedantic-errors".
nah, I want to build gcc anyway
I guess building a really old gcc toolchain with a recent gcc compiler is an incredibly stupid thing to do (i.e. those old libraries are incredibly buggy). I really should have just grabbed a distro with gcc 4.5.3 preinstalled. "-pedantic-errors" does not seem to break anything (that is a bad thing). Really tired...
Maybe try and find a way to suppress compiler warnings (although I am guessing you have done that), also it would be nice if you tried to compile the git://anongit.freedesktop.org/xorg/xserver if at all possible.
Ouch... seems that typedef redefinitions are a C11 thing, which obviously we cannot force onto others. Rather than reintroducing the double-negative (esp. since the meaning varies, in one's native language), how about we do s/WITH_LIBDRM/HAVE_LIBDRM/ in xserver ? There is a insane permutation of xserver builds, so we might need something extra for the corner cases, but otherwise things should just work.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/993.
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.