mvnForum Homepage

Print at Nov 28, 2014 11:20:37 AM View all posts in this thread on one page
Posted by tcrawfordjakarta at Jun 1, 2011 7:47:41 AM
Compiling sword on Fedora 15
I am trying to compile sword svn 2625 on Fedora 15, the compile quits with the following:

/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../include -I../include -I/usr/include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.6.2_icu_4.4.2\" -D_FTPLIB_NO_COMPAT -g3 -O0 -Wall -Werror -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT url.lo -MD -MP -MF .deps/url.Tpo -c -o url.lo `test -f '../src/utilfuns/url.cpp' || echo './'`../src/utilfuns/url.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../include -I../include -I/usr/include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__ -DSWICU_DATA=\"/usr/lib/sword/1.6.2_icu_4.4.2\" -D_FTPLIB_NO_COMPAT -g3 -O0 -Wall -Werror -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include -I/usr/lib -DUSELUCENE -MT url.lo -MD -MP -MF .deps/url.Tpo -c ../src/utilfuns/url.cpp -o url.o
../src/utilfuns/url.cpp: In member function 'void sword::URL::parse()':
../src/utilfuns/url.cpp:136:7: error: variable 'checkAnchor' set but not used [-Werror=unused-but-set-variable]

Can I get some help with this?

I tried compiling the tar ball sword-1.6.2 and I get the same error.

Tom Crawford

Posted by jonmmorgan at Jun 6, 2011 4:50:17 AM
Re: Compiling sword on Fedora 15
The compiler is correct: the variable checkAnchor isn't used. I don't know whether Fedora 15 has made the default compiler settings more strict or not and whether you could easily configure (there ought to be a flag to disable that WError check), but as far as I can tell you should just be able to comment out all the references to checkAnchor without any ill effect.

Posted by tcrawfordjakarta at Jun 6, 2011 9:57:25 AM
Re: Compiling sword on Fedora 15
I tried passing the options -Wno-error=unused-but-set-variable but no joy, as I get the same result as above.

The config.log spits this out.
configure:8013: result: gcc -E
configure:8033: gcc -E conftest.c
configure:8033: $? = 0
configure:8047: gcc -E conftest.c
conftest.c:11:28: fatal error: ac_nonexistent.h: No such file or directory
compilation terminated.
configure:8047: $? = 1
configure: failed program was:
| /* confdefs.h */

Right now, I am reduced to running a build of Online Bible that will run on wine.

Any ideas? It would be nice to get this working on Fedora 15.

Tom Crawford

Posted by mdbergmann at Jun 8, 2011 12:06:12 PM
Re: Compiling sword on Fedora 15
Right now, I am reduced to running a build of Online Bible that will run on wine.

BibleTime and Xiphos come as precompiled packages.
Why do you want to compile Sword?



Manfred

Posted by jonmmorgan at Jun 9, 2011 4:48:45 AM
Re: Compiling sword on Fedora 15
I'm not an expert on autoconf, so don't know what to suggest for that. However, what I would do would be just to comment out the offending lines and try building again.

Posted by tcrawfordjakarta at Jun 9, 2011 6:49:23 AM
Re: Compiling sword on Fedora 15
I finally got sword to compile by using a cmake compile. I found you could turn off the -Werror and -Wall and -g3 flags by not using a debug build when using cmake. I picked up this info from the cmake README file

* CMAKE_BUILD_TYPE - If this is given the value of "Debug" then the default SWORD debugging flags (-g3 -Wall -Werror -O0) will be enabled. If this is unspecified or any value other than "Debug" then the flag -O3 will be enabled.

I tried to set the g++ complier flags from the environment command export CXXFLAGS=O3, but you still get the Werror when you are trying to do a regular compile.

The problem of changing all the files is that there are lots of -Wall errors in the sword source.

Anyway, I got sword installed and Bibletime is up and running fine.

Tom

Posted by tcrawfordjakarta at Jun 10, 2011 6:04:22 AM
Re: Compiling sword on Fedora 15
Okay, I got sword to compile by setting the environment

export CFLAGS="-g3 -O3 -Wall -Wno-error"

export CXXFLAGS="-g3 -O3 -Wall -Wno-error"

./configure --prefix=/usr

Seems the sword needs some of the error checking routines to sort out the various variables that you can set, and doesn't find (or it doesn't exist) the proper error checking header file to tell the program which Werror's are not fatal.

On the Bibletime build the install manager doesn't work, but running installmgr sword utility works fine -- you just don't get the nice graphical interface.

Anyway, I got Bibletime & Jsword running fine on my present sword build.

Tom Crawford

Tom Crawford