Depend on supported and tested libpng versions

Bug #1166506 reported by Joe Konno
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glmark2
Fix Committed
Undecided
Unassigned

Bug Description

With this change, have waf enforce a minimum libpng version. This will require some community verification, but on my system glmark2 built and linked against libpng15 runs just fine.

Have a patch here:
http://bazaar.launchpad.net/~jbkonno/+junk/glmark2/revision/268

Revision history for this message
Joe Konno (jbkonno) wrote :

Let me know if there are any blockers to merging my patch.

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Hi Joe, thanks for the patch.

As far as I am aware, libpng doesn't provide any backward compatibility guarantee. The code works with 1.2, but, e.g., for 1.5 we need the change you propose in the other bug. There is no guarantee that the code will continue to work with libpng > 1.5 without further changes.

Therefore, depending on libpng >= 1.2 is not reliable enough; we need to explicitly depend on tested libpng versions (1.2 or 1.5 or any other tested version).

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> Therefore, depending on libpng >= 1.2 is not reliable enough; we need to
> explicitly depend on tested libpng versions (1.2 or 1.5 or any other tested version).

To be clear, I don't mean depend on a single supported version, but ensure that we are building with any one of the supported and tested versions.

Revision history for this message
Joe Konno (jbkonno) wrote :

Thanks afrantzis.

This rev of the patch replaces the req_pkgs logic, checking for tested/supported libpng versions, with the assumption that libpng continues providing libpngXY.pc files in subsequent major releases:

http://bazaar.launchpad.net/~jbkonno/+junk/glmark2/revision/269

summary: - Depend on "libpng >= 1.2" not "libpng12"
+ Depend on supported and tested libpng versions
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

How about:

for pkg in supp_png_pkgs:
        try:
            ctx.check_cfg(package=pkg, uselib_store='libpng', args = ['--cflags', '--libs'])
        except:
            pass
        else:
            have_png = True
            break

This way we only check for the package once (and get saner config output).

Revision history for this message
Jesse Barker (jesse-barker) wrote :

Do we need an atleast_version in there somewhere? That's what I was playing with in my version of the patches.

Revision history for this message
Joe Konno (jbkonno) wrote :

Thanks afrantzis, jesse-barker. Updated my patch blending both of your suggestions:

http://bazaar.launchpad.net/~jbkonno/+junk/glmark2/revision/269

Revision history for this message
Joe Konno (jbkonno) wrote :

Feedback appreciated. Cheers.

Revision history for this message
Joe Konno (jbkonno) wrote :

Feedback? Cheers.

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Hi Joe, sorry for the delay. Commit applied as rev 270 in trunk.

Changed in glmark2:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.