agg_rasterizer_cells_aa.h missing #includes <limits.h> and <stdlib.h> so it doesn't compile on new GCC versions

Bug #393923 reported by Lasse Kärkkäinen
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libagg
Fix Released
Unknown
agg (Debian)
Fix Released
Unknown
agg (Ubuntu)
Fix Released
Undecided
Unassigned
Jaunty
Won't Fix
Undecided
Unassigned
Karmic
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Undecided
Unassigned

Bug Description

--- a/agg_rasterizer_cells_aa.h 2009-06-30 18:52:53.806022454 +0300
+++ b/agg_rasterizer_cells_aa.h 2009-06-30 18:40:49.886565100 +0300
@@ -39,6 +39,8 @@
 #ifndef AGG_RASTERIZER_CELLS_AA_INCLUDED
 #define AGG_RASTERIZER_CELLS_AA_INCLUDED

+#include <limits.h>
+#include <stdlib.h>
 #include <string.h>
 #include <math.h>
 #include "agg_math.h"

ProblemType: Bug
Architecture: amd64
Dependencies:

DistroRelease: Ubuntu 9.04
NonfreeKernelModules: nvidia
Package: libagg-dev 2.5+dfsg1-1ubuntu1 [modified: usr/include/agg2/agg_rasterizer_cells_aa.h]
ProcEnviron:
 PATH=(custom, user)
 LANG=fi_FI.UTF-8
 SHELL=/bin/bash
SourcePackage: agg
Uname: Linux 2.6.28-12-generic x86_64

Related branches

Revision history for this message
Artur Rona (ari-tczew) wrote :

I've tested this one on ppa for jaunty and it built fine.
https://launchpad.net/~ari-tczew/+archive/testing/+build/1361606
so what's the problem?

Changed in agg (Ubuntu):
status: New → Incomplete
Revision history for this message
Lasse Kärkkäinen (tronic+mb48) wrote :

I guess you are testing it wrong. Perhaps you are only compiling the library, not using it?

$ cat > test.cc
#include <agg2/agg_rasterizer_cells_aa.h>

int main() {}

$ g++ test.c
In file included from test.cc:1:
/usr/include/agg2/agg_rasterizer_cells_aa.h: In member function ‘void agg::rasterizer_cells_aa<Cell>::line(int, int, int, int)’:
/usr/include/agg2/agg_rasterizer_cells_aa.h:338: error: there are no arguments to ‘abs’ that depend on a template parameter, so a declaration of ‘abs’ must be available
/usr/include/agg2/agg_rasterizer_cells_aa.h:338: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/include/agg2/agg_rasterizer_cells_aa.h:338: error: ‘INT_MAX’ was not declared in this scope
/usr/include/agg2/agg_rasterizer_cells_aa.h:338: error: there are no arguments to ‘abs’ that depend on a template parameter, so a declaration of ‘abs’ must be available
/usr/include/agg2/agg_rasterizer_cells_aa.h:339: error: there are no arguments to ‘abs’ that depend on a template parameter, so a declaration of ‘abs’ must be available
/usr/include/agg2/agg_rasterizer_cells_aa.h:339: error: there are no arguments to ‘abs’ that depend on a template parameter, so a declaration of ‘abs’ must be available

Revision history for this message
Artur Rona (ari-tczew) wrote :

Because it's not needed by Ubuntu's policy, but I can make fixed package for you. Just you should help me in test after I did patched package, OK?

Revision history for this message
Lasse Kärkkäinen (tronic+mb48) wrote :

Just add the missing includes. It is clearly a bug that they aren't there. I have no interest on testing this library and even less interest to run in circles with you trying to convince you that the patch in the first message is actually needed.

I do not use the library (anymore) and I am quite sure that there are other bugs in the library too.

The patch itself, of course, should go upstream as far as it can (to Debian or to library developers).

Changed in agg (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
springmeyer (springmeyer) wrote :

ping on this. this is a bug introduced by a patch applied to the debian package to fix a difference bug.

It was this patch (that is needed to fix a recursion bug) http://patch-tracker.debian.org/patch/series/view/agg/2.5+dfsg1-3/05_fix_recursion_crash.dpatch which causes the compiler errors.

This is a proposed change:

http://trac.mapnik.org/changeset/1801/trunk/agg/include/agg_rasterizer_cells_aa.h

Note: same bug for debian package is here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575620

Changed in agg (Debian):
status: Unknown → New
Revision history for this message
Stefano Rivera (stefanor) wrote :

Artur: Please pass debian the correct patch, rather than just a LP Link

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package agg - 2.5+dfsg1-3ubuntu1

---------------
agg (2.5+dfsg1-3ubuntu1) maverick; urgency=low

  * debian/patches/06_fix_missing_includes.dpatch: Fix missing
    includes causes compilation problem. (LP: #393923, Closes: #575620)
  * debian/patches/05_fix_recursion_crash.dpatch: Update patch,
    it's necessary to fix compilation problem.
 -- Artur Rona <email address hidden> Mon, 23 Aug 2010 13:09:57 +0200

Changed in agg (Ubuntu):
status: Confirmed → Fix Released
Changed in libagg:
status: Unknown → Fix Released
Revision history for this message
Stefano Rivera (stefanor) wrote :

Uploaded to lucid-proposed, pending approval

Changed in agg (Ubuntu Lucid):
status: New → Fix Committed
Changed in agg (Ubuntu Karmic):
status: New → Won't Fix
Changed in agg (Ubuntu Jaunty):
status: New → Won't Fix
Changed in agg (Ubuntu Jaunty):
status: Won't Fix → New
Changed in agg (Ubuntu Karmic):
status: Won't Fix → New
Changed in agg (Ubuntu Karmic):
status: New → Fix Committed
Changed in agg (Ubuntu Jaunty):
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted agg into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Given that Jaunty has survived for 1 year and 4 months with this, and will go EOL in 2 months, is it really necessary to SRU it there? If it's really that urgent, please supply an SRU rationale for Jaunty/karmic. Thank you!

Revision history for this message
Artur Rona (ari-tczew) wrote :

I think that arguments for upload patches is fact, that someone is waiting for resolve the problem. Even gave the patch! This upload shouldn't broke nothing important. I tested all packages and it works fine.

Revision history for this message
Martin Pitt (pitti) wrote :

> I think that arguments for upload patches is fact, that someone is waiting for resolve the problem.

.. on jaunty?

> This upload shouldn't broke nothing important.

It mustn't break anything at all, I'm afraid. So if the current jaunty/karmic version does not work at all, then SRUing is safe. But if only some use cases are broken, there is a regression potential, and the bar is much higher. This one looks like it has a trivial workaround, and isn't completely broken. On old releases (jaunty, karmic) we get very little testing, so catching regressions is very hard. That's why we stick very closely to the SRU rules for the older releases.

Revision history for this message
Artur Rona (ari-tczew) wrote :

Problem is exist, when someone wants to build code using libagg-dev. There are misses includes, which I'd patch it. Well, how can I say more? Patch are works fine for me and IMHO shouldn't be system problems.

Revision history for this message
Martin Pitt (pitti) wrote :

Right, but the problem has an easy workaround (including stdlib.h, which probably happens for half of the software out there anyway). But the actual bug report is quite clear, that's not what I asked. Right now it appears to be a very small benefit of fixing this in old releases (which few, if any developers still use).

An SRU should have potential regression information like:

 * The source package only builds a -dev package. There are no runtime programs which could potentially regress.
 * There are no shared libraries, so there is no potential for ABI breakage.
 * I verified that a reverse dependency of agg (e. g. gnash) is still building and working fine against the updated agg package.

I now checked the first two points myself (but that's usually the responsibility of the SRU proposer), which makes this a very low-probability regression issue. I didn't check the third one myself; but it can happen as part of the verification process.

So, I'm willing to accept the karmic package, if for nothing else than not having to argue against it any more (it's low-benefit/low-risk, so it doesn't hurt).

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted agg into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Artur Rona (ari-tczew) wrote :

All packages fixes bug report.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU verification for Karmic:
I have reproduced the problem with agg 2.5+dfsg1-1ubuntu1 in karmic and have verified that the version of agg 2.5+dfsg1-1ubuntu1.9.10.1 in -proposed fixes the issue. I verified that the only package depending on it (mapnik0.6) still builds.

Marking as verification-done

tags: added: verification-done
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I'm closing the jaunty task due to the comments above.

Changed in agg (Ubuntu Jaunty):
status: Fix Committed → Won't Fix
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU verification for Lucid:
I have reproduced the problem with agg 2.5+dfsg1-3 in lucid and have verified that the version of agg 2.5+dfsg1-3ubuntu0.1 in -proposed fixes the issue.

Marking as verification-done

tags: removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package agg - 2.5+dfsg1-3ubuntu0.1

---------------
agg (2.5+dfsg1-3ubuntu0.1) lucid-proposed; urgency=low

  * debian/patches/06_fix_missing_includes.dpatch: Fix missing
    includes causes compilation problem. (LP: #393923, Closes: #575620)
  * debian/patches/05_fix_recursion_crash.dpatch: Update patch,
    it's necessary to fix compilation problem.
 -- Artur Rona <email address hidden> Mon, 23 Aug 2010 21:30:09 +0200

Changed in agg (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package agg - 2.5+dfsg1-1ubuntu1.9.10.1

---------------
agg (2.5+dfsg1-1ubuntu1.9.10.1) karmic-proposed; urgency=low

  * debian/patches/07_fix_missing_includes.dpatch: Fix missing
    includes causes compilation problem. (LP: #393923, Closes: #575620)
  * debian/patches/06_fix_recursion_crash.dpatch: Update patch,
    it's necessary to fix compilation problem.
 -- Artur Rona <email address hidden> Mon, 23 Aug 2010 23:59:59 +0200

Changed in agg (Ubuntu Karmic):
status: Fix Committed → Fix Released
Changed in agg (Debian):
status: New → Fix Released
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.