[sword-devel] Is --enable-debug what I want?

Troy A. Griffitts scribe at crosswire.org
Sat May 16 10:27:19 MST 2009


Dear Dmitrijs,

Yes, --enable-debug is what you want.  New in 1.6.x, this flag turns on 
-Werror which means that warnings should be treated as errors.

You can either fix the warnings, or turn off -Werror (should be easy to 
find in configure.ac)

Oddly, I build with debug turned on all using Jaunty and don't get this 
warning.  Maybe it's only on 32-bit systems?


	-Troy.

Dmitrijs Ledkovs wrote:
> I wanted to create a Debian package with debug symbols in it.
> 
> I've setup packaging and I've also added --enable-debug flag to
> configure. It failed to build from source on all 4 ubuntu releases X 3
> arch with following error:
> 
> 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.0_icu_3.8.1\" -D_FTPLIB_NO_COMPAT
> -D_ICU_ -g3 -O0 -Wall -Werror -D_ICU_ -ftemplate-depth-25
> -DCURLAVAILABLE -I/usr/include -I/usr/lib64 -DUSELUCENE -g -O2 -g
> -Wall -O2 -c ../src/mgr/filemgr.cpp  -fPIC -DPIC -o .libs/filemgr.o
> cc1plus: warnings being treated as errors
> ../src/mgr/filemgr.cpp: In member function 'signed char
> sword::FileMgr::trunc(sword::FileDesc*)':
> ../src/mgr/filemgr.cpp:276: error: ignoring return value of 'ssize_t
> write(int, const void*, size_t)', declared with attribute
> warn_unused_result
> ../src/mgr/filemgr.cpp: In static member function 'static int
> sword::FileMgr::copyFile(const char*, const char*)':
> ../src/mgr/filemgr.cpp:409: error: ignoring return value of 'ssize_t
> write(int, const void*, size_t)', declared with attribute
> warn_unused_result
> make[2]: *** [filemgr.lo] Error 1
> make[2]: Leaving directory `/build/buildd/sword-1.6.0/lib'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/build/buildd/sword-1.6.0'
> make: *** [debian/stamp-makefile-build] Error 2
> dpkg-buildpackage: failure: debian/rules build gave error exit status 2
> 
> 
> 
> 
> without the --enable-debug flag it builds fine (relative part I think is):
> 
> 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.0_icu_4.0.1\" -D_FTPLIB_NO_COMPAT
> -D_ICU_ -O3 -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -I/usr/include
> -I/usr/lib -DUSELUCENE -g -O2 -g -Wall -O2 -c ../src/mgr/filemgr.cpp
> -fPIC -DPIC -o .libs/filemgr.o
> ../src/mgr/filemgr.cpp: In member function 'signed char
> sword::FileMgr::trunc(sword::FileDesc*)':
> ../src/mgr/filemgr.cpp:276: warning: ignoring return value of 'ssize_t
> write(int, const void*, size_t)', declared with attribute
> warn_unused_result
> ../src/mgr/filemgr.cpp: In static member function 'static int
> sword::FileMgr::copyFile(const char*, const char*)':
> ../src/mgr/filemgr.cpp:409: warning: ignoring return value of 'ssize_t
> write(int, const void*, size_t)', declared with attribute
> warn_unused_result
> 
> 
> 
> Is it known that --enable-debug is broken? Do I need it if I want
> debug symbols left within binaries?
> 
> What does it actually do?
> 
> 




More information about the sword-devel mailing list