Bug 102077 - multilib mesa fail to build with "egl/drivers/dri2/platform_drm.c:542: undefined reference to `gbm_bo_get_bpp'"
Summary: multilib mesa fail to build with "egl/drivers/dri2/platform_drm.c:542: undefi...
Status: RESOLVED NOTOURBUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: EGL (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-07 16:29 UTC by Laurent carlier
Modified: 2018-02-12 15:27 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
build log (200.87 KB, text/x-log)
2017-08-07 16:29 UTC, Laurent carlier
Details

Description Laurent carlier 2017-08-07 16:29:05 UTC
Created attachment 133312 [details]
build log

build with:

  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
  # for our 32 bit llvm-config 
  export LLVM_CONFIG="/usr/bin/llvm-config32"

  cd ${srcdir}/mesa
  
  ./autogen.sh \
  --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu \
  --libdir=/usr/lib32 \
  --prefix=/usr \
  --sysconfdir=/etc \
  --with-dri-driverdir=/usr/lib32/xorg/modules/dri \
  --with-gallium-drivers=r300,r600,radeonsi,nouveau,swrast,virgl,swr \
  --with-dri-drivers=i915,i965,r200,radeon,nouveau,swrast \
  --with-platforms=x11,drm,wayland \
  --with-vulkan-drivers=intel,radeon \
  --disable-xvmc \
  --disable-libunwind \
  --enable-libglvnd \
  --enable-llvm \
  --enable-llvm-shared-libs \
  --enable-shared-glapi \
  --enable-lmsensors \
  --enable-glx-tls \
  --enable-egl \
  --enable-glx \
  --enable-gles1 \
  --enable-gles2 \
  --enable-gbm \
  --enable-dri \
  --enable-gallium-osmesa \
  --enable-gallium-extra-hud \
  --enable-texture-float \
  --enable-nine \
  --enable-vdpau

Probably related to:
https://cgit.freedesktop.org/mesa/mesa/commit/?id=04a40f7d2ad8fc9556c4c3a8742bbf2c948d28a0
Comment 1 Eric Engestrom 2017-08-07 23:45:55 UTC
Can't reproduce; using the exact same exports and config given works for me (on bfed189ee0).

This reminds me a lot of #100259; can you try the suggestions in comment #5?
- use slibtool [1]
- build in a chroot [2]
- remove system libgbm for the duration of the build

[1] https://aur.archlinux.org/packages/slibtool/
[2] https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot
Comment 2 Laurent carlier 2017-08-08 14:17:47 UTC
All my packages are built in a chroot :)

I somehow followed your suggestion, i've installed a dummy package in the chroot that replaced mesa/lib32-mesa, and that fixed the build failure (so the problem is related to libtool that try to link with libgbm library in the system)

So i can close it as NOTOURBUG
Comment 3 Nix 2018-02-11 21:46:43 UTC
This is actually a Mesa bug: the install-time link of libEGL.la is picking up libgbm from the installation prefix rather than the $DESTDIR-prepended prefix: for some reason --inst-prefix-dir isn't working.

I, too, would be inclined to ignore it on the grounds that the whole mess will be thrown overboard once Meson becomes the build system.
Comment 4 Emil Velikov 2018-02-12 15:27:24 UTC
(In reply to Nix from comment #3)
> This is actually a Mesa bug: the install-time link of libEGL.la is picking
> up libgbm from the installation prefix rather than the $DESTDIR-prepended
> prefix: for some reason --inst-prefix-dir isn't working.
> 
> I, too, would be inclined to ignore it on the grounds that the whole mess
> will be thrown overboard once Meson becomes the build system.

Pretty much all of this is wrong and off-topic. Arch has a broken circular dependency, which is part of the problem.


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.