#9330 closed defect (fixed)

commit 7ec7e6aa2d394d8d25472c55c5da2e44b0a60041 (configure: use pkg-config for xlib/Xv) breaks linking, can't build

Reported by: tjackson Owned by:
Priority: critical Component: build system
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description (last modified by Carl Eugen Hoyos)

My normal build, reproduction for git master:
./configure --enable-nonfree --enable-cuda --enable-libnpp --extra-cflags=-I/opt/cuda/include --extra-ldflags=-L/opt/cuda/lib64
make -j4

All is fine in the previous commit (1349de10b22d6c8643bec43eced296ec2a126671).

Attached config.log for the failed build.

Failure output during linking:

LD      ffmpeg_g
LD      ffplay_g
LD      ffprobe_g
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: libavdevice/libavdevice.a(xv.o): undefined reference to symbol 'XShmAttach'
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: /usr/x86_64-pc-linux-gnu/lib/libXext.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:123: ffmpeg_g] Error 1
make: *** Waiting for unfinished jobs....
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: libavdevice/libavdevice.a(xv.o): undefined reference to symbol 'XShmAttach'
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: /usr/x86_64-pc-linux-gnu/lib/libXext.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:123: ffplay_g] Error 1
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: libavdevice/libavdevice.a(xv.o): undefined reference to symbol 'XShmAttach'
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: /usr/x86_64-pc-linux-gnu/lib/libXext.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:123: ffprobe_g] Error 1

Attachments (2)

config.log (458.3 KB ) - added by tjackson 12 months ago.
ffbuild/config.log
speculative_diff.patch (701 bytes ) - added by tjackson 12 months ago.

Download all attachments as: .zip

Change History (6)

by tjackson, 12 months ago

Attachment: config.log added

ffbuild/config.log

comment:1 by tjackson, 12 months ago

Hmmm, forget the extra configure options above, simply ./configure ; make is broken too.

comment:2 by tjackson, 12 months ago

I don't know if it's correct but this fixes it for me:

diff --git a/configure b/configure
index 5ef94e7ccd..1bac59c963 100755
--- a/configure
+++ b/configure
@@ -6194,8 +6194,8 @@ check_func_headers windows.h Sleep
 check_func_headers windows.h VirtualAlloc
 check_func_headers glob.h glob
 enabled xlib && {
-    check_pkg_config xlib xv "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute ||
-    check_lib xlib "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext; }
+    check_pkg_config xext xlib xv "X11/extensions/Xext.h" "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute ||
+    check_lib xlib "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXext -lXv -lX11; }
 
 check_headers direct.h
 check_headers dirent.h
Last edited 12 months ago by Carl Eugen Hoyos (previous) (diff)

by tjackson, 12 months ago

Attachment: speculative_diff.patch added

comment:3 by Carl Eugen Hoyos, 12 months ago

Component: undeterminedbuild system
Description: modified (diff)
Reproduced by developer: set

The configure line does not look useful but the priority is hard to disagree with...

comment:4 by tjackson, 12 months ago

Resolution: fixed
Status: newclosed

Builds again, thanks. Fixed by 395d9ad00a7fe9f3e5f4888429830c4e820616cc.

Note: See TracTickets for help on using tickets.