Terry and I are trying to get Sword and GnomeSword to do the right things under Fedora9, which has gcc 4.3. Sword itself in SVN 1.5.11 is causing grief in a couple of ways. Attached is a patch that adds a couple of needed #includes and also aggressively deals with some sort of ICU detection glitch which I don't fully understand, but considering that ICU is now in the 3.8 and later stages, it seems odd still to be testing for pre-3.0 versions. A better test could be constructed for pre-3.0 if it's really needed, of course; my concern right now is that it simply doesn't work in vanilla F9.
Once these patches are applied, there are still a lot of warnings from gcc because 4.3 has gotten substantially picker than previous versions. The 2nd attachment here is the portion of an otherwise clean build log, showing those files about which gcc complains -- mostly implicit type conversions but also some suspect || && usage. I have not analyzed any of these any farther than to note their existence. Troy, I don't know if it's too late for the ISO, but getting these things taken care of now may save a lot of pain later. --karl
Index: tests/testblocks.cpp =================================================================== --- tests/testblocks.cpp (revision 2166) +++ tests/testblocks.cpp (working copy) @@ -2,6 +2,7 @@ #include <iostream> #include <string> #include <stdio.h> +#include <stdlib.h> using namespace std; #ifndef NO_SWORD_NAMESPACE Index: tests/icutest.cpp =================================================================== --- tests/icutest.cpp (revision 2166) +++ tests/icutest.cpp (working copy) @@ -1,5 +1,7 @@ #include <iostream> #include <string> +#include <malloc.h> +#include <string.h> #include "unicode/utypes.h" /* Basic ICU data types */ #include "unicode/ucnv.h" /* C Converter API */ Index: configure.ac =================================================================== --- configure.ac (revision 2166) +++ configure.ac (working copy) @@ -159,7 +159,8 @@ else ICU_VER=`$ICU_CONFIG --version` ICU_LIBS=`$ICU_CONFIG --ldflags` - ICU_IOLIBS=`if test $(echo "$ICU_VER >= 3.0"|bc) -eq 1; then $ICU_CONFIG --ldflags-icuio; else $ICU_CONFIG --ldflags-ustdio; fi;` + #ICU_IOLIBS=`if test $(echo "$ICU_VER >= 3.0"|bc) -eq 1; then $ICU_CONFIG --ldflags-icuio; else $ICU_CONFIG --ldflags-ustdio; fi;` + ICU_IOLIBS=`$ICU_CONFIG --ldflags-icuio` fi AM_CXXFLAGS="$AM_CXXFLAGS -D_ICU_" AM_CFLAGS="$AM_CFLAGS -D_ICU_"
g++ -DHAVE_CONFIG_H -I. -I../include -I../include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.5.11_icu_3.8.1\" -D_FTPLIB_NO_COMPAT -D_ICU_ -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT versekey.lo -MD -MP -MF .deps/versekey.Tpo -c ../src/keys/versekey.cpp -o versekey.o ../src/keys/versekey.cpp:1551: warning: deprecated conversion from string constant to 'char*' [57 times?] ../src/keys/versekey.cpp:1555: warning: deprecated conversion from string constant to 'char*' [27 times?] g++ -DHAVE_CONFIG_H -I. -I../include -I../include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.5.11_icu_3.8.1\" -D_FTPLIB_NO_COMPAT -D_ICU_ -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT swbuf.lo -MD -MP -MF .deps/swbuf.Tpo -c ../src/utilfuns/swbuf.cpp -o swbuf.o ../src/utilfuns/swbuf.cpp:30: warning: deprecated conversion from string constant to 'char*' g++ -DHAVE_CONFIG_H -I. -I../include -I../include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.5.11_icu_3.8.1\" -D_FTPLIB_NO_COMPAT -D_ICU_ -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT swmgr.lo -MD -MP -MF .deps/swmgr.Tpo -c ../src/mgr/swmgr.cpp -o swmgr.o ../src/mgr/swmgr.cpp: In constructor 'sword::SWMgr::SWMgr(const char*, bool, sword::SWFilterMgr*, bool, bool)': ../src/mgr/swmgr.cpp:297: warning: suggest parentheses around && within || g++ -DHAVE_CONFIG_H -I. -I../include -I../include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.5.11_icu_3.8.1\" -D_FTPLIB_NO_COMPAT -D_ICU_ -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT swmodule.lo -MD -MP -MF .deps/swmodule.Tpo -c ../src/modules/swmodule.cpp -o swmodule.o ../src/modules/swmodule.cpp: In member function 'virtual const char* sword::SWModule::RenderText(const char*, int, bool)': ../src/modules/swmodule.cpp:783: warning: deprecated conversion from string constant to 'char*' g++ -DHAVE_CONFIG_H -I. -I../include -I../include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.5.11_icu_3.8.1\" -D_FTPLIB_NO_COMPAT -D_ICU_ -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT entriesblk.lo -MD -MP -MF .deps/entriesblk.Tpo -c ../src/modules/common/entriesblk.cpp -o entriesblk.o ../src/modules/common/entriesblk.cpp: In member function 'const char* sword::EntriesBlock::getEntry(int)': ../src/modules/common/entriesblk.cpp:128: warning: deprecated conversion from string constant to 'char*' g++ -DHAVE_CONFIG_H -I. -I../include -I../include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.5.11_icu_3.8.1\" -D_FTPLIB_NO_COMPAT -D_ICU_ -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT swbasicfilter.lo -MD -MP -MF .deps/swbasicfilter.Tpo -c ../src/modules/filters/swbasicfilter.cpp -o swbasicfilter.o ../src/modules/filters/swbasicfilter.cpp: In member function 'virtual char sword::SWBasicFilter::processText(sword::SWBuf&, const sword::SWKey*, const sword::SWModule*)': ../src/modules/filters/swbasicfilter.cpp:315: warning: array subscript has type 'char' ../src/modules/filters/swbasicfilter.cpp:328: warning: array subscript has type 'char' ../src/modules/filters/swbasicfilter.cpp:342: warning: array subscript has type 'char' ../src/modules/filters/swbasicfilter.cpp:360: warning: array subscript has type 'char' g++ -DHAVE_CONFIG_H -I. -I../include -I../include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.5.11_icu_3.8.1\" -D_FTPLIB_NO_COMPAT -D_ICU_ -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT swoptfilter.lo -MD -MP -MF .deps/swoptfilter.Tpo -c ../src/modules/filters/swoptfilter.cpp -o swoptfilter.o ../src/modules/filters/swoptfilter.cpp: In constructor 'sword::SWOptionFilter::SWOptionFilter()': ../src/modules/filters/swoptfilter.cpp:15: warning: deprecated conversion from string constant to 'char*' g++ -DHAVE_CONFIG_H -I. -I../include -I../include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.5.11_icu_3.8.1\" -D_FTPLIB_NO_COMPAT -D_ICU_ -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT utf16utf8.lo -MD -MP -MF .deps/utf16utf8.Tpo -c ../src/modules/filters/utf16utf8.cpp -o utf16utf8.o ../src/modules/filters/utf16utf8.cpp: In member function 'virtual char sword::UTF16UTF8::processText(sword::SWBuf&, const sword::SWKey*, const sword::SWModule*)': ../src/modules/filters/utf16utf8.cpp:73: warning: suggest parentheses around arithmetic in operand of | ../src/modules/filters/utf16utf8.cpp:74: warning: suggest parentheses around arithmetic in operand of | ../src/modules/filters/utf16utf8.cpp:78: warning: suggest parentheses around arithmetic in operand of | ../src/modules/filters/utf16utf8.cpp:79: warning: suggest parentheses around arithmetic in operand of | ../src/modules/filters/utf16utf8.cpp:80: warning: suggest parentheses around arithmetic in operand of | g++ -DHAVE_CONFIG_H -I. -I../include -I../include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.5.11_icu_3.8.1\" -D_FTPLIB_NO_COMPAT -D_ICU_ -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT scsuutf8.lo -MD -MP -MF .deps/scsuutf8.Tpo -c ../src/modules/filters/scsuutf8.cpp -o scsuutf8.o ../src/modules/filters/scsuutf8.cpp: In member function 'unsigned char* sword::SCSUUTF8::UTF8Output(long unsigned int, unsigned char*)': ../src/modules/filters/scsuutf8.cpp:47: warning: suggest parentheses around arithmetic in operand of | ../src/modules/filters/scsuutf8.cpp:51: warning: suggest parentheses around arithmetic in operand of | ../src/modules/filters/scsuutf8.cpp:52: warning: suggest parentheses around arithmetic in operand of | ../src/modules/filters/scsuutf8.cpp:56: warning: suggest parentheses around arithmetic in operand of | ../src/modules/filters/scsuutf8.cpp:57: warning: suggest parentheses around arithmetic in operand of | ../src/modules/filters/scsuutf8.cpp:58: warning: suggest parentheses around arithmetic in operand of | g++ -DHAVE_CONFIG_H -I. -I../include -I../include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.5.11_icu_3.8.1\" -D_FTPLIB_NO_COMPAT -D_ICU_ -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT utf8greekaccents.lo -MD -MP -MF .deps/utf8greekaccents.Tpo -c ../src/modules/filters/utf8greekaccents.cpp -o utf8greekaccents.o ../src/modules/filters/utf8greekaccents.cpp: In member function 'virtual char sword::UTF8GreekAccents::processText(sword::SWBuf&, const sword::SWKey*, const sword::SWModule*)': ../src/modules/filters/utf8greekaccents.cpp:149: warning: suggest parentheses around && within || ../src/modules/filters/utf8greekaccents.cpp:173: warning: suggest parentheses around && within || ../src/modules/filters/utf8greekaccents.cpp:198: warning: suggest parentheses around && within || g++ -DHAVE_CONFIG_H -I. -I../include -I../include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.5.11_icu_3.8.1\" -D_FTPLIB_NO_COMPAT -D_ICU_ -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT swgenbook.lo -MD -MP -MF .deps/swgenbook.Tpo -c ../src/modules/genbook/swgenbook.cpp -o swgenbook.o ../src/modules/genbook/swgenbook.cpp: In constructor 'sword::SWGenBook::SWGenBook(const char*, const char*, sword::SWDisplay*, char, char, char, const char*)': ../src/modules/genbook/swgenbook.cpp:18: warning: deprecated conversion from string constant to 'char*' g++ -DHAVE_CONFIG_H -I. -I../include -I../include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.5.11_icu_3.8.1\" -D_FTPLIB_NO_COMPAT -D_ICU_ -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT swtext.lo -MD -MP -MF .deps/swtext.Tpo -c ../src/modules/texts/swtext.cpp -o swtext.o ../src/modules/texts/swtext.cpp: In constructor 'sword::SWText::SWText(const char*, const char*, sword::SWDisplay*, char, char, char, const char*)': ../src/modules/texts/swtext.cpp:20: warning: deprecated conversion from string constant to 'char*' g++ -DHAVE_CONFIG_H -I. -I../include -I../include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.5.11_icu_3.8.1\" -D_FTPLIB_NO_COMPAT -D_ICU_ -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT swcom.lo -MD -MP -MF .deps/swcom.Tpo -c ../src/modules/comments/swcom.cpp -o swcom.o ../src/modules/comments/swcom.cpp: In constructor 'sword::SWCom::SWCom(const char*, const char*, sword::SWDisplay*, char, char, char, const char*)': ../src/modules/comments/swcom.cpp:20: warning: deprecated conversion from string constant to 'char*' g++ -DHAVE_CONFIG_H -I. -I../include -I../include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.5.11_icu_3.8.1\" -D_FTPLIB_NO_COMPAT -D_ICU_ -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT swld.lo -MD -MP -MF .deps/swld.Tpo -c ../src/modules/lexdict/swld.cpp -o swld.o ../src/modules/lexdict/swld.cpp: In constructor 'sword::SWLD::SWLD(const char*, const char*, sword::SWDisplay*, char, char, char, const char*)': ../src/modules/lexdict/swld.cpp:19: warning: deprecated conversion from string constant to 'char*' g++ -DHAVE_CONFIG_H -I. -I../include -I ../include -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT swbuftest.o -MD -MP -MF .deps/swbuftest.Tpo -c -o swbuftest.o swbuftest.cpp swbuftest.cpp: In function 'void compareTest()': swbuftest.cpp:89: warning: suggest explicit braces to avoid ambiguous 'else' g++ -DHAVE_CONFIG_H -I. -I../include -I ../include -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT icutest.o -MD -MP -MF .deps/icutest.Tpo -c -o icutest.o icutest.cpp icutest.cpp: In function 'int main()': icutest.cpp:22: warning: deprecated conversion from string constant to 'char*' g++ -DHAVE_CONFIG_H -I. -I../include -I ../include -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT translittest.o -MD -MP -MF .deps/translittest.Tpo -c -o translittest.o translittest.cpp translittest.cpp: In function 'int main()': translittest.cpp:51: warning: deprecated conversion from string constant to 'char*' g++ -DHAVE_CONFIG_H -I. -I../include -I ../include -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT osis2mod.o -MD -MP -MF .deps/osis2mod.Tpo -c -o osis2mod.o osis2mod.cpp osis2mod.cpp:69: warning: deprecated conversion from string constant to 'char*' [66 times?] g++ -DHAVE_CONFIG_H -I. -I../include -I ../include -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT xml2gbs.o -MD -MP -MF .deps/xml2gbs.Tpo -c -o xml2gbs.o xml2gbs.cpp xml2gbs.cpp: In function 'int processXML(const char*, char*, bool, bool, unsigned char)': xml2gbs.cpp:115: warning: suggest parentheses around && within || xml2gbs.cpp:145: warning: suggest parentheses around && within || g++ -DHAVE_CONFIG_H -I. -I../include -I ../include -DUSBINARY -g3 -O0 -Wall -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT cipherraw.o -MD -MP -MF .deps/cipherraw.Tpo -c -o cipherraw.o cipherraw.cpp cipherraw.cpp: In function 'int main(int, char**)': cipherraw.cpp:35: warning: format '%ld' expects type 'long int', but argument 2 has type 'unsigned int' cipherraw.cpp:35: warning: format '%ld' expects type 'long int', but argument 3 has type 'unsigned int'
_______________________________________________ sword-devel mailing list: sword-devel@crosswire.org http://www.crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page