Menu

#982 libgphoto2 can't find media-libs/gd because of broken gdlib-config check

closed-fixed
None
5
2014-08-17
2014-05-21
Pacho Ramos
No

As reported downstream at:
https://bugs.gentoo.org/show_bug.cgi?id=510934

It tries gdlib-config and treats that as regular *-config script. But...

$ gdlib-config --libs
-lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lz -lm

Notice no '-lgd' there. So 'gdlib-config --libs' outputs only libs needed for static linking. libgphoto2 assumes '-lgd' is supposed to be there and fails to link the test program.

Thanks for fixing it

Discussion

  • Marcus Meissner

    Marcus Meissner - 2014-05-21

    well, on openSUSE:

    $ gdlib-config --libs
    -lgd
    $ rpm -qf /usr/bin/gdlib-config
    gd-devel-2.0.36.RC1-78.1.2.x86_64

    the intent of *-config is to supply the required link lines, and not just the required libraries as far as I understand.

    Hmm, but it can perhaps be worked around somehow to cover both cases.

     
  • Michał Górny

    Michał Górny - 2014-05-29

    This is because openSUSE is patching gdlib-config. We in Gentoo install the original version without modifications to specifically avoid being source of such an issues.

    If you look at the .src.rpm of this gd-devel version, you'd notice the following patch:

    Index: config/gdlib-config.in
    ===================================================================
    --- config/gdlib-config.in.orig 2006-10-11 11:46:22.000000000 +0200
    +++ config/gdlib-config.in  2007-12-20 03:59:07.000000000 +0100
    @@ -71,7 +71,7 @@ while test $# -gt 0; do
        echo @LDFLAGS@
        ;;
         --libs)
    -   echo @LIBS@ @LIBICONV@
    +   echo -l@GDLIBNAME@
        ;;
         --cflags|--includes)
        echo -I@includedir@
    
     
  • Marcus Meissner

    Marcus Meissner - 2014-06-01
    • status: open --> pending-fixed
    • assigned_to: Marcus Meissner
     
  • Marcus Meissner

    Marcus Meissner - 2014-06-01

    I now uncondtionaly also add -lgd to the LIBGD_LIBS variable, which should fix this problem.

     
  • Marcus Meissner

    Marcus Meissner - 2014-08-17

    fixed in 2.5.5 i hope

     
  • Marcus Meissner

    Marcus Meissner - 2014-08-17
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.