mvnForum Homepage

Print at Dec 21, 2014 1:15:08 PM
Posted by CiaW at Aug 23, 2009 5:17:03 PM
Errors using 'make' on Sword engine
Hi all! I'm somewhat new to linux, and used to use (and loved) eSword on Windows. I have a laptop running Fedora 7 and I've installed or tried both gnomesword (I know it's now Xiphos) and BibleTime. I recently got a new desktop pc on which I've installed CentOS 5.3 and there are no Xiphos / BibleTime / gnone sword rpm packages available for them.

I'm not sure if it'd be safe to install, say a Fedora 10 rpm on my CentOS system (I could ask in their forum...); but I thought I'd try to just download and install the source packages. From a previous attempt I know that Xiphos requires version 1.5 or later of Sword; so I downloaded that first and also installed GCC and after an error discovered I also needed gcc-c++ which I've also installed. The ./configure command went just fine, then when I used the 'make' command it ran for a few moments and returned a message of
make: *** [all recursive] Error 1
for versions 1.6.0 with another message before that.

Since version 1.5.x would be acceptable I downloaded v1.5.11 then v1.5.10 after 11 failed, and on both of them I got the same error message as follows:
./lib/.libs/libsword.so: undefined reference to 'compress' (next line same reference to) 'gzdopen', 'gzerror', 'gzread', 'uncompress'
Then:
 collect2: ld returned 1 exit status 

 make[1]: *** [buildtest] Error 1
make[1]: Leaving directory `/usr/share/sword-1.5.10'
make: *** [install-recursive] Error 1

Before I throw in the towel on this endeavor and install wine and esword; I thought I'd post here and request help. I even had a bright idea that I might try to figure out how to create an rpm for CentOS; but first I need to be able to install it locally. sad

Do you need to know what versions of gcc-c++ I'm using or anything? My PC is an AMD phenom triple core; 2 gig of ram running CentOS 5.3
* update* I visited the centos forums and found they have a preview of gcc ver 4.3 available as well as gcc43-c++; I suspect that is the newest version of gcc ? At any rate I installed that and ran the 'make' command in the directory 1.5.11 and 1.5.10 and got the same error messages as above.

Any advice would be appreciated-- I'm not a programmer, just trying to follow the steps in the install and readme files! Thanks.

Cia W

Posted by mdbergmann at Aug 24, 2009 1:03:17 AM
Re: Errors using 'make' on Sword engine
Hi.

the "undefined reference to 'compress'" looks like zlib or zlib-dev package is missing.
Also I think the normal build procedure is:
- unpack
- run ./autogen.sh (which needs automake and autoconf packages)
- run usrinst.sh (or configure if you need special things)
- then make and make install

However I think you should try to get packages of Xiphos since compiling this all yourself might be frustrating when problems come up. I don't know whether the Fedora packages work.
Xiphos developer are not regularly here in this forum and you should consider writing a mail to either the sword-devel or xiphos mailing list (http://xiphos.org/help/).

Regards,
Manfred

Posted by CiaW at Aug 24, 2009 4:53:46 PM
Re: Errors using 'make' on Sword engine
Hi Manfred,

thanks for the reply. I did of course unpack the archive first into the /usr/share directory (after giving my non-root user permission to access the folder!) then using su in a terminal I did the ./configure and make;

I think (though I'm not positive) that's what the directions in the readme said for v1.6; but now that I look at the install file for v1.5.11 it's suggesting something different.
Under Quick start it says:
 If you have never installed sword before and/or are happy with a default
configuration, you may wish to type:

make install_config


So I did that, and got:
 sword.conf generated 


I think that's a good thing!? Now onto unpacking Xiphos and see what it says to do... I'll contact xiphos as you suggested if I have issues with that. Hopefully I'll be back shortly to tell you I'm happily using Xiphos! smile

Cia W

Posted by mdbergmann at Aug 24, 2009 11:49:50 PM
Re: Errors using 'make' on Sword engine
thanks for the reply. I did of course unpack the archive first into the /usr/share directory (after giving my non-root user permission to access the folder!) then using su in a terminal I did the ./configure and make;

I think (though I'm not positive) that's what the directions in the readme said for v1.6; but now that I look at the install file for v1.5.11 it's suggesting something different.

That's how I build the sword engine for MacSword. Actually I don't know whether this has changed from 1.5.11 to 1.6.0.


Under Quick start it says:
 If you have never installed sword before and/or are happy with a default
configuration, you may wish to type:

make install_config


So I did that, and got:
 sword.conf generated 


I think that's a good thing!?

Well, that maybe only installed or generated the sword.conf file. You can check the makefile and see exactly what it did.
Normally some utility programs (like "installmgr", "osis2mod", "xml2gbs", ...) are created in or copied to the prefix_path/bin when "make install" is executed. You might want to check if those are there.


Manfred

Posted by ransom1982 at Aug 25, 2009 3:19:20 PM
Re: Errors using 'make' on Sword engine
I'm a Xiphos developer. We recommend you install sword 1.6.0. To compile, just run ./usrinst.sh, then make, then make install.

Please try 1.6.0 again, then post the exact error messages you get when running make.

Matthew

Posted by CiaW at Aug 28, 2009 9:37:13 AM
Re: Errors using 'make' on Sword engine
Hi Matthew,

While looking around the CentOS forums, and not wanting to break anything I decided to install Wine and eSword (which I can't run the newest version right now) and Theophilos3 which is working. They suggested that IF you're going to try to install something from source that you put it into the /usr/local directory. I decided to try that this morning (using Sword 1.5.11) which didn't work -- so I was logging on here to report I was giving up for now until I can get an rpm to install.

But, since you asked... I unpacked sword-1.6 into the /usr/local directory; ran .usrinst.sh and that went fine. Then when I ran 'make' here are the errors I'm getting:

 gr.cpp -o swmgr.o
In file included from ../src/mgr/swmgr.cpp:95:
../include/utf8transliterator.h:39:28: error: unicode/unistr.h: No such file or directory
../include/utf8transliterator.h:41:30: error: unicode/translit.h: No such file or directory
../include/utf8transliterator.h:51: error: ‘UnicodeString’ does not name a type
../include/utf8transliterator.h:52: error: ‘UTransDirection’ does not name a type
../include/utf8transliterator.h:54: error: ISO C++ forbids declaration of ‘type name’ with no type
../include/utf8transliterator.h:54: error: wrong number of template arguments (1, should be 4)
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_map.h:92: error: provided for ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’
../include/utf8transliterator.h:54: error: invalid type in declaration before ‘;’ token
../include/utf8transliterator.h:55: error: ‘UnicodeString’ was not declared in this scope
../include/utf8transliterator.h:55: error: template argument 1 is invalid
../include/utf8transliterator.h:55: error: invalid type in declaration before ‘;’ token
../include/utf8transliterator.h:77: error: ‘UErrorCode’ does not name a type
../include/utf8transliterator.h:79: error: ‘UErrorCode’ has not been declared
../include/utf8transliterator.h:80: error: expected ‘,’ or ‘...’ before ‘&’ token
../include/utf8transliterator.h:80: error: ISO C++ forbids declaration of ‘UnicodeString’ with no type
../include/utf8transliterator.h:82: error: expected ‘,’ or ‘...’ before ‘&’ token
../include/utf8transliterator.h:82: error: ISO C++ forbids declaration of ‘UnicodeString’ with no type
../include/utf8transliterator.h:83: error: ISO C++ forbids declaration of ‘Transliterator’ with no type
../include/utf8transliterator.h:83: error: expected ‘;’ before ‘*’ token
make[1]: *** [swmgr.lo] Error 1
make[1]: Leaving directory `/usr/local/sword-1.6.0/lib'
make: *** [all-recursive] Error 1


That's different than the previous errors I got; but errors nonetheless.

Let me know if there's something simple I can do, or if there are more details you need. (if you need versions or whatever, please give me the verbiage or command to run in a terminal window..) Thanks!

Cia W

Posted by ransom1982 at Aug 31, 2009 1:03:07 PM
Re: Errors using 'make' on Sword engine
You probably don't have ICU available. I think there is a problem in the sword configure process in this case. You should edit usrinst.sh and add a # to the line that says OPTIONS="--with-icu $OPTIONS".

By the way, when someone tells you to install in /usr/local, that doesn't mean you should compile it there. You should unzip it to somewhere in your home directory. When you do "make install" it will install it to /usr/local.

Posted by CiaW at Aug 31, 2009 6:44:10 PM
Re: Errors using 'make' on Sword engine
Ok, I commented that reference and tried again (in my home dir this time); and now I'm getting an error very similar to what I did before:

 libtool: link: g++ -g3 -O0 -Wall -Werror -ftemplate-depth-25 -o buildtest buildtest.o  ./lib/.libs/libsword.a
./lib/.libs/libsword.a(zipcomprs.o): In function `sword::ZipCompress::Decode()':
/home/CiaW/sword-1.6.0/lib/../src/modules/common/zipcomprs.cpp:165: undefined reference to `uncompress'
./lib/.libs/libsword.a(zipcomprs.o): In function `sword::ZipCompress::Encode()':
/home/CiaW/sword-1.6.0/lib/../src/modules/common/zipcomprs.cpp:99: undefined reference to `compress'
collect2: ld returned 1 exit status
make[1]: *** [buildtest] Error 1
make[1]: Leaving directory `/home/CiaW/sword-1.6.0'
make: *** [all-recursive] Error 1


Is that fix-able ?

Posted by ransom1982 at Sep 1, 2009 12:51:07 PM
Re: Errors using 'make' on Sword engine
At this point, sword is actually compiled successfully. It's now trying to link the buildtest. Can you type "make" again, and post all of the output?

Posted by CiaW at Sep 1, 2009 4:27:00 PM
Re: Errors using 'make' on Sword engine
I've been doing it in a terminal window; and I suspect that some of it won't be available to cut & paste and it'd be a long output, can I do something like 'make -v [verbose] >/home/CiaW/somefile' and attach it or email to you? Or I can just attach what comes out here.. let me know, it'll be a lot of stuff.

Editing: I just realized that doing it a 2nd time on the same folder probably won't be too much, as I recall it pretty quickly came back to the same errors the last time I tried that before I installed the newer gcc & gcc-c++ -- so do you just want the output from a 2nd run on the same files/ folder?

re-edit (I need my afternoon coffee!) -- here's the output of the 2nd run with 'make' on the folder:

[root@localhost sword-1.6.0]# make
Making all in lib
make[1]: Entering directory `/home/CiaW/sword-1.6.0/lib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/CiaW/sword-1.6.0/lib'
Making all in .
make[1]: Entering directory `/home/CiaW/sword-1.6.0'
/bin/sh ./libtool --tag=CXX --mode=link g++ -g3 -O0 -Wall -Werror -ftemplate-depth-25 -o buildtest buildtest.o ./lib/libsword.la
libtool: link: g++ -g3 -O0 -Wall -Werror -ftemplate-depth-25 -o buildtest buildtest.o ./lib/.libs/libsword.a
./lib/.libs/libsword.a(zipcomprs.o): In function `sword::ZipCompress::Decode()':
/home/CiaW/sword-1.6.0/lib/../src/modules/common/zipcomprs.cpp:165: undefined reference to `uncompress'
./lib/.libs/libsword.a(zipcomprs.o): In function `sword::ZipCompress::Encode()':
/home/CiaW/sword-1.6.0/lib/../src/modules/common/zipcomprs.cpp:99: undefined reference to `compress'
collect2: ld returned 1 exit status
make[1]: *** [buildtest] Error 1
make[1]: Leaving directory `/home/CiaW/sword-1.6.0'
make: *** [all-recursive] Error 1


Thanks!

Posted by jmarsden at Sep 1, 2009 6:26:10 PM
Re: Errors using 'make' on Sword engine
As I think was mentioned earlier in this thread, you almost certainly need the zlib-devel RPM package installed in order to build SWORD from sources. So please try:

sudo yum install zlib-devel  # Install zlib-devel package
./usrinst.sh # Configure SWORD build environment
make # Build SWORD

and see if that gets you any further along.

Note that building SWORD using ./configure with no options supplied is probably not what you really want to do; please let the included usrinst.sh script do the work of choosing good defaults for you. Incidentally, did you read the INSTALL file, which has info on how to build SWORD in it?

One day I might look at creating SWORD RPMs, I currently am involved in creating SWORD .deb packages for Debian and Ubuntu :)

Jonathan

Posted by CiaW at Sep 3, 2009 8:36:52 AM
Re: Errors using 'make' on Sword engine
Thanks for the reply, Jonathan (and others!). I just installed zlib-devel (when I specified 'zlib-devel package' it just pulled in zlib-devel at all of 101k which I can handle...)

I ran 'make' again and got the same errors reported previously -- so I deleted that directory and uncompressed the file for a fresh start; and again the ./usrinst.sh went fine; but when I ran 'make' it came up with (new?) errors again.

Edit: I remembered about commenting the section in usrinst.sh for OPTIONS="-with-icu $OPTIONS" and did that. This time Sword installed! Yay!

Of course then when I went to install Xiphos 3.1.1 it's telling me either no sword or sword not recent enough.

However, I have wine installed with Theophilos working and I may try to figure out the eSword issues; and I've since installed Fedora 11 under a dual-boot set up so I'll install Xiphos on there since there's an rpm available.

So now I have a Xiphos issue. argh. I may look into that later, because the most recent version of Sword is now installed. -- and I very much appreciate the assistance and responses! smile

Cia W

Posted by ransom1982 at Sep 3, 2009 11:37:26 AM
Re: Errors using 'make' on Sword engine
Glad to hear things are going better. Did you do a "make install" after make? (for SWORD).

Posted by CiaW at Sep 4, 2009 10:25:50 AM
Re: Errors using 'make' on Sword engine
Yes, I did the make install after make and it told me that the sword.conf file had been created. Xiphos still isn't happy -- I think I may try BibleTime instead on this install.

Thanks again!

Posted by ransom1982 at Sep 4, 2009 11:04:44 AM
Re: Errors using 'make' on Sword engine
Well, if Xiphos can't find SWORD installed, I'd be surprised if BibleTime could. They both use the same method to find SWORD on the computer. I suggest that you take a look at this page, http://www.crosswire.org/wiki/Tutorial:Compil...nterprise_Linux_or_CentOS, and try using that script. You'll have to copy it to a text document, save it, make it executable, then run it.

Posted by ransom1982 at Oct 27, 2009 11:24:29 AM
Re: Errors using 'make' on Sword engine
For anyone who may discover this later (and for CiaW if you're still around), Xiphos and SWORD have now been packaged for CentOS. They will be available soon in the https://fedoraproject.org/wiki/EPEL package repository. Until then, they will be available here:
http://kojipkgs.fedoraproject.org/packages/xiphos/3.1.1/1.el5/ ,
http://kojipkgs.fedoraproject.org/packages/sword/1.6.0/1.el5/ , and
http://kojipkgs.fedoraproject.org/packages/clucene/0.9.21b/1.el5/