Hi,
when running a koji build for rawhide koji-rpmfusion build --scratch rawhide-free ../SRPMS/vdr-xineliboutput-2.1.0-16.20191117git32a5ffc.fc31.src.rpm
it get this errors [1]:
/usr/bin/ld: xine_sxfe_frontend.o: in function `opengl_init': /builddir/build/BUILD/vdr-xineliboutput/xine_sxfe_frontend.c:1865: undefined reference to `glXQueryVersion' /usr/bin/ld: /builddir/build/BUILD/vdr-xineliboutput/xine_sxfe_frontend.c:1887: undefined reference to `glXQueryExtensionsString' /usr/bin/ld: /builddir/build/BUILD/vdr-xineliboutput/xine_sxfe_frontend.c:1911: undefined reference to `glXChooseFBConfig' /usr/bin/ld: /builddir/build/BUILD/vdr-xineliboutput/xine_sxfe_frontend.c:1918: undefined reference to `glXChooseVisual' /usr/bin/ld: /builddir/build/BUILD/vdr-xineliboutput/xine_sxfe_frontend.c:1936: undefined reference to `glXCreateContext' /usr/bin/ld: /builddir/build/BUILD/vdr-xineliboutput/xine_sxfe_frontend.c:1943: undefined reference to `glXMakeCurrent' /usr/bin/ld: /builddir/build/BUILD/vdr-xineliboutput/xine_sxfe_frontend.c:1974: undefined reference to `glXCreatePixmap' /usr/bin/ld: xine_sxfe_frontend.o: in function `opengl_draw_frame_thread': /builddir/build/BUILD/vdr-xineliboutput/xine_sxfe_frontend.c:2177: undefined reference to `glXSwapBuffers' /usr/bin/ld: xine_sxfe_frontend.o: in function `opengl_deinit': /builddir/build/BUILD/vdr-xineliboutput/xine_sxfe_frontend.c:2008: undefined reference to `glXDestroyContext' /usr/bin/ld: xine_sxfe_frontend.o: in function `opengl_init': /builddir/build/BUILD/vdr-xineliboutput/xine_sxfe_frontend.c:1873: undefined reference to `glXQueryExtensionsString' collect2: error: ld returned 1 exit status make: *** [Makefile:408: vdr-sxfe] Error 1 make: *** Waiting for unfinished jobs....
[1] http://koji.rpmfusion.org/kojifiles/work/tasks/5060/375060/build.log
Any ideas how to fix this ?
Regards Martin
I am going to repost here my answer from the RPM Fusion mailing list:
Martin Gansser wrote:
f31 [1]: Checking for pkg-config opengl ... no Checking for opengl ... yes adding -lGL to LIBS_X11 adding -lGLU to LIBS_X11
f32[2]: Checking for pkg-config opengl ... adding -lOpenGL to LIBS_X11 yes
So the issue is the use of pkg-config opengl. That new pkg-config module does not do what the code (in the handwritten configure) actually expects. Up to F31, there was no "opengl" pkg-config file at all, so the code falled back to the hardcoded list of libraries, but on F32, there is no an "opengl" pkg-config file, and it returns -lOpenGL, not -lGL -lGLU.
The problem is that the handwritten configure script invokes this function:
test_library(){ subsys="$1" libname="$2" hdr="$3" lib="$4" func="$5" inc="$6" feature=$(toupper $libname)
# do not test if disabled from command-line if disabled $feature; then log "Not checking for $libname" disable $feature return 1 fi
disable $feature
# try pkg-config first if enabled pkgconfig; then test_library_pc "$subsys" "$libname" && enable "$feature" fi
# compile/link test as fallback if disabled $feature; then test_library_c "$subsys" "$libname" "$hdr" "$lib" "$func" "$inc" && enable $feature fi }
(contained in the script) as follows (line 404, I compacted the spaces):
test_library X11 opengl "GL/glx.h" "-lGL -lGLU" "glXQueryVersion(0,0,0)"
Changing that to:
test_library X11 OpenGL "GL/glx.h" "-lGL -lGLU" "glXQueryVersion(0,0,0)"
(i.e., s/opengl/OpenGL/ in that line) should fix it, because then it will look for an OpenGL pkg-config module instead, hopefully not find one (because pkg-config is case-sensitive), and then use the "-lGL -lGLU" flags instead.
The second argument of test_library is only used 1. as the pkg-config module name, 2. for the console output, and 3. fully upper-cased as the feature name, so it should be safe to change the case to something that does not happen to be the name of a wrong pkg-config module (while still mapping to the feature name OPENGL).
Kevin Kofler
Thank you for supporting me.