Bug 59261

Summary: xmlpool.h:96:29: fatal error: xmlpool/options.h: No such file or directory
Product: Mesa Reporter: Vinson Lee <vlee>
Component: Mesa coreAssignee: Alexandre Demers <alexandre.f.demers>
Status: RESOLVED DUPLICATE QA Contact:
Severity: blocker    
Priority: medium CC: alexandre.f.demers, cworth, flocke
Version: gitKeywords: regression
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Fixes missing xmlpool.h

Description Vinson Lee 2013-01-11 23:45:47 UTC
mesa: 5039ad6bc5cec5c49f01380aa270248aae77811e (master)

$ ./autogen.sh --with-dri-drivers= --with-gallium-drivers=swrast
[...]
$ make
[...]
  CC     dri_screen.lo
In file included from dri_screen.c:33:0:
../../../../../src/mesa/drivers/dri/common/xmlpool.h:96:29: fatal error: xmlpool/options.h: No such file or directory


b587a7595e7aae0809a8e7392e89c39df0c955b1 is the first bad commit
commit b587a7595e7aae0809a8e7392e89c39df0c955b1
Author: Carl Worth <cworth@cworth.org>
Date:   Mon Dec 3 15:43:19 2012 -0800

    driconf: Add translation-generation to build system, don't track generated files
    
    Previously, the xmlpool directory had a lone Makefile to assist poeple in
    manually invoking a deep make in order to update the translations in
    options.h. We can observe that this wasn't happening in fact, (new
    translations had been added to de.po without being generated into options.h,
    and new options had been manually added directly to options.h rather than to
    t_options.h).
    
    Prevent both of these problems from occurring in the future by automatically
    generating options.h as part of the standard build of mesa.
    
    For this, the generated options.h is now removed from version control, (along
    with Makefile in favor of Makefile.am).
    
    [chadv: Port the Autotools changes to Android.]
    Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
    
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

:100644 100644 1b2083df5e930948293e4ebc276ad6f8f168c049 72df83c0cd640d21df506a969e991627d08725b7 M	configure.ac
:040000 040000 ba43e3327c3a7bd75de5497eaa6ee065aaaaba88 c56772871d8761f3416a193a19cae9f263403e84 M	src
bisect run success
Comment 1 Alexandre Demers 2013-01-12 00:38:01 UTC
Either src/mesa/drivers/dri/common/xmlpool/options.h was removed by mistake or a reference to it was not removed as supposed.
Comment 2 Alexandre Demers 2013-01-12 00:45:25 UTC
Identified problem: src/mesa/drivers/dri/common/xmlpool.h is not built before being needed. Manually building it lets finish the build process.
Comment 3 Alexandre Demers 2013-01-12 00:59:24 UTC
In src/mesa/drivers/dri/Makefile.am, if HAVE_COMMON_DRI defines if it should go further in the "common" folder. It seems HAVE_COMMON_DRI is not defined, which explains why it's not building what's in that folder.
Comment 4 Alexandre Demers 2013-01-12 05:54:00 UTC
This could be related to an autogen.sh option: I'm using "--with-dri-drivers= " which sets any dri drivers off. However, while this is OK to do and it makes sense to disable HAVE_COMMON_DRI, it seems dri state_tracker needs xmlpoo.h.

In other words, HAVE_COMMON_DRI should also be set as TRUE if the dri state_tracker is to be built.
Comment 5 Alexandre Demers 2013-01-12 06:30:25 UTC
Created attachment 72887 [details] [review]
Fixes missing xmlpool.h

Please review and commit if OK. Fixes missing xmlpool.h when using dri state tracker.
Comment 6 demon 2013-01-12 10:59:10 UTC
Build works with patch, but I can't load the driver afterwards:

libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/r600_dri.so
libGL error: dlopen /usr/lib/xorg/modules/dri/r600_dri.so failed (/usr/lib/xorg/modules/dri/r600_dri.so: undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE)
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600

I don't know if this is related to the patch.
Comment 7 Alexandre Demers 2013-01-12 15:59:30 UTC
(In reply to comment #6)
> Build works with patch, but I can't load the driver afterwards:
> 
> libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/r600_dri.so
> libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/r600_dri.so
> libGL error: dlopen /usr/lib/xorg/modules/dri/r600_dri.so failed
> (/usr/lib/xorg/modules/dri/r600_dri.so: undefined symbol:
> _ZTVN10__cxxabiv120__si_class_type_infoE)
> libGL error: unable to load driver: r600_dri.so
> libGL error: driver pointer missing
> libGL error: failed to load driver: r600
> 
> I don't know if this is related to the patch.

Pretty sure it is not related since it fixes only the fact xmlpool.h was previously always present before being modified by culprit commit.
Comment 8 Alexandre Demers 2013-01-12 16:51:32 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Build works with patch, but I can't load the driver afterwards:
> > 
> > libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/r600_dri.so
> > libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/r600_dri.so
> > libGL error: dlopen /usr/lib/xorg/modules/dri/r600_dri.so failed
> > (/usr/lib/xorg/modules/dri/r600_dri.so: undefined symbol:
> > _ZTVN10__cxxabiv120__si_class_type_infoE)
> > libGL error: unable to load driver: r600_dri.so
> > libGL error: driver pointer missing
> > libGL error: failed to load driver: r600
> > 
> > I don't know if this is related to the patch.
> 
> Pretty sure it is not related since it fixes only the fact xmlpool.h was
> previously always present before being modified by culprit commit.

After searching a bit, you are hitting bug 59282 which is unrelated to the current bug/bad commit and patch.

Just in case, make a clean build of mesa. Also, you could update the ddx driver, I think I saw something that could be related being pushed yesterday (not sure though). That's what I did and it works OK over here.
Comment 9 Andreas Boll 2013-01-12 23:14:59 UTC
Thanks!
Fixed by 67ef755908375661c2cc1e7a26922682b981dc97
Comment 10 Piero Finizio 2013-01-13 10:09:57 UTC
THank you, Alexandre Demers.
Quick and effective fix.
Comment 11 Marc Dietrich 2013-03-05 11:10:44 UTC
re-broken again by 998d975e38db7478781130b42a4fb68d6b181055
Comment 12 Carl Worth 2013-03-05 16:09:24 UTC
(In reply to comment #11)
> re-broken again by 998d975e38db7478781130b42a4fb68d6b181055

Hi Mark,

I'd like to help with this bug, but "re-broken again" doesn't give me enough
information to even start looking.

For example, for me the build is working fine.

So I would need answers to the same questions as if you were submitting a new 

What failure mode are you hitting?

What error message are you getting?

What steps are needed to replicate the failure, (command-line options to
configure, etc.).

Thanks.

-Carl
Comment 13 Jakob Nixdorf 2013-03-05 20:16:35 UTC
I get the same error building mesa as of today:

  CC       dri2.lo
In file included from dri_screen.c:33:0:
../../../../../src/mesa/drivers/dri/common/xmlpool.h:96:29: fatal error: xmlpool/options.h: No such file or directory
compilation terminated.

configure options:

  ./autogen.sh --prefix=/usr \
    --sysconfdir=/etc \
    --with-dri-driverdir=/usr/lib/xorg/modules/dri \
    --with-gallium-drivers=r600,swrast \
    --with-dri-drivers="" \
    --with-egl-platforms=x11,drm \
    --enable-gallium-llvm \
    --enable-egl \
    --enable-gallium-egl \
    --enable-shared-glapi \
    --enable-gbm \
    --enable-glx-tls \
    --enable-dri \
    --enable-glx \
    --enable-osmesa \
    --enable-gles1 \
    --enable-gles2 \
    --enable-texture-float \
    --enable-xa \
    --enable-vdpau \
    --enable-gallium-gbm \
    --enable-gallium-g3dvl \
    --enable-r600-llvm-compiler
Comment 14 Jakob Nixdorf 2013-03-05 20:44:18 UTC
If I would have to make a wild guess I would blame this commit:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=998d975e38db7478781130b42a4fb68d6b181055
Since it changes the exact line the first patch for this bug changed.
Comment 15 Carl Worth 2013-03-05 23:52:00 UTC
Thanks for the configure command. With that I was able to replicate the bug.

For this latest reopening of this bug, there's already a new, minimal bug
report showing the bisect down to the buggy commit. So I'll mark this as
a duplicate and we can track the problem there.

-Carl

*** This bug has been marked as a duplicate of bug 61821 ***

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.