Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 584640 - media-libs/xine-lib-1.2.6-r1[xcb] fails to build with x11-libs/libxcb-1.12 | undefined reference to `xcb*
Summary: media-libs/xine-lib-1.2.6-r1[xcb] fails to build with x11-libs/libxcb-1.12 | ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-31 08:27 UTC by josef.95
Modified: 2016-07-22 08:52 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
xine-lib-1.2.6-r1 build.log (xine-lib-1.2.6-r1_build.log.txt,224.25 KB, text/plain)
2016-05-31 08:27 UTC, josef.95
Details
emerge --info (emerge--info.txt,5.98 KB, text/plain)
2016-05-31 08:28 UTC, josef.95
Details
patch-src_video__out_Makefile.am (patch-src_video__out_Makefile.am,1.17 KB, patch)
2016-05-31 12:40 UTC, Chí-Thanh Christopher Nguyễn
Details | Diff
Modified xine-lib ebuild to work with patch. (xine-lib-1.2.6-r1.ebuild,5.70 KB, text/plain)
2016-06-18 01:18 UTC, Kenton Groombridge
Details
xine-lib-1.2.6-r1.ebuild.patch (xine-lib-1.2.6-r1.ebuild.patch,647 bytes, patch)
2016-06-20 18:33 UTC, josef.95
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description josef.95 2016-05-31 08:27:15 UTC
Created attachment 435902 [details]
xine-lib-1.2.6-r1 build.log

media-libs/xine-lib-1.2.6-r1 fails to build with x11-libs/libxcb-1.12

libtool: link: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/xineplug_vo_out_xcbshm_la-video_out_xcbshm.o .libs/xineplug_vo_out_xcbshm_la-xcbosd.o  -Wl,--whole-archive ./.libs/libyuv2rgb.a -Wl,--no-whole-archive  -Wl,-rpath -Wl,/var/tmp/portage/media-libs/xine-lib-1.2.6-r1/work/xine-lib-1.2.6/src/xine-engine/.libs -Wl,--as-needed ../../src/xine-engine/.libs/libxine.so -lavutil -lxcb-shape -lxcb-shm  -march=native -O2 -Wl,-z -Wl,defs -Wl,--gc-sections -Wl,-O1 -pthread   -pthread -Wl,-soname -Wl,xineplug_vo_out_xcbshm.so -o .libs/xineplug_vo_out_xcbshm.so
.libs/xineplug_vo_out_xcbshm_la-video_out_xcbshm.o: In function `clean_output_area':
/var/tmp/portage/media-libs/xine-lib-1.2.6-r1/work/xine-lib-1.2.6/src/video_out/video_out_xcbshm.c:723: undefined reference to `xcb_poly_fill_rectangle'
.libs/xineplug_vo_out_xcbshm_la-video_out_xcbshm.o: In function `xshm_dispose':
/var/tmp/portage/media-libs/xine-lib-1.2.6-r1/work/xine-lib-1.2.6/src/video_out/video_out_xcbshm.c:1046: undefined reference to `xcb_free_gc'
.libs/xineplug_vo_out_xcbshm_la-video_out_xcbshm.o: In function `xshm_display_frame':
/var/tmp/portage/media-libs/xine-lib-1.2.6-r1/work/xine-lib-1.2.6/src/video_out/video_out_xcbshm.c:820: undefined reference to `xcb_flush'
/var/tmp/portage/media-libs/xine-lib-1.2.6-r1/work/xine-lib-1.2.6/src/video_out/video_out_xcbshm.c:815: undefined reference to `xcb_put_image'
.libs/xineplug_vo_out_xcbshm_la-video_out_xcbshm.o: In function `xshm_gui_data_exchange':

[....]

/var/tmp/portage/media-libs/xine-lib-1.2.6-r1/work/xine-lib-1.2.6/src/video_out/xcbosd.c:536: undefined reference to `xcb_poly_fill_rectangle'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:1291: xineplug_vo_out_xcbshm.la] Error 1
make[3]: Leaving directory '/var/tmp/portage/media-libs/xine-lib-1.2.6-r1/work/xine-lib-1.2.6/src/video_out'
make[2]: *** [Makefile:1671: all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-libs/xine-lib-1.2.6-r1/work/xine-lib-1.2.6/src/video_out'
make[1]: *** [Makefile:604: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/media-libs/xine-lib-1.2.6-r1/work/xine-lib-1.2.6/src'
make: *** [Makefile:680: all-recursive] Error 1
 * ERROR: media-libs/xine-lib-1.2.6-r1::gentoo failed (compile phase):
 *   emake failed

Workaround: After downgrade to x11-proto/xcb-proto-1.11 and x11-libs/libxcb-1.11.1
builds media-libs/xine-lib-1.2.6-r1 fine.
Comment 1 josef.95 2016-05-31 08:28:41 UTC
Created attachment 435904 [details]
emerge --info

emerge --info
Comment 2 Chí-Thanh Christopher Nguyễn gentoo-dev 2016-05-31 12:40:13 UTC
Created attachment 435930 [details, diff]
patch-src_video__out_Makefile.am

Patch which is present in NetBSD pkgsrc, untested, origins unclear.
Comment 3 Leif Biberg Kristensen 2016-06-01 07:21:54 UTC
I had the same issue and solved it by

echo "media-libs/xine-lib -xcb" >> /etc/portage/package.use
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-06-01 07:57:55 UTC
The attached patch didn't solve the issue for me.
Comment 5 Juergen Rose 2016-06-05 08:18:01 UTC
The attached patch didn't solve the issue for me, either.
Comment 6 David Kredba 2016-06-14 19:29:31 UTC
A workaround is to append -lxcb-shm and -lxcb to command

/bin/sh ../../libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -fvisibility=hidden     -pipe  -Wall -Wformat=2 -Wno-format-zero-length -Wmissing-format-attribute -Werror-implicit-function-declaration -Wstrict-aliasing=2 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wpointer-arith -g -O2 -march=core2 -ggdb -pipe -Wall -Wchar-subscripts -Wnested-externs -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wmissing-format-attribute -Wno-pointer-sign -Wformat=2 -Wno-format-zero-length -Wformat-security -Wstrict-aliasing=2 -Werror=implicit-function-declaration -Wl,-z,defs -Wl,--gc-sections -avoid-version -module -g -Wl,-O1 -Wl,--as-needed -o xineplug_vo_out_xcbxv.la -rpath /usr/lib64/xine/plugins/2.5 xineplug_vo_out_xcbxv_la-video_out_xcbxv.lo xineplug_vo_out_xcbxv_la-xcbosd.lo ../../src/xine-engine/libxine.la -pthread -lxcb-xv -lxcb-shape

so it becomes

/bin/sh ../../libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -fvisibility=hidden     -pipe  -Wall -Wformat=2 -Wno-format-zero-length -Wmissing-format-attribute -Werror-implicit-function-declaration -Wstrict-aliasing=2 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wpointer-arith -g -O2 -march=core2 -ggdb -pipe -Wall -Wchar-subscripts -Wnested-externs -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wmissing-format-attribute -Wno-pointer-sign -Wformat=2 -Wno-format-zero-length -Wformat-security -Wstrict-aliasing=2 -Werror=implicit-function-declaration -Wl,-z,defs -Wl,--gc-sections -avoid-version -module -g -Wl,-O1 -Wl,--as-needed -o xineplug_vo_out_xcbxv.la -rpath /usr/lib64/xine/plugins/2.5 xineplug_vo_out_xcbxv_la-video_out_xcbxv.lo xineplug_vo_out_xcbxv_la-xcbosd.lo ../../src/xine-engine/libxine.la -pthread -lxcb-xv -lxcb-shape -lxcb-shm -lxcb

in /var/tmp/portage/media-libs/xine-lib-1.2.6-r1/work/xine-lib-1.2.6/src/video_out.
Comment 7 David Kredba 2016-06-14 19:30:53 UTC
Patch pointed out by Chí-Thanh Christopher Nguyễn should work after eautoreconf().
Comment 8 Kenton Groombridge 2016-06-18 01:18:51 UTC
Created attachment 437904 [details]
Modified xine-lib ebuild to work with patch.

The patch is only part of the solution. The other piece that is xcb needs to be included along with xcb-shm.  This ebuild modifies the configure script to include both.  Place the above patch in the files directory (leave the name the same) and use this ebuild.
Comment 9 Juergen Rose 2016-06-19 15:20:44 UTC
(In reply to Kenton Groombridge from comment #8)
> Created attachment 437904 [details]
> Modified xine-lib ebuild to work with patch.
> 
> The patch is only part of the solution. The other piece that is xcb needs to
> be included along with xcb-shm.  This ebuild modifies the configure script
> to include both.  Place the above patch in the files directory (leave the
> name the same) and use this ebuild.

Thanks Kenton, with your ebuild and the patch of Chí-Thanh Christopher Nguyễn I as again able to emerge xine-lib-1.2.6-r1.
Comment 10 josef.95 2016-06-20 18:33:32 UTC
Created attachment 438212 [details, diff]
xine-lib-1.2.6-r1.ebuild.patch
Comment 11 josef.95 2016-06-20 18:36:08 UTC
Yes, with the patch-src_video__out_Makefile.am
and the ebuild modification together builds here fine.

Thank you.
Comment 12 Kenton Groombridge 2016-06-20 19:35:59 UTC
You are welcome. My ebuild is kludgy, but it works. I am sure there is a more appropriate way to do it.
Comment 13 Oleh 2016-06-28 13:30:21 UTC
any progress in here? having broken ebuilds in portage tree is not tolerated. patch fixes. eautoreconf is needed, because patch touching Makefile.am
Comment 14 Oleh 2016-07-01 04:22:09 UTC
ping
Comment 15 Juergen Rose 2016-07-05 06:37:27 UTC
I hit the issue at the next system. A patch in the default portage tree would be really nice.
Comment 16 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-07-06 12:50:31 UTC
Sorry guys but using sed to change the configure script just _after_ we recreated it with eautoreconf is such a kludge I don't wanna add such a hack to the ebuild. The sed given in the ebuild patch makes the whole thing even worse as it unconditionally changes every occurance of "xcb-shm" in the configure script. 

If it's not sufficient to patch Makefile.am perhaps we also need to patch the file m4/video_out.m4 anyhow or some other file in the m4 directory. Any idea/patch is highly welcome.
Comment 17 Oleh 2016-07-17 09:40:42 UTC
just in case some distributions do not ship xine configured with xcb. freebsd and arch linux checked. For a matter of avoiding the problem, it maybe good to package.use.mask this offending USE for time being and report to upstream.
Comment 18 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-07-22 08:52:59 UTC
commit bb434cc7c502effb28f86869a9da82de8182c229
Author: Lars Wendler <polynomial-c@gentoo.org>
Date:   Fri Jul 22 10:37:11 2016

    media-libs/xine-lib: Fixed compilation with >=x11-libs/libxcb-1.12
    
    Gentoo bug #584640
    
    Package-Manager: portage-2.3.0
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>