Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 48523 - app-text/sword-1.5.7 compile problems under gcc >=3.3.3-r5
Summary: app-text/sword-1.5.7 compile problems under gcc >=3.3.3-r5
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Jon Hood (RETIRED)
URL:
Whiteboard:
Keywords:
: 51226 (view as bug list)
Depends on:
Blocks: 48528
  Show dependency tree
 
Reported: 2004-04-20 18:03 UTC by Jon Hood (RETIRED)
Modified: 2004-06-23 14:50 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix compilation error (sword-1.5.7-gcc34.patch,551 bytes, patch)
2004-04-28 20:44 UTC, Robert Moss (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Hood (RETIRED) gentoo-dev 2004-04-20 18:03:27 UTC
I'm putting this up as a reminder. I know what the problem is:
http://gcc.gnu.org/onlinedocs/gcc/Name-lookup.html
but I haven't gotten around to fixing it yet.

g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -DUSE_AUTOTOOLS -DUNIX
-DSWICU_DATA=\"/usr/lib/sword/1.5.7_icu_2.8\" -D_ICU_ -O3
-march=pentium4 -funroll-loops -pipe -ftemplate-depth-25 -DCURLAVAILABLE
-MT treekey.lo -MD -MP -MF .deps/treekey.Tpo -c ../src/keys/treekey.cpp
>/dev/null 2>&1
distcc[8083] ERROR: compile on localhost failed
In file included from ../include/swconfig.h:31,
                 from ../include/localemgr.h:28,
                 from ../src/keys/versekey.cpp:21:
../include/multimapwdef.h: In member function `T&
sword::multimapwithdefault<Key, T, Compare>::getWithDefault(const Key&,
const T&)':
../include/multimapwdef.h:15: error: there are no arguments to `end'
that depend on a template parameter, so a declaration of `end' must be
available
../include/multimapwdef.h:15: error: (if you use `-fpermissive', G++
will accept your code, but allowing the use of an undeclared name is
deprecated)
../include/multimapwdef.h: In member function `T&
sword::multimapwithdefault<Key, T, Compare>::operator[](const Key&)':
../include/multimapwdef.h:22: error: there are no arguments to `end'
that depend on a template parameter, so a declaration of `end' must be
available
make[2]: *** [versekey.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f .libs/treekey.lo treekey.lo
make[2]: Leaving directory
`/var/tmp/portage/sword-1.5.7/work/sword-1.5.7/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/sword-1.5.7/work/sword-1.5.7'
make: *** [all] Error 2

If you do use -fpermissive, any applications compiled against the sword libraries will segfault or return errors.
Comment 1 Jon Hood (RETIRED) gentoo-dev 2004-04-20 18:08:37 UTC
also this may have something to do with:
http://gcc.gnu.org/ml/gcc-bugs/2003-07/msg01815.html
Comment 2 Travis Tilley (RETIRED) gentoo-dev 2004-04-22 04:41:31 UTC
try append-flags -fno-unit-at-a-time -fpermissive maybe?
Comment 3 Jon Hood (RETIRED) gentoo-dev 2004-04-22 13:05:56 UTC
append-flags -fno-unit-at-a-time -fpermissive
programs still segfault though they will build; programs built with the libraries will fail to run.
Comment 4 Robert Moss (RETIRED) gentoo-dev 2004-04-28 20:44:57 UTC
Created attachment 30296 [details, diff]
Patch to fix compilation error

This fixes compilation under GCC 3.4.0, and things don't segfault.

This is good :-)
Comment 5 Jon Hood (RETIRED) gentoo-dev 2004-04-28 21:54:25 UTC
And of course bibletime and gnomesword fail when sword is compiled with this patch. So does diatheke with certain params. We're definitely on the right track now though, thanks :).
Comment 6 Robert Moss (RETIRED) gentoo-dev 2004-04-30 18:19:45 UTC
Seeing as this patch is tested and working (even though bibletime and gnomesword are seperately broken) shouldn't this be in portage by now? Not wanting to be pushy, just wondering what the reason is. Still working on gnomesword, it's my last bastion of hopelessness!
Comment 7 Jon Hood (RETIRED) gentoo-dev 2004-04-30 19:45:14 UTC
I'm having some compiler trouble here. Tomorrow I'll test the patch with gcc-3.3.3 and if bibletime/gnomesword/diatheke work correctly, your patch will be put in.

If bibletime/gnomesword/diatheke do not work, there's really no point in applying this patch, as it'll just break everything. It's a temporary fix for *compiling* on gcc-3.4. The programs themselves are still totally botched. There has to be some other thing we're missing in the sword package that's causing mass breakage, and I'd like to try to find that first.
Comment 8 David Blue 2004-05-01 09:37:23 UTC
If we get a working patch send it upstream to the sword developers I know that gcc3.4 issues plague cvs too.
Comment 9 Jon Hood (RETIRED) gentoo-dev 2004-05-01 19:45:51 UTC
The gcc-3.4 compile-time patch is now in portage BUT I don't want to close this bug. Getting a program to compile and getting a program to run correctly are two different things. SWORD programs provided by this package are still totally b0rked, and we need to try to get them fixed.
Comment 10 Robert Moss (RETIRED) gentoo-dev 2004-05-03 19:17:22 UTC
Jon, this patch will allow compilation on GCC 3.4.0. Further to that, gnomesword will compile, link against and run nicely if you use GCC 3.3.3 for it, even if you use 3.4.0 for sword itself. So the patch is valid, unless I'm missing something big; the broken packages are gnomesword, bibletime and diatheke, not sword itself. Am I right?
Comment 11 Jon Hood (RETIRED) gentoo-dev 2004-05-03 19:36:50 UTC
I think you're right. None of the applications would compile against a gcc-3.4 compiled sword on my computer because....I had bad ram! I'm now on a working computer and everything seems to be going good. Thanks for the patch, sorry for all the confusion, and if anyone offers you a cheap compaq laptop, check the ram because gcc will do funny things with b0rked ram ;).
Comment 12 Robert Moss (RETIRED) gentoo-dev 2004-05-03 19:46:26 UTC
For what it's worth, I've moved hell and high water to try to get gnomesword to compile and not segfault using GCC 3.4.0. I can get it to compile with no problems, but running it is a different matter entirely. And yet, when I drop back to 3.3.3 (this is the only reason I still have 3.3.3 on my system - in case I make another botched attempt at a gnomesword patch and need to recompile vanilla gnomesword) it works flawlessly.

How annoying!
Comment 13 Jon Hood (RETIRED) gentoo-dev 2004-05-04 16:00:46 UTC
Reopening bug- there is still a problem with the sword library itself under gcc 3.4. The other programs fail because of the sword header files being messed up.

EDIT: CFLAGS > -O0 seem to mess it up; can you tell me if compiling sword without any -O optimiazations causes things to magically work correctly?
Comment 14 Robert Moss (RETIRED) gentoo-dev 2004-05-04 16:49:46 UTC
Weird! Certainly, I'll take a look.
Comment 15 Robert Moss (RETIRED) gentoo-dev 2004-05-04 17:13:52 UTC
Well bugger me with a spade. Compiling both sword and gnomesword with -O0 allows the programme to run. I'll investigate further and see if I can find out which flag is killing things.
Comment 16 Robert Moss (RETIRED) gentoo-dev 2004-06-06 10:48:05 UTC
Well I have no idea. How strange. I'm using a CVS ebuild for both SWORD and GnomeSWORD and all is well! I'm not sure whether this is due to updated GCC or update SWORD/GnomeSWORD - all I know is that it works! The current "stable" versions still don't work, however.

The ebuilds are available in my overlay - if you want to use CVS rather than making your own snapshot and bumping the version, you'll have to get sword-cvs, gnomesword-cvs and sword-modules. Enjoy...

http://home.jesus.ox.ac.uk/~rmoss/portage/local/app-text/
Comment 17 Jon Hood (RETIRED) gentoo-dev 2004-06-15 17:08:29 UTC
we'll have to wait for the sword-1.5.8 release and frontend updates for this one. Bibletime does not compile with a cvs snapshot of sword.
Comment 18 Jon Hood (RETIRED) gentoo-dev 2004-06-15 17:10:09 UTC
*** Bug 51226 has been marked as a duplicate of this bug. ***
Comment 19 Jon Hood (RETIRED) gentoo-dev 2004-06-23 14:50:54 UTC
Finally fixed in portage.