[sword-devel] Problems compiling sword engine. Please help

Adrian & Linda alwelsh at australiaonline.net.au
Thu Jun 10 20:15:11 MST 2004


Hello Everyone,

I need the sword engine library for MacOS 10.3.3.  I have downloaded 
the latest
source code (sword.1.5.7) and followed the install instructions by 
typing ./configure.
My GCC compiler is 3.3 if that helps.  After this I type make and get 
the following error:

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -DUSE_AUTOTOOLS -DUNIX 
-DGLOBCONFPATH=\"/usr/local/etc/sword.conf\" -g -O2 -DCURLAVAILABLE 
-DUSELUCENE -MT untgz.lo -MD -MP -MF .deps/untgz.Tpo -c 
../src/utilfuns/zlib/untgz.c  -fno-common -DPIC
../src/utilfuns/zlib/untgz.c:19:21: direct.h: No such file or directory
../src/utilfuns/zlib/untgz.c:20:17: io.h: No such file or directory
../src/utilfuns/zlib/untgz.c: In function `TGZfname':
../src/utilfuns/zlib/untgz.c:121: error: `F_OK' undeclared (first use 
in this function)
../src/utilfuns/zlib/untgz.c:121: error: (Each undeclared identifier is 
reported only once
../src/utilfuns/zlib/untgz.c:121: error: for each function it appears 
in.)
make[2]: *** [untgz.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


I found the file and don't know why it does not choose the unix 
section.  Is there a problem because I am using MacOS?

#ifdef unix
# include <unistd.h>


I therefore made a define for unix to try and overcome this problem.
However I do not know if this is the right thing to do.  Any I did that 
and
tried make again.  This time it gets much more further but it ends with 
the
following error, at which I do not know how to fix.

rm -f .libs/rawtext.lo
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -DUSE_AUTOTOOLS -DUNIX 
-DGLOBCONFPATH=\"/usr/local/etc/sword.conf\" -g -O2 -ftemplate-depth-25 
-DCURLAVAILABLE -DUSELUCENE -MT rawtext.lo -MD -MP -MF 
.deps/rawtext.Tpo -c ../src/modules/texts/rawtext/rawtext.cpp  
-fno-common -DPIC
../src/modules/texts/rawtext/rawtext.cpp:22:29: CLucene/CLucene.h: No 
such file or directory
../src/modules/texts/rawtext/rawtext.cpp:24: error: namespace 
`queryParser'
    undeclared
../src/modules/texts/rawtext/rawtext.cpp:42: error: `list' was not 
declared in
    this scope
../src/modules/texts/rawtext/rawtext.cpp:42: error: parse error before 
`>'
    token
../src/modules/texts/rawtext/rawtext.cpp:43: error: syntax error before 
`;'
    token
../src/modules/texts/rawtext/rawtext.cpp: In constructor `
    sword::RawText::RawText(const char*, const char*, const char*,
    sword::SWDisplay*, char, char, char, const char*)':
../src/modules/texts/rawtext/rawtext.cpp:65: error: `IndexReader' 
undeclared
    (first use this function)
../src/modules/texts/rawtext/rawtext.cpp:65: error: (Each undeclared 
identifier
    is reported only once for each function it appears in.)
../src/modules/texts/rawtext/rawtext.cpp:65: error: parse error before 
`::'
    token
../src/modules/texts/rawtext/rawtext.cpp:67: error: invalid use of 
undefined
    type `struct lucene::search::IndexSearcher'
../include/rawtext.h:38: error: forward declaration of `struct
    lucene::search::IndexSearcher'
../src/modules/texts/rawtext/rawtext.cpp: At global scope:
../src/modules/texts/rawtext/rawtext.cpp:93: error: syntax error before 
`::'
    token
../src/modules/texts/rawtext/rawtext.cpp:110: error: syntax error 
before `&'
    token
../src/modules/texts/rawtext/rawtext.cpp:112: error: syntax error 
before `*'
    token
../src/modules/texts/rawtext/rawtext.cpp:146: error: syntax error 
before `&'
    token
../src/modules/texts/rawtext/rawtext.cpp:149: error: syntax error 
before `&'
    token
../src/modules/texts/rawtext/rawtext.cpp:151: error: `key' was not 
declared in
    this scope
../src/modules/texts/rawtext/rawtext.cpp:151: error: `key' was not 
declared in
    this scope
../src/modules/texts/rawtext/rawtext.cpp:151: error: `start' was not 
declared
    in this scope
../src/modules/texts/rawtext/rawtext.cpp:151: warning: ISO C++ forbids
    declaration of `findOffset' with no type
../src/modules/texts/rawtext/rawtext.cpp:151: warning: initializer list 
being
    treated as compound expression
../src/modules/texts/rawtext/rawtext.cpp:152: warning: ISO C++ forbids
    declaration of `entrySize' with no type
../src/modules/texts/rawtext/rawtext.cpp:154: warning: ISO C++ forbids
    declaration of `entryBuf' with no type
../src/modules/texts/rawtext/rawtext.cpp:154: warning: invalid 
conversion from
    `const char*' to `int'
../src/modules/texts/rawtext/rawtext.cpp:155: error: `key' was not 
declared in
    this scope
../src/modules/texts/rawtext/rawtext.cpp:155: error: `start' was not 
declared
    in this scope
../src/modules/texts/rawtext/rawtext.cpp:155: warning: ISO C++ forbids
    declaration of `readText' with no type
../src/modules/texts/rawtext/rawtext.cpp:155: warning: initializer list 
being
    treated as compound expression
../src/modules/texts/rawtext/rawtext.cpp:157: warning: ISO C++ forbids
    declaration of `rawFilter' with no type
../src/modules/texts/rawtext/rawtext.cpp:157: warning: initializer list 
being
    treated as compound expression
../src/modules/texts/rawtext/rawtext.cpp:158: error: `key' was not 
declared in
    this scope
../src/modules/texts/rawtext/rawtext.cpp:158: warning: ISO C++ forbids
    declaration of `rawFilter' with no type
../src/modules/texts/rawtext/rawtext.cpp:158: error: redefinition of 
`int
    rawFilter'
../src/modules/texts/rawtext/rawtext.cpp:157: error: `int rawFilter' 
previously
    defined here
../src/modules/texts/rawtext/rawtext.cpp:158: warning: initializer list 
being
    treated as compound expression
../src/modules/texts/rawtext/rawtext.cpp:161: warning: ISO C++ forbids
    declaration of `prepText' with no type
../src/modules/texts/rawtext/rawtext.cpp:163: error: parse error before 
`return
    '
../src/modules/texts/rawtext/rawtext.cpp:167: error: syntax error 
before `::'
    token
../src/modules/texts/rawtext/rawtext.cpp:170: error: syntax error 
before `*'
    token
../src/modules/texts/rawtext/rawtext.cpp:171: error: 'SWKey' is used as 
a type,
    but is not defined as a type.
../src/modules/texts/rawtext/rawtext.cpp:178: error: parse error before 
`if'
../src/modules/texts/rawtext/rawtext.cpp:180: warning: ISO C++ forbids
    declaration of `savekey' with no type
../src/modules/texts/rawtext/rawtext.cpp:180: error: `key' was not 
declared in
    this scope
../src/modules/texts/rawtext/rawtext.cpp:181: error: parse error before 
`}'
    token
../src/modules/texts/rawtext/rawtext.cpp:184: warning: ISO C++ forbids
    declaration of `searchkey' with no type
../src/modules/texts/rawtext/rawtext.cpp:184: error: `key' was not 
declared in
    this scope
../src/modules/texts/rawtext/rawtext.cpp:184: error: `key' was not 
declared in
    this scope
../src/modules/texts/rawtext/rawtext.cpp:185: error: parse error before 
`if'
../src/modules/texts/rawtext/rawtext.cpp:187: error: invalid type 
argument of `
    unary *'
../src/modules/texts/rawtext/rawtext.cpp:187: warning: ISO C++ forbids
    declaration of `setKey' with no type
../src/modules/texts/rawtext/rawtext.cpp:188: error: parse error before 
`}'
    token
../src/modules/texts/rawtext/rawtext.cpp:193: error: syntax error 
before `*'
    token
../src/modules/texts/rawtext/rawtext.cpp:197: error: syntax error 
before `*'
    token
../src/modules/texts/rawtext/rawtext.cpp:198: error: syntax error 
before `*'
    token
../src/modules/texts/rawtext/rawtext.cpp:200: error: no class template 
named `
    analysis' in `lucene'
../src/modules/texts/rawtext/rawtext.cpp:200: error: syntax error 
before `&'
    token
../src/modules/texts/rawtext/rawtext.cpp:201: error: parse error before 
`='
    token
../src/modules/texts/rawtext/rawtext.cpp:202: error: `target' was not 
declared
    in this scope
../src/modules/texts/rawtext/rawtext.cpp:202: error: `target' was not 
declared
    in this scope
../src/modules/texts/rawtext/rawtext.cpp:203: error: parse error before 
`if'
../src/modules/texts/rawtext/rawtext.cpp:212: warning: ISO C++ forbids
    declaration of `writer' with no type
../src/modules/texts/rawtext/rawtext.cpp:212: error: parse error before 
`('
    token
../src/modules/texts/rawtext/rawtext.cpp:215: warning: ISO C++ forbids
    declaration of `writer' with no type
../src/modules/texts/rawtext/rawtext.cpp:215: error: redefinition of 
`int
    writer'
../src/modules/texts/rawtext/rawtext.cpp:212: error: `int writer' 
previously
    declared here
../src/modules/texts/rawtext/rawtext.cpp:215: error: parse error before 
`('
    token
../src/modules/texts/rawtext/rawtext.cpp:222: error: syntax error 
before `.'
    token
../src/modules/texts/rawtext/rawtext.cpp:223: error: syntax error 
before `.'
    token
../src/modules/texts/rawtext/rawtext.cpp:224: error: syntax error 
before `->'
    token
../src/modules/texts/rawtext/rawtext.cpp:227: error: parse error before 
`this'
../src/modules/texts/rawtext/rawtext.cpp:230: error: syntax error 
before `->'
    token
../src/modules/texts/rawtext/rawtext.cpp:231: error: syntax error 
before `->'
    token
../src/modules/texts/rawtext/rawtext.cpp:236: warning: ISO C++ forbids
    declaration of `setKey' with no type
../src/modules/texts/rawtext/rawtext.cpp:236: error: redefinition of 
`int
    setKey'
../src/modules/texts/rawtext/rawtext.cpp:187: error: `int setKey' 
previously
    defined here
../src/modules/texts/rawtext/rawtext.cpp:238: error: parse error before 
`if'
../src/modules/texts/rawtext/rawtext.cpp:391: error: syntax error 
before `&'
    token
../src/modules/texts/rawtext/rawtext.cpp:422: error: `percentUserData' 
was not
    declared in this scope
../src/modules/texts/rawtext/rawtext.cpp:422: warning: ISO C++ forbids
    declaration of `percent' with no type
../src/modules/texts/rawtext/rawtext.cpp:422: warning: initializer list 
being
    treated as compound expression
../src/modules/texts/rawtext/rawtext.cpp:424: error: syntax error 
before `::'
    token
../src/modules/texts/rawtext/rawtext.cpp:425: error: syntax error 
before `&'
    token
../src/modules/texts/rawtext/rawtext.cpp:426: error: `percentUserData' 
was not
    declared in this scope
../src/modules/texts/rawtext/rawtext.cpp:426: warning: ISO C++ forbids
    declaration of `percent' with no type
../src/modules/texts/rawtext/rawtext.cpp:426: error: redefinition of `
    int*percent'
../src/modules/texts/rawtext/rawtext.cpp:422: error: `int*percent' 
previously
    defined here
../src/modules/texts/rawtext/rawtext.cpp:426: warning: initializer list 
being
    treated as compound expression
../src/modules/texts/rawtext/rawtext.cpp:427: error: syntax error 
before `&'
    token
../src/modules/texts/rawtext/rawtext.cpp:428: error: `percentUserData' 
was not
    declared in this scope
../src/modules/texts/rawtext/rawtext.cpp:428: warning: ISO C++ forbids
    declaration of `percent' with no type
../src/modules/texts/rawtext/rawtext.cpp:428: error: redefinition of `
    int*percent'
../src/modules/texts/rawtext/rawtext.cpp:426: error: `int*percent' 
previously
    defined here
../src/modules/texts/rawtext/rawtext.cpp:428: warning: initializer list 
being
    treated as compound expression
../src/modules/texts/rawtext/rawtext.cpp:432: error: parse error before 
`for'
../src/modules/texts/rawtext/rawtext.cpp:432: error: `h' was not 
declared in
    this scope
../src/modules/texts/rawtext/rawtext.cpp:432: error: parse error before 
`;'
    token
../src/modules/texts/rawtext/rawtext.cpp:432: error: syntax error 
before `++'
    token
../src/modules/texts/rawtext/rawtext.cpp:436: warning: ISO C++ forbids
    declaration of `vk' with no type
../src/modules/texts/rawtext/rawtext.cpp:436: error: `doc' was not 
declared in
    this scope
../src/modules/texts/rawtext/rawtext.cpp:436: error: `1048576' cannot 
be used
    as a function
../src/modules/texts/rawtext/rawtext.cpp:440: error: parse error before 
`if'
../src/modules/texts/rawtext/rawtext.cpp:446: error: syntax error 
before `.'
    token
../src/modules/texts/rawtext/rawtext.cpp:450: error: syntax error 
before `.'
    token
../src/modules/texts/rawtext/rawtext.cpp:453: error: `percentUserData' 
was not
    declared in this scope
../src/modules/texts/rawtext/rawtext.cpp:453: warning: ISO C++ forbids
    declaration of `percent' with no type
../src/modules/texts/rawtext/rawtext.cpp:453: error: redefinition of `
    int*percent'
../src/modules/texts/rawtext/rawtext.cpp:428: error: `int*percent' 
previously
    defined here
../src/modules/texts/rawtext/rawtext.cpp:453: warning: initializer list 
being
    treated as compound expression
../src/modules/texts/rawtext/rawtext.cpp:455: error: parse error before 
`delete
    '
../src/modules/texts/rawtext/rawtext.cpp:458: warning: ISO C++ forbids
    declaration of `listkey' with no type
../src/modules/texts/rawtext/rawtext.cpp:458: error: `SW_POSITION' was 
not
    declared in this scope
../src/modules/texts/rawtext/rawtext.cpp:459: error: `percentUserData' 
was not
    declared in this scope
../src/modules/texts/rawtext/rawtext.cpp:459: warning: ISO C++ forbids
    declaration of `percent' with no type
../src/modules/texts/rawtext/rawtext.cpp:459: error: redefinition of `
    int*percent'
../src/modules/texts/rawtext/rawtext.cpp:453: error: `int*percent' 
previously
    defined here
../src/modules/texts/rawtext/rawtext.cpp:459: warning: initializer list 
being
    treated as compound expression
../src/modules/texts/rawtext/rawtext.cpp:460: error: parse error before 
`return
    '
../src/modules/texts/rawtext/rawtext.cpp:658: error: syntax error 
before `::'
    token
../src/modules/texts/rawtext/rawtext.cpp:660: error: `key' was not 
declared in
    this scope
../src/modules/texts/rawtext/rawtext.cpp:660: error: `key' was not 
declared in
    this scope
../src/modules/texts/rawtext/rawtext.cpp:660: error: `inbuf' was not 
declared
    in this scope
../src/modules/texts/rawtext/rawtext.cpp:660: error: `len' was not 
declared in
    this scope
../src/modules/texts/rawtext/rawtext.cpp:660: warning: ISO C++ forbids
    declaration of `doSetText' with no type
../src/modules/texts/rawtext/rawtext.cpp:660: warning: initializer list 
being
    treated as compound expression
../src/modules/texts/rawtext/rawtext.cpp:661: error: parse error before 
`}'
    token
../src/modules/texts/rawtext/rawtext.cpp:664: error: syntax error 
before `::'
    token
../src/modules/texts/rawtext/rawtext.cpp:666: error: syntax error 
before `*'
    token
../src/modules/texts/rawtext/rawtext.cpp:677: error: `destkey' was not 
declared
    in this scope
../src/modules/texts/rawtext/rawtext.cpp:677: error: `destkey' was not 
declared
    in this scope
../src/modules/texts/rawtext/rawtext.cpp:677: error: `srckey' was not 
declared
    in this scope
../src/modules/texts/rawtext/rawtext.cpp:677: warning: ISO C++ forbids
    declaration of `doLinkEntry' with no type
../src/modules/texts/rawtext/rawtext.cpp:677: warning: initializer list 
being
    treated as compound expression
../src/modules/texts/rawtext/rawtext.cpp:679: error: parse error before 
`if'
../src/modules/texts/rawtext/rawtext.cpp:690: error: syntax error 
before `::'
    token
../src/modules/texts/rawtext/rawtext.cpp:692: error: `key' was not 
declared in
    this scope
../src/modules/texts/rawtext/rawtext.cpp:692: error: `key' was not 
declared in
    this scope
../src/modules/texts/rawtext/rawtext.cpp:692: warning: ISO C++ forbids
    declaration of `doSetText' with no type
../src/modules/texts/rawtext/rawtext.cpp:692: error: redefinition of 
`int
    doSetText'
../src/modules/texts/rawtext/rawtext.cpp:660: error: `int doSetText' 
previously
    defined here
../src/modules/texts/rawtext/rawtext.cpp:692: warning: initializer list 
being
    treated as compound expression
../src/modules/texts/rawtext/rawtext.cpp:693: error: parse error before 
`}'
    token
../src/modules/texts/rawtext/rawtext.cpp:703: error: syntax error 
before `::'
    token
../src/modules/texts/rawtext/rawtext.cpp:705: error: redefinition of 
`short
    unsigned int size'
../src/modules/texts/rawtext/rawtext.cpp:148: error: `short unsigned 
int size'
    previously defined here
../src/modules/texts/rawtext/rawtext.cpp:706: error: syntax error 
before `*'
    token
../src/modules/texts/rawtext/rawtext.cpp:708: error: `tmpkey' was not 
declared
    in this scope
../src/modules/texts/rawtext/rawtext.cpp:708: error: `tmpkey' was not 
declared
    in this scope
../src/modules/texts/rawtext/rawtext.cpp:708: error: `start' was not 
declared
    in this scope
../src/modules/texts/rawtext/rawtext.cpp:708: warning: ISO C++ forbids
    declaration of `findOffset' with no type
../src/modules/texts/rawtext/rawtext.cpp:708: error: redefinition of 
`int
    findOffset'
../src/modules/texts/rawtext/rawtext.cpp:151: error: `int findOffset'
    previously defined here
../src/modules/texts/rawtext/rawtext.cpp:708: warning: initializer list 
being
    treated as compound expression
../src/modules/texts/rawtext/rawtext.cpp:710: error: parse error before 
`='
    token
../src/modules/texts/rawtext/rawtext.cpp:714: error: parse error before 
`='
    token
../src/modules/texts/rawtext/rawtext.cpp:715: error: parse error before 
`>'
    token
../src/modules/texts/rawtext/rawtext.cpp:716: warning: ISO C++ forbids
    declaration of `tmpkey' with no type
../src/modules/texts/rawtext/rawtext.cpp:716: error: `getVerseKey' was 
not
    declared in this scope
../src/modules/texts/rawtext/rawtext.cpp:718: error: parse error before 
`if'
../src/modules/texts/rawtext/rawtext.cpp:722: error: `long int index'
    redeclared as different kind of symbol
/usr/include/string.h:107: error: previous declaration of `char* 
index(const
    char*, int)'
../src/modules/texts/rawtext/rawtext.cpp:722: error: base operand of 
`->' is
    not a pointer
../src/modules/texts/rawtext/rawtext.cpp:723: error: base operand of 
`->' is
    not a pointer
../src/modules/texts/rawtext/rawtext.cpp:723: error: `start' was not 
declared
    in this scope
../src/modules/texts/rawtext/rawtext.cpp:723: warning: ISO C++ forbids
    declaration of `findOffset' with no type
../src/modules/texts/rawtext/rawtext.cpp:723: error: redefinition of 
`int
    findOffset'
../src/modules/texts/rawtext/rawtext.cpp:708: error: `int findOffset'
    previously defined here
../src/modules/texts/rawtext/rawtext.cpp:723: warning: initializer list 
being
    treated as compound expression
../src/modules/texts/rawtext/rawtext.cpp:724: error: parse error before 
`if'
../src/modules/texts/rawtext/rawtext.cpp:730: warning: ISO C++ forbids
    declaration of `lastgood' with no type
../src/modules/texts/rawtext/rawtext.cpp:730: error: invalid type 
argument of `
    unary *'
../src/modules/texts/rawtext/rawtext.cpp:731: error: parse error before 
`}'
    token
../src/modules/texts/rawtext/rawtext.cpp:733: warning: ISO C++ forbids
    declaration of `error' with no type
../src/modules/texts/rawtext/rawtext.cpp:734: error: parse error before 
`}'
    token
make[2]: *** [rawtext.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


I tried looking for CLucene/CLucene.h but could not find it on my 
system.
Does anyone know what I need to do to get it to work?

Thank you so  much for your help.

Adrian



More information about the sword-devel mailing list