Bug 1546714 - annotated build fails build of Mesa with underlinking errors
Summary: annotated build fails build of Mesa with underlinking errors
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: annobin
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-19 11:57 UTC by Igor Gnatenko
Modified: 2018-10-03 11:45 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-10-03 11:45:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Igor Gnatenko 2018-02-19 11:57:22 UTC
Right away after introducing annotated builds, mesa started to fail with errors like:

libtool: link: g++  -fPIC -DPIC -shared   .libs/pipe_r300.o  -Wl,--whole-archive ../../../../src/gallium/auxiliary/.libs/libgalliumvl.a ../../../../src/gallium/auxiliary/.libs/libgalliumvlwinsys.a ../../../../src/gallium/auxiliary/.libs/libgallium.a ../../../../src/compiler/nir/.libs/libnir.a ../../../../src/util/.libs/libmesautil.a ../../../../src/gallium/drivers/rbug/.libs/librbug.a ../../../../src/gallium/drivers/trace/.libs/libtrace.a ../../../../src/gallium/winsys/radeon/drm/.libs/libradeonwinsys.a ../../../../src/gallium/drivers/r300/.libs/libr300.a -Wl,--no-whole-archive  -L/usr/lib64 -lz -lm -lpthread -ldl -lLLVM-6.0 -ldrm -ldrm_radeon -L/usr/lib/gcc/x86_64-redhat-linux/8 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../..  -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,--gc-sections -Wl,--no-undefined -Wl,--version-script=../../../../src/gallium/targets/pipe-loader/pipe.sym -static-libstdc++ -pthread   -pthread -Wl,-soname -Wl,pipe_r300.so -o .libs/pipe_r300.so
make[4]: Leaving directory '/builddir/build/BUILD/mesa-18.0.0-rc4/src/gallium/targets/pipe-loader'
../../../../src/gallium/auxiliary/.libs/libgalliumvlwinsys.a(libgalliumvlwinsys_la-vl_winsys_dri.o): In function `vl_dri2_get_flush_reply':
/builddir/build/BUILD/mesa-18.0.0-rc4/src/gallium/auxiliary/vl/vl_winsys_dri.c:108: undefined reference to `xcb_dri2_swap_buffers_reply'
/builddir/build/BUILD/mesa-18.0.0-rc4/src/gallium/auxiliary/vl/vl_winsys_dri.c:110: undefined reference to `xcb_dri2_wait_sbc_reply'

Adding %undefine _annotated_build fixes issue.

Comment 1 Nick Clifton 2018-02-19 16:30:54 UTC
Hi Igor,

  I am baffled by this one.  Do you happen to know where the missing symbols
  should be defined ?

  The link is being performed with the -Wl,--no-undefined option enabled, so 
  the symbols should be present in one of the objects/libraries on the 
  command line.  Plus in the logs for a successful build, with annotated_builds 
  disabled, the link command line is *exactly* the same.  So the symbols must
  be present somewhere in the successful build and missing in the failing build.

Cheers
  Nick

Comment 2 Igor Gnatenko 2018-02-20 07:39:00 UTC
(In reply to Nick Clifton from comment #1)
> Hi Igor,

Hello ;)

>   I am baffled by this one.  Do you happen to know where the missing symbols
>   should be defined ?

I suppose in libxcb-dri[23].so.
>
>   The link is being performed with the -Wl,--no-undefined option enabled, so 
>   the symbols should be present in one of the objects/libraries on the 
>   command line.  Plus in the logs for a successful build, with
> annotated_builds 
>   disabled, the link command line is *exactly* the same.  So the symbols must
>   be present somewhere in the successful build and missing in the failing
> build.

Florian said that this might be a bug in ld.

Comment 3 Fedora End Of Life 2018-02-20 15:24:15 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 4 Nick Clifton 2018-03-01 13:24:54 UTC
Sorry - I am completely stumped by this one.  I cannot for the life of me
work out how the annobin plugin could be causing the dri[23] libraries (and
others) to be omitted from the link command line.  It just does not make
any sense.

There must be something special in the mesa build system that is triggering
this problem - as otherwise it would have been reported for other packages
as well - but I just cannot figure out what it is that changes when annobin
is enabled. :-(

Comment 5 Adam Jackson 2018-09-28 18:35:02 UTC
This doesn't seem to happen when using meson to build instead of autobleh. The meson build needs some love to build well on non-x86, but nothing too terrible, so I think we're better off just switching the build.

Comment 6 Nick Clifton 2018-10-03 11:45:05 UTC
OK then, I will close this BZ.


Note You need to log in before you can comment on or make changes to this bug.