Hi,
Am Mittwoch 31 März 2010 23:39:51 schrieb Baho Utot:
> ...
> gcc-4.4.1 Kdebase fails with the following error:
>
> g++ -DHAVE_CONFIG_H -I. -I../../.. -DOS_Linux -I./../lib
> -I./../../fonts -I/usr/share/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 XConfig.o XConfig.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[5]: *** [Fontmap.o] Error 1
>
> Anyone know of a fix?
You may want to test attached patch I use for that problem...
--
Thomas
--- kdebase/kcontrol/kfontinst/kfontinst/Fontmap.cpp 2005/12/02 23:52:28 485133
+++ kdebase/kcontrol/kfontinst/kfontinst/Fontmap.cpp 2009/05/30 00:34:35 975372
@@ -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,
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page