Bug 126275 - ipprequest.cpp:521: error: `_ipp_free_attr' undeclared (first use this function)
Summary: ipprequest.cpp:521: error: `_ipp_free_attr' undeclared (first use this function)
Status: CLOSED DUPLICATE of bug 124157
Alias: None
Product: kdeprint
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KDEPrint Devel Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-26 09:19 UTC by Matthew Carson
Modified: 2008-12-31 20:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Carson 2006-04-26 09:19:32 UTC
Version:           3.5.2 (using KDE KDE 3.5.2)
Installed from:    Compiled From Sources
Compiler:          gcc 4.0.2 
OS:                Linux

Im running on AMD64, with GCC-4.0.2

build commands :
./configure --prefix=/opt/kde \
  --sysconfdir=/etc/kde \
  --disable-debug --disable-dependency-tracking \
  --enable-final
make


I get this when I try to compile kdelibs:

ipprequest.cpp: In member function `void IppRequest::setMap(const QMap<QString, QString>&)':
ipprequest.cpp:521: error: `_ipp_free_attr' undeclared (first use this function)
ipprequest.cpp:521: error: (Each undeclared identifier is reported only once for each function it appears in.)
make[4]: *** [ipprequest.lo] Error 1
make[4]: Leaving directory `kdelibs-3.5.2/kdeprint/cups'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `kdelibs-3.5.2/kdeprint/cups'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `kdelibs-3.5.2/kdeprint'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `kdelibs-3.5.2'
make: *** [all] Error 2

Pls help ! Thx

But I might d/l kdelibs from cvs and try it at home !
Comment 1 Michael Goffioul 2006-04-26 09:51:12 UTC
Apparently, the patch was reversed in 3.5 branch because it doesn't work with older version of CUPS. I guess that some #ifdef would solve it.

*** This bug has been marked as a duplicate of 124157 ***
Comment 2 Matthew Carson 2006-04-26 10:06:05 UTC
Great, but Im not a C developer tho ! :@(

is there a simple patch I could use - how do I fix this pls ?




Michael Goffioul wrote:
[bugs.kde.org quoted mail]
Comment 3 Matthew Carson 2006-04-27 09:26:03 UTC
> > is there a simple patch I could use - how do I fix this pls ?
Yes. Look below. This is also commited to the 3.5 SVN branch right now.

Index: ipprequest.cpp
===================================================================
--- ipprequest.cpp      (revision 534402)
+++ ipprequest.cpp      (working copy)
@@ -511,7 +511,11 @@
        cupsFreeOptions(n, options);

        // find an remove that annoying "document-format" attribute
-       // (can't use IppDeleteAttribute as cups 1.0.9 doesn't have that)
+#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2
+    ipp_attribute_t *attr = ippFindAttribute(request_, "document-format",
IPP_TAG_NAME);
+    ippDeleteAttribute(request_, attr);
+#else
+       // (can't use IppDeleteAttribute as older cups doesn't have that)
        ipp_attribute_t *attr = request_->attrs;
        while (attr)
        {
@@ -524,4 +528,5 @@
                }
                attr = attr->next;
        }
+#endif
 } 
Comment 4 Matthew Carson 2006-04-27 09:30:27 UTC
*** *** *** *** *** *** *** ***
with special thanks to : 
Cristian Tibirna, KDE developer
*** *** *** *** *** *** *** ***
Comment 5 John Layt 2008-12-31 20:00:04 UTC
Closing old Resolved status bug.