<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [dri3] Building mesa fails with dri3 enabled"
href="https://bugs.freedesktop.org/show_bug.cgi?id=80848#c22">Comment # 22</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [dri3] Building mesa fails with dri3 enabled"
href="https://bugs.freedesktop.org/show_bug.cgi?id=80848">bug 80848</a>
from <span class="vcard"><a class="email" href="mailto:emil.l.velikov@gmail.com" title="Emil Velikov <emil.l.velikov@gmail.com>"> <span class="fn">Emil Velikov</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=80848#c21">comment #21</a>)
<span class="quote">> (In reply to <a href="show_bug.cgi?id=80848#c20">comment #20</a>)
> > (In reply to <a href="show_bug.cgi?id=80848#c19">comment #19</a>)
> > > (In reply to <a href="show_bug.cgi?id=80848#c18">comment #18</a>)
> > > > I had cross-compilation problems on Ubuntu (building 32bit Mesa on 64bit
> > > > environment) and my problems went away by reverting
> > > >
> > > > 3ecd9e1a93817180fa5b280e5fe11c903cca38ba
> > > >
> > > > For some reason otherwise a wrong version (64bit one) of libexpat got
> > > > included to linking. Patch adds $(EXPAT_LIBS) when linking libloader so that
> > > > is why I tried the revert. I'll try to see why this happens.
> > >
> > > whoopsie forgot to paste my build command line:
> > >
> > > INTEL_CFLAGS='-I/opt/include -I/opt/include/libdrm' INTEL_LIBS='-L/opt/lib
> > > -ldrm_intel' CFLAGS='-m32' CXXFLAGS='-m32' ./autogen.sh --prefix=/opt
> > > --enable-gles2 --without-gallium-drivers --enable-32-bit
> > > --with-dri-drivers=i965 --with-egl-platforms=x11 --disable-osmesa
> > > --disable-vdpau --disable-dri3 --enable-debug --enable-glx-tls
> > > --enable-texture-float
> >
> > I find something a bit disturbing here - why would you set
> > INTEL_{CFLAGS,LIBS} rather than relying on pkg-config ?
>
> because libdrm is the only library I use from under /opt, rest comes from
> the system
>
> > Your native arch is x86-64 thus the lack of PKG_CONFIG_PATH is the one
> > causing you problems - pkgconfig looks for the variable (none set) then goes
> > into the default dir which has a .pc file pointing to a 64bit library.
>
> well, it has been working so far without problems though (and this command
> line actually still works fine on my fedora machine, but on ubuntu it does
> not), libtool takes care of pointing to the correct arch directory
> </span >
Just because it works (sometimes) it doesn't mean it's a good idea :) Please
migrate to using PKG_CONFIG_PATH which should work consistently for every
platform. It also scales nicely if more things are available in the custom
prefix.
Snippet from the pkg-config man page:
"pkg-config retrieves information about packages from special metadata files.
These files are named after the package, and has a .pc extension. On most
systems, pkg-config looks in /usr/lib/pkgconfig, /usr/share/pkgconfig,
/usr/local/lib/pkgconfig and /usr/local/share/pkgconfig for these files. It
will additionally look in the colon-separated (on Windows, semicolon-separated)
list of directories specified by the PKG_CONFIG_PATH environment variable."
<span class="quote">> > Or to put things in a different light - please can we avoid shooting mesa in
> > the back by providing any other flags but PKG_CONFIG_PATH, CFLAGS and
> > CXXFLAGS. Thank you
> >
> > P.S. Things should just work even without C{XX,}FLAGS='-m32' unless we have
> > a bug somewhere :)
>
> Unfortunately we do, giving '-m32' manually is the only way to get working
> 32bit build because we initialize libtool too early (LT_INIT), here's the
> bug:
>
> <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - Building 32 bit mesa on 64 bit OS fails since change for automake"
href="show_bug.cgi?id=50754">https://bugs.freedesktop.org/show_bug.cgi?id=50754</a></span >
Thanks I'll look into it.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>