LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 856|回复: 6

已解决:Kdelibs-3.5.10 ftp部分出错

[复制链接]
发表于 2009-10-22 10:44:32 | 显示全部楼层 |阅读模式
说明书:Beyond Linux® From Scratch Version svn-20091010

8. General Libraries
9. Graphics and Font Libraries
14. Networking Libraries
按照说明书几乎全部顺利编完。并做成脚本

23. X Window System Environment
24. X Libraries
也顺利进行完毕。

Kdelibs-3.5.10 出错

make[3]: Entering directory `/srv/kde/kdelibs-3.5.10/kioslave/ftp'
/bin/sh ../../libtool --silent --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I../../dcop -I../../kdecore -I../../kio/kssl -I../../kjs -I../../dcop -I../../libltdl -I../../kdefx -I../../kdecore -I../../kdecore -I../../kdecore/network -I../../kdeui -I../../kio -I../../kio/kio -I../../kio/kfile -I../.. -I/opt/qt/include -I. -I/usr/include   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common  -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -c -o ftp.lo ftp.cc
In file included from ftp.cc:58:
../../kio/kio/kmimemagic.h:156: warning: 'KMimeMagicResult' is deprecated (declared at ../../kio/kio/kmimemagic.h:47)
../../kio/kio/kmimemagic.h:170: warning: 'KMimeMagicResult' is deprecated (declared at ../../kio/kio/kmimemagic.h:47)
../../kio/kio/kmimemagic.h:186: warning: 'KMimeMagicResult' is deprecated (declared at ../../kio/kio/kmimemagic.h:47)
../../kio/kio/kmimemagic.h:191: warning: 'KMimeMagic' is deprecated (declared at ../../kio/kio/kmimemagic.h:102)
../../kio/kio/kmimemagic.h:197: warning: 'KMimeMagicResult' is deprecated (declared at ../../kio/kio/kmimemagic.h:47)
../../kio/kio/kmimemagic.h:200: warning: 'KMimeMagic' is deprecated (declared at ../../kio/kio/kmimemagic.h:102)
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)
make[3]: *** [ftp.lo] Error 1
make[3]: Leaving directory `/srv/kde/kdelibs-3.5.10/kioslave/ftp'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/srv/kde/kdelibs-3.5.10/kioslave'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/srv/kde/kdelibs-3.5.10'
make: *** [all] Error 2

幸亏做了脚本。今天上午在lfs6.5的基础上重新进行上面的步骤还是如此。
请各位高手帮帮忙。
 楼主| 发表于 2009-10-22 11:08:59 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-10-22 11:41:48 | 显示全部楼层
通过了!
Upstream URL: https://bugs.kde.org/show_bug.cgi?id=193242
Signed off by: Elan Ruusamäe <glen@delfi.ee>
--- kdelibs-3.5.10/kioslave/ftp/ftp.cc~        2009-05-19 14:57:21.000000000 +0300
+++ kdelibs-3.5.10/kioslave/ftp/ftp.cc        2009-05-19 14:57:24.016475767 +0300
@@ -876,5 +876,5 @@
   // The usual answer is '227 Entering Passive Mode. (160,39,200,55,6,245)'
   // but anonftpd gives '227 =160,39,200,55,6,245'
   int i[6];
-  char *start = strchr(ftpResponse(3), '(');
+  const char *start = strchr(ftpResponse(3), '(');
   if ( !start )
@@ -931,7 +931,7 @@
     return ERR_INTERNAL;
   }

-  char *start = strchr(ftpResponse(3), '|');
+  const char *start = strchr(ftpResponse(3), '|');
   if ( !start || sscanf(start, "|||%d|", &portnum) != 1)
     return ERR_INTERNAL;


修改了两处,加const
回复 支持 反对

使用道具 举报

发表于 2009-10-22 12:52:16 | 显示全部楼层
不要高庆太早,用 gcc-4.4.x 编译 kde-3.5.10,接下来的 kdebase 也需要打补丁,如果要装 kdegraphics,要用 gentoo 提供的 eof 补丁,但这是 BLFS 手册没有提及的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-10-22 15:28:56 | 显示全部楼层
Post by d00m3d;2038923
接下来的 kdebase 也需要打补丁


make[3]: Entering directory `/srv/kde/kdebase-3.5.10/kcontrol/kfontinst/kfontinst'
g++ -DHAVE_CONFIG_H -I. -I../../..  -DOS_Linux -I./../lib -I./../../fonts -I/opt/qt/include -I.  -I/usr/include/freetype2  -DQT_THREAD_SUPPORT  -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES=1  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -D_GNU_SOURCE  -c -o Fontmap.o Fontmap.cpp
Fontmap.cpp: In function 'bool parseLine(const char*, QString&, QString&, bool&)':
Fontmap.cpp:68: error: invalid conversion from 'const char*' to 'char*'
Fontmap.cpp: In function 'void addEntry(QStringList&, const QString&, const QString&, const QString&)':
Fontmap.cpp:199: warning: suggest explicit braces to avoid ambiguous 'else'
Fontmap.cpp: In function 'QString locateFile(const char*, const char*, int)':
Fontmap.cpp:256: warning: suggest explicit braces to avoid ambiguous 'else'
make[3]: *** [Fontmap.o] Error 1
make[3]: Leaving directory `/srv/kde/kdebase-3.5.10/kcontrol/kfontinst/kfontinst'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/srv/kde/kdebase-3.5.10/kcontrol/kfontinst'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/srv/kde/kdebase-3.5.10/kcontrol'
make: *** [install-recursive] Error 1

把const 去掉?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-10-22 16:04:40 | 显示全部楼层
http://cvs.pld-linux.org/cgi-bin ... kdebase-gcc44.patch
解决问题。
--- kdebase-3.5.10/kcontrol/kfontinst/kfontinst/Fontmap.cpp        2009-05-20 13:06:00.477670083 +0300
+++ kdebase-3.5.10/kcontrol/kfontinst/kfontinst/Fontmap.cpp        2009-05-20 15:09:44.061136748 +0300
@@ -44,7 +44,7 @@

using namespace std;

-static char * findSpace(char *str)
+static const char * findSpace(const char *str)
{
     while(str && *str!=' ' && *str!='\t')
         str++;
@@ -65,7 +65,7 @@
     char a[constMaxLen+1],
          b[constFileMaxLen+1];

-    char *slash1=strchr(line, '/'),
+    const char *slash1=strchr(line, '/'),
          *space1=slash1 ? findSpace(slash1) : NULL, //strchr(slash1, ' ') : NULL,
          *ob=slash1 ? strchr(slash1, '(') : NULL,
          *cb=ob ? strchr(ob, ')') : NULL,
回复 支持 反对

使用道具 举报

发表于 2009-10-22 19:37:36 | 显示全部楼层
可能是官方已不维护的关系,kde-3.5.10 变得很有性格,不单对 gcc-4.4.x 有障碍,就连 automake 及 autoconf 也有要求

前两天我尝试用重新编译 kde-3.5.10 (我暂时无意采用 4.x),系统里用 automake-1.11 及 autoconf-2.63 在 configure 的时候居然报错,就算建立 symlink 来欺骗系统,最终编译还是会失败,结果要把 automake 及 autoconf 降级才行,非要 automake-1.10 及 autoconf-2.61 不行,郁闷得很。。。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表