bugThe FreeType Project - Bugs: bug #39804, Missing libpng dependency in...

 
 

bug #39804: Missing libpng dependency in freetype2.pc

Submitted by:  Rafael Antonio Porras Samaniego <spoek>
Submitted on:  Sun 18 Aug 2013 11:25:54 AM UTC  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.5.1

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 24 Aug 2013 07:22:09 PM UTC, comment #3:

I've changed the zlib and libpng check for dependencies, now it uses the PKG_CONFIG macros. Also, the "private" dependencies used for statically linking in freetype2.pc are now in the "Requires.private" field instead of the "Libs.private" one.

Just in case you find it useful, I've attached the patch that I've created using FreeType 2.5.0.1 as base. Don't forget to regenerate "configure".

(file #28924)

Rafael Antonio Porras Samaniego <spoek>
Sat 24 Aug 2013 12:01:21 PM UTC, comment #2:

I've been reading the pkg-config documentation and it seems that we may be addressing the necessary dependencies for static linking in the wrong way. Due to zlib and libpng providing ther own .pc files, the recommended way is to add those dependencies using the "Requires.private" field instead of the "Libs.private" one (please, read question three from the FAQ[1]).

Something like:
Requires.private: zlib libpng
Libs.private:

instead of:
Requires.private:
Libs.private: -lz -lpng16

What do you think?

[1] http://people.freedesktop.org/~dbn/pkg-config-guide.html#faq

Rafael Antonio Porras Samaniego <spoek>
Sun 18 Aug 2013 04:52:23 PM UTC, comment #1:

Thanks for the report; this is now fixed in the git repository.

Ah, I've just now detected your patch; this would have saved me some work :-)

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Sun 18 Aug 2013 11:25:54 AM UTC, original submission:

I'm using Freetype-2.5.0.1. I configure and build the library with libpng support, just the static versions of both of them: libfreetype and libpng.

Later, if I try to statically link a binary against libfreetype it fails because of missing png_* symbols.

The problem seems to be freetype2.pc which is missing references to libpng in "Libs.private". Well, at least that's my guess :)

I've patched the sources taken into account if libpng support is enabled or not to add that dependency to Libs.private. I've attached that patch. I've barely worked with autotools so maybe I missed something in configure.ac or so.

Rafael Antonio Porras Samaniego <spoek>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #28924:  use_requires_private.patch added by spoek (7KiB - application/octet-stream)
file #28866:  fix_freetype2.pc.patch added by spoek (4KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by spoek (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 24 Aug 2013 07:22:09 PM UTCspoekAttached File-=>Added use_requires_private.patch, #28924
    Sun 18 Aug 2013 04:52:23 PM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.5.1
    Sun 18 Aug 2013 11:25:54 AM UTCspoekAttached File-=>Added fix_freetype2.pc.patch, #28866

    Back to the top


    Powered by Savane 3.1-cleanup1