[sword-devel] Problem building last CVS snapshot of Sword with GCC 3.0

Luke Mauldin sword-devel@crosswire.org
Fri, 22 Jun 2001 21:20:39 -0500


I did not go and try doing make clean and then make in the src/utilfuns 
directory but when I did try that it did fix the problem with the unresolved 
symbols.  As I was compiling the rest of the code I found that in all of the 
files that included <string> and that using the string type, using namespace 
std had to be added at the top of the file.  Either that or std::string had 
to be using instead of just string .  The files that had to be modified like 
that were step2vpl.cpp and stepdump.cpp .  With those modifications sword now 
compiles fine with gcc 3.0.

Luke



> I see in your output the stdstr missing reference, like before, so
> you're telling me that you went into src/utilfuns, and did a make clean,
> then a make, and it didn't add it to the library?  That's odd.  Does it
> look like it added it from the output of make?  This is at the end of my
> output from the make when in the src/utilfuns directory:
>
> ar crs ../../lib/libsword.a utilstr.o roman.o Greek2Greek.o utilstr.o
> unixstr.o swunicod.o
> [troy@charis utilfuns]$
>
>
> Do you have something different?
>
>
> 	-Troy.
>
> Luke Mauldin wrote:
> > The first problem I ran into was:
> >  gcc -I../../../include/ -D_GNU_SOURCE -D_GNU_SOURCE -pipe -Wall
> > -Wno-format -pedantic -pedantic  -fomit-frame-pointer -ggdb -O2
> > -DUSBINARY -march=athlon -mcpu=athlon -c -o gbfrtf.o gbfrtf.cpp
> > gbfrtf.cpp: In member function `virtual char GBFRTF::ProcessText(char*,
> > int, const SWKey*)':
> > gbfrtf.cpp:79: `isdigit' undeclared (first use this function)
> > gbfrtf.cpp:79: (Each undeclared identifier is reported only once for each
> >    function it appears in.)
> > make[3]: *** [gbfrtf.o] Error 1
> > make[3]: Leaving directory
> > `/home/luke/bibletime/sword/src/modules/filters' make[2]: ***
> > [filters/targets] Error 2
> > make[2]: Leaving directory `/home/luke/bibletime/sword/src/modules'
> > make[1]: *** [modules/targets] Error 2
> > make[1]: Leaving directory `/home/luke/bibletime/sword/src'
> > make: *** [src/targets] Error 2
> >
> > I corrected this problem by adding #include <ctype.h> at the top of
> > gbfrtf.cpp .
> >
> > The next problem I had was the same error message I recieved before:
> >
> > make[1]: Entering directory `/home/luke/bibletime/sword/tests'
> > gcc -I../include/ -D_GNU_SOURCE -D_GNU_SOURCE -pipe -Wall -Wno-format
> > -pedantic -pedantic  -fomit-frame-pointer -ggdb -O2 -DUSBINARY
> > -march=athlon -mcpu=athlon -o keytest keytest.cpp   -L../lib/  -lsword
> > -lstdc++ -lz ../lib//libsword.a(swkey.o): In function `SWKey::SWKey(char
> > const*)': /home/luke/bibletime/sword/src/keys/swkey.cpp:27: undefined
> > reference to `stdstr(char**, char const*)'
> > ../lib//libsword.a(swkey.o): In function `SWKey::SWKey(char const*)':
> > /home/luke/bibletime/sword/src/keys/swkey.cpp:27: undefined reference to
> > `stdstr(char**, char const*)'
> > ../lib//libsword.a(swkey.o): In function `SWKey::SWKey(SWKey const&)':
> > /home/luke/bibletime/sword/src/keys/swkey.cpp:37: undefined reference to
> > `stdstr(char**, char const*)'
> > ../lib//libsword.a(swkey.o): In function `SWKey::SWKey(SWKey const&)':
> > /home/luke/bibletime/sword/src/keys/swkey.cpp:37: undefined reference to
> > `stdstr(char**, char const*)'
> > ../lib//libsword.a(swkey.o): In function `SWKey::operator=(char const*)':
> > /home/luke/bibletime/sword/src/keys/swkey.cpp:117: undefined reference to
> > `stdstr(char**, char const*)'
> > ../lib//libsword.a(swkey.o):/home/luke/bibletime/sword/src/keys/swkey.cpp
> >:132: more undefined references to `stdstr(char**, char const*)' follow
> > ../lib//libsword.a(versekey.o): In function
> > `VerseKey::getBookAbbrev(char*)':
> > /home/luke/bibletime/sword/src/keys/versekey.cpp:291: undefined reference
> > to `strstrip(char*)'
> > ../lib//libsword.a(versekey.o): In function
> > `VerseKey::ParseVerseList(char const*, char const*, bool)':
> > /home/luke/bibletime/sword/src/keys/../../include/swobject.h:29:
> > undefined reference to `stricmp(char const*, char const*)'
> > /home/luke/bibletime/sword/src/keys/../../include/swobject.h:29:
> > undefined reference to `stricmp(char const*, char const*)'
> > ../lib//libsword.a(localemgr.o): In function
> > `LocaleMgr::setDefaultLocaleName(char const*)':
> > /home/luke/bibletime/sword/src/mgr/localemgr.cpp:180: undefined reference
> > to `stdstr(char**, char const*)'
> > ../lib//libsword.a(swmgr.o): In function `SWMgr::SWMgr(char const*,
> > bool)': /usr/include/g++-v3/bits/basic_string.h:714: undefined reference
> > to `stdstr(char**, char const*)'
> > /usr/include/g++-v3/bits/basic_string.h:714: undefined reference to
> > `stdstr(char**, char const*)'
> > /usr/include/g++-v3/bits/basic_string.h:714: undefined reference to
> > `stdstr(char**, char const*)'
> > /usr/include/g++-v3/bits/basic_string.h:714: undefined reference to
> > `stdstr(char**, char const*)'
> > ../lib//libsword.a(swmgr.o):/usr/include/g++-v3/bits/basic_string.h:714:
> > more undefined references to `stdstr(char**, char const*)' follow
> > ../lib//libsword.a(swmgr.o): In function `SWMgr::CreateMod(std::string,
> > std::string, multimapwithdefault<std::string, std::string,
> > std::less<std::string> >&)': /usr/include/g++-v3/bits/basic_string.h:714:
> > undefined reference to `stricmp(char const*, char const*)'
> > /usr/include/g++-v3/bits/basic_string.h:714: undefined reference to
> > `stricmp(char const*, char const*)'
> > /usr/include/g++-v3/bits/basic_string.h:714: undefined reference to
> > `stricmp(char const*, char const*)'
> > /usr/include/g++-v3/bits/basic_string.h:714: undefined reference to
> > `stricmp(char const*, char const*)'
> > /usr/include/g++-v3/bits/basic_string.h:714: undefined reference to
> > `stricmp(char const*, char const*)'
> > ../lib//libsword.a(swmgr.o):/usr/include/g++-v3/bits/basic_string.h:714:
> > more undefined references to `stricmp(char const*, char const*)' follow
> > ../lib//libsword.a(filemgr.o): In function `FileDesc::FileDesc(FileMgr*,
> > char*, int, int)':
> > /home/luke/bibletime/sword/src/mgr/filemgr.cpp:47: undefined reference to
> > `stdstr(char**, char const*)'
> > ../lib//libsword.a(filemgr.o): In function `FileDesc::FileDesc(FileMgr*,
> > char*, int, int)':
> > /home/luke/bibletime/sword/src/mgr/filemgr.cpp:47: undefined reference to
> > `stdstr(char**, char const*)'
> > ../lib//libsword.a(swlocale.o): In function `SWLocale::SWLocale(char
> > const*)': /usr/include/g++-v3/bits/basic_string.h:164: undefined
> > reference to `stdstr(char**, char const*)'
> > /usr/include/g++-v3/bits/basic_string.h:164: undefined reference to
> > `stdstr(char**, char const*)'
> > ../lib//libsword.a(swlocale.o): In function `SWLocale::SWLocale(char
> > const*)': /usr/include/g++-v3/bits/basic_string.h:164: undefined
> > reference to `stdstr(char**, char const*)'
> > ../lib//libsword.a(swlocale.o):/usr/include/g++-v3/bits/basic_string.h:16
> >4: more undefined references to `stdstr(char**, char const*)' follow
> > ../lib//libsword.a(rawtext.o): In function `RawText::getRawEntry()':
> > /home/luke/bibletime/sword/src/modules/texts/rawtext/../../../../include/
> >swobject.h:29: undefined reference to `stricmp(char const*, char const*)'
> > ../lib//libsword.a(rawtext.o): In function `RawText::Search(char const*,
> > int, int, SWKey*, bool*, void (*)(char, void*), void*)':
> > /home/luke/bibletime/sword/src/modules/texts/rawtext/../../../../include/
> >swobject.h:29: undefined reference to `stricmp(char const*, char const*)'
> > ../lib//libsword.a(rawtext.o): In function `RawText::Search(char const*,
> > int, int, SWKey*, bool*, void (*)(char, void*), void*)':
> > /home/luke/bibletime/sword/src/modules/texts/rawtext/rawtext.cpp:327:
> > undefined reference to `stdstr(char**, char const*)'
> > ../lib//libsword.a(rawtext.o): In function `RawText::operator<<(char
> > const*)':
> > /home/luke/bibletime/sword/src/modules/texts/rawtext/../../../../include/
> >swobject.h:29: undefined reference to `stricmp(char const*, char const*)'
> > ../lib//libsword.a(rawtext.o): In function `RawText::operator<<(SWKey
> > const*)':
> > /home/luke/bibletime/sword/src/modules/texts/rawtext/../../../../include/
> >swobject.h:29: undefined reference to `stricmp(char const*, char const*)'
> > /home/luke/bibletime/sword/src/modules/texts/rawtext/../../../../include/
> >swobject.h:29: undefined reference to `stricmp(char const*, char const*)'
> > ../lib//libsword.a(rawtext.o): In function `RawText::deleteEntry()':
> > /home/luke/bibletime/sword/src/modules/texts/rawtext/../../../../include/
> >swobject.h:29: undefined reference to `stricmp(char const*, char const*)'
> > ../lib//libsword.a(ztext.o): In function `zText::getRawEntry()':
> > /home/luke/bibletime/sword/src/modules/texts/ztext/../../../../include/sw
> >object.h:29: undefined reference to `stricmp(char const*, char const*)'
> > ../lib//libsword.a(ztext.o):/home/luke/bibletime/sword/src/modules/texts/
> >ztext/../../../../include/swobject.h:29: more undefined references to
> > `stricmp(char const*, char const*)' follow ../lib//libsword.a(hrefcom.o):
> > In function `HREFCom::HREFCom(char const*, char const*, char const*, char
> > const*, SWDisplay*)':
> > /home/luke/bibletime/sword/src/modules/comments/hrefcom/hrefcom.cpp:37:
> > undefined reference to `stdstr(char**, char const*)'
> > ../lib//libsword.a(hrefcom.o): In function `HREFCom::HREFCom(char const*,
> > char const*, char const*, char const*, SWDisplay*)':
> > /home/luke/bibletime/sword/src/modules/comments/hrefcom/hrefcom.cpp:37:
> > undefined reference to `stdstr(char**, char const*)'
> > ../lib//libsword.a(hrefcom.o): In function `HREFCom::getRawEntry()':
> > /home/luke/bibletime/sword/src/modules/comments/hrefcom/../../../../inclu
> >de/swobject.h:29: undefined reference to `stricmp(char const*, char
> > const*)'
> > ../lib//libsword.a(rawld.o): In function `RawLD::getEntry(long)':
> > /home/luke/bibletime/sword/src/modules/lexdict/rawld/rawld.cpp:103:
> > undefined reference to `stdstr(char**, char const*)'
> > ../lib//libsword.a(rawld4.o): In function `RawLD4::getEntry(long)':
> > /home/luke/bibletime/sword/src/modules/lexdict/rawld4/rawld4.cpp:103:
> > undefined reference to `stdstr(char**, char const*)'
> > ../lib//libsword.a(rawstr.o): In function `RawStr::RawStr(char const*,
> > int)': /home/luke/bibletime/sword/src/modules/common/rawstr.cpp:55:
> > undefined reference to `stdstr(char**, char const*)'
> > ../lib//libsword.a(rawstr.o): In function `RawStr::RawStr(char const*,
> > int)': /home/luke/bibletime/sword/src/modules/common/rawstr.cpp:55:
> > undefined reference to `stdstr(char**, char const*)'
> > ../lib//libsword.a(rawstr.o): In function `RawStr::settext(char const*,
> > char const*)':
> > /home/luke/bibletime/sword/src/modules/common/rawstr.cpp:447: undefined
> > reference to `stdstr(char**, char const*)'
> > ../lib//libsword.a(rawstr.o):/home/luke/bibletime/sword/src/modules/commo
> >n/rawstr.cpp:571: more undefined references to `stdstr(char**, char
> > const*)' follow ../lib//libsword.a(gbfstrongs.o): In function
> > `GBFStrongs::setOptionValue(char const*)':
> > /home/luke/bibletime/sword/src/modules/filters/gbfstrongs.cpp:35:
> > undefined reference to `stricmp(char const*, char const*)'
> > ../lib//libsword.a(gbffootnotes.o): In function
> > `GBFFootnotes::setOptionValue(char const*)':
> > /home/luke/bibletime/sword/src/modules/filters/gbffootnotes.cpp:35:
> > undefined reference to `stricmp(char const*, char const*)'
> > ../lib//libsword.a(gbfheadings.o): In function
> > `GBFHeadings::setOptionValue(char const*)':
> > /home/luke/bibletime/sword/src/modules/filters/gbfheadings.cpp:35:
> > undefined reference to `stricmp(char const*, char const*)'
> > ../lib//libsword.a(gbfmorph.o): In function
> > `GBFMorph::setOptionValue(char const*)':
> > /home/luke/bibletime/sword/src/modules/filters/gbfmorph.cpp:35: undefined
> > reference to `stricmp(char const*, char const*)'
> > ../lib//libsword.a(swmodule.o): In function `SWModule::SWModule(char
> > const*, char const*, SWDisplay*, char*, bool)':
> > /home/luke/bibletime/sword/src/modules/swmodule.cpp:43: undefined
> > reference to `stdstr(char**, char const*)'
> > /home/luke/bibletime/sword/src/modules/swmodule.cpp:44: undefined
> > reference to `stdstr(char**, char const*)'
> > /home/luke/bibletime/sword/src/modules/swmodule.cpp:45: undefined
> > reference to `stdstr(char**, char const*)'
> > ../lib//libsword.a(swmodule.o): In function `SWModule::SWModule(char
> > const*, char const*, SWDisplay*, char*, bool)':
> > /home/luke/bibletime/sword/src/modules/swmodule.cpp:43: undefined
> > reference to `stdstr(char**, char const*)'
> > /home/luke/bibletime/sword/src/modules/swmodule.cpp:44: undefined
> > reference to `stdstr(char**, char const*)'
> > ../lib//libsword.a(swmodule.o):/home/luke/bibletime/sword/src/modules/swm
> >odule.cpp:45: more undefined references to `stdstr(char**, char const*)'
> > follow ../lib//libsword.a(swmodule.o): In function `SWModule::Search(char
> > const*, int,
> > int, SWKey*, bool*, void (*)(char, void*), void*)':
> > /home/luke/bibletime/sword/src/modules/../../include/swobject.h:29:
> > undefined reference to `stricmp(char const*, char const*)'
> > ../lib//libsword.a(swmodule.o): In function `SWModule::Search(char
> > const*, int,
> > int, SWKey*, bool*, void (*)(char, void*), void*)':
> > /home/luke/bibletime/sword/src/modules/swmodule.cpp:416: undefined
> > reference to
> > `stristr(char const*, char const*)'
> > /home/luke/bibletime/sword/src/modules/swmodule.cpp:407: undefined
> > reference to
> > `stristr(char const*, char const*)'
> > ../lib//libsword.a(swconfig.o): In function `SWConfig::Load()':
> > /home/luke/bibletime/sword/src/mgr/swconfig.cpp:78: undefined reference
> > to `strstrip(char*)'
> > ../lib//libsword.a(swconfig.o): In function `SWConfig::Load()':
> > /usr/include/g++-v3/bits/stl_alloc.h:542: undefined reference to
> > `strstrip(char*)'
> > collect2: ld returned 1 exit status
> > make[1]: *** [keytest] Error 1
> > make[1]: Leaving directory `/home/luke/bibletime/sword/tests'
> > make: *** [tests/targets] Error 2
> >
> > As you suggested, I tried going into several different directories and
> > doing make clean and then make but I still got the exact same errors. 
> > Also I had only one thread working on compiling sword.  There was only
> > one thread of the compiler running and only one thread of make
> > running(and I also have a single processor system without SMP support
> > even built into my kernel).  I did do cvs update right before I tried
> > doing make and compiling sword again so I would have the latest sources
> > but it did not help any.  Anyother suggestions? Just for reference I have
> > make version 3.79.1, gcc 3.0, binutils 2.11.2, glibc 2.2.3 and kernel
> > version 2.4.5-ac17.
> >
> > Luke
> >
> > On Friday 22 June 2001 04:39 pm, you wrote:
> > > Luke,
> > >       Thank you for looking into this.  Could you try this for me.
> > >
> > >       make clean
> > >       make
> > >
> > > Then if you get any errors, merely preceed to the directory containing
> > > the class that has the 'undefined reference' (I realize you might not
> > > know what directory this might be, but if you could just try to find
> > > one instance, it would really help me) and try
> > >
> > >       make clean
> > >       make
> > >
> > > from that directory, then return back to the top and try make.  Please
> > > let me know if this resolves the problem with that 'undefined
> > > reference'.
> > >
> > >   Sometimes, it seems, make multithreads jobs and sometimes the
> > > archival process doesn't seem to complete correctly.  I have this
> > > problem on 1 machine that I use at work, and it seems to happen quite
> > > randomly.
> > >
> > >       Thank you again,
> > >               -Troy.