Bug 193242 - kdelibs build failure with gcc 4.4
Summary: kdelibs build failure with gcc 4.4
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Unclassified
Component: ftp (show other bugs)
Version: 3.5
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-19 14:33 UTC by Elan Ruusamäe
Modified: 2009-05-30 02:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elan Ruusamäe 2009-05-19 14:33:12 UTC
Version:           3.5.10 (using 3.5.10, PLD Linux Distribution)
Compiler:          Target: x86_64-pld-linux
OS:                Linux (x86_64) release 2.6.28.9-1

kdelibs (at least r958029) fails with:

ftp.cc: In member function 'int Ftp::ftpOpenPASVDataConnection()':
ftp.cc:879: error: invalid conversion from 'const char*' to 'char*'
ftp.cc:881: error: invalid conversion from 'const char*' to 'char*'
ftp.cc: In member function 'int Ftp::ftpOpenEPSVDataConnection()':
ftp.cc:934: error: invalid conversion from 'const char*' to 'char*'
ftp.cc: In member function 'Ftp::StatusCode Ftp::ftpGet(int&, int, const KURL&, KIO::fileoffset_t)':
ftp.cc:2084: warning: 'KMimeMagicResult' is deprecated (declared at ../../kio/kio/kmimemagic.h:47)
ftp.cc: In member function 'Ftp::StatusCode Ftp::ftpPut(int&, int, const KURL&, int, bool, bool)':
ftp.cc:2339: warning: comparison between signed and unsigned integer expressions
make[3]: *** [ftp.lo] Error 1
make[3]: Leaving directory `/home/users/builder/rpm/BUILD/kdelibs-3.5.10/kioslave/ftp'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/users/builder/rpm/BUILD/kdelibs-3.5.10/kioslave'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/users/builder/rpm/BUILD/kdelibs-3.5.10'
make: *** [all] Error 2
error: Bad exit status from /tmp/B.8c7583/rpm-tmp.919 (%build)

and here is proposed fix:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kdelibs/kdelibs-gcc44.patch

it's due in c++  strchr returns (const char*) of passed (const char*) and returns char* if passed char*, so it seems ftpResponse returns const char*.
Comment 1 Elan Ruusamäe 2009-05-20 16:56:57 UTC
here's another one, this is patch against kdebase:

http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kdebase/kdebase-gcc44.patch
Comment 2 Eric Sandall 2009-05-30 02:13:46 UTC
The above patches fix kdelibs and kdebase compiling with GCC 4.4.0 for me.
Comment 3 David Faure 2009-05-30 02:34:28 UTC
These fixes are already applied in the KDE-4.x source code.

Note that KDE-3.x is not maintained anymore, there won't be any more releases of it. But oh well. I'll apply them if that makes you happy ;-)
Comment 4 David Faure 2009-05-30 02:34:36 UTC
SVN commit 975372 by dfaure:

apply gcc-4.4 compilation fix from http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kdebase/kdebase-gcc44.patch.
kdelibs patch was applied in r975371.
BUG: 193242


 M  +2 -2      Fontmap.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=975372