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

Troy A. Griffitts sword-devel@crosswire.org
Fri, 22 Jun 2001 14:39:46 -0700


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.



Luke Mauldin wrote:
> 
> Hello, I was able to take care of alot of the sword error messages while
> compiling by manually adding utilstr.o to libsword.a  The line I used to do
> this was...
> ar crs /home/luke/bibletime/sword/lib/libsword.a
> /home/luke/bibletime/sword/src/utilfuns/utilstr.o
> However I am still getting some errors while compiling:
> 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(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(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*)'
> ../lib//libsword.a(swmgr.o):/usr/include/g++-v3/bits/basic_string.h:714: more
> undefined references to `stricmp(char const*, char const*)' follow
> 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
> The part that is failing is the linker, which means that the compiler knows
> where to find the function defination for stricmp() but the linker does not
> know where to find the actual code(normally in a .cpp file).  I think this
> can be resolved by adding whatever object file the function stricmp is in to
> libsword.a  however I do not know where stricmp is defined.  Also, users who
> compile sword should not have to do these things manually, all of these
> things should be taken care of in a Makefile.
> 
> Luke
> 
> On Thursday 21 June 2001 11:46 pm, you wrote:
> > Luke,
> >       Thanks for testing on 3.0.  stdstr is one of ours.  Should be in
> > sword/include somewhere (utilstr.h I think).  Hope this helps.  Let me
> > know if this included doesn't seem to be getting included correctly.
> >
> >       -Troy.
> >
> > Luke Mauldin wrote:
> > > Hello I recently installed GCC 3.0 and the latest release of binutils and
> > > I attempted to build sword.  I got ALOT of errors.  They are posted
> > > below.  One specific one, the inability to find stdstr(), I looked for
> > > stdstr in every string related file on my system, both included in the
> > > GCC 3.0 and glibc 2.2.3 and still could not find any function by that
> > > name.  If anyone could enlighten me or help me with these errors, I would
> > > be very thankful.
> > >
> > > 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:26: 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:26: 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:36: 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:36: 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:116: undefined reference to
> > > `stdstr(char**, char const*)'
> > > ../lib//libsword.a(swkey.o):/home/luke/bibletime/sword/src/keys/swkey.cpp
> > >:131: 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(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(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(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