Re: xine_sxfe_frontend.c:1865: undefined reference to `glXQueryVersion'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux