Closed
Bug 429747
Opened 17 years ago
Closed 15 years ago
Fails to build with system hunspell 1.2
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: glandium, Unassigned)
Details
Attachments
(2 files)
4.85 KB,
patch
|
Details | Diff | Splinter Review | |
160.69 KB,
application/x-gzip
|
Details |
The change to config/config.mk in bug #412320, that has not been backed out, is provoking subtle problems with system hunspell.
What happens is that mozHunspell.o gets built with (simplified) -I. -I/usr/include/hunspell.
Now, the problem is that hunspell 1.2 defines Hunspell::Hunspell as follows:
Hunspell(const char * affpath, const char * dpath, const char * key = NULL);
While hunspell 1.1 (included in mozilla tree) defines it as follows:
Hunspell(const char * affpath, const char * dpath);
The result is that mozHunspell.o needs the Hunspell::Hunspell(const char * affpath, const char * dpath) symbol, and linking libxul with -lhunspell-1.2 fails because it only contains Hunspell::Hunspell(const char * affpath, const char * dpath, const char * key).
Now, simply reverting the change and removing -I$(srcdir) -I. from REQ_INCLUDES might lead embedded hunspell to fail to build in VPATH setups (though I haven't tested, I guess this would happen because of the #include <hunspell.hxx>), so maybe -I$(srcdir) should only be added if srcdir is not ".".
What do you think?
Reporter | ||
Comment 1•17 years ago
|
||
(In reply to comment #0)
> Now, simply reverting the change and removing -I$(srcdir) -I. from REQ_INCLUDES
> might lead embedded hunspell to fail to build in VPATH setups (though I
> haven't tested, I guess this would happen because of the #include
> <hunspell.hxx>), so maybe -I$(srcdir) should only be added if srcdir is not
> ".".
This wouldn't work either, actually... Reordering includes would be the only solution, I guess...
Comment 2•17 years ago
|
||
Benjamin, does the config/config.mk change in bug 412320 need to be backed out since that bug was WONTFIX'd and backed out?
Comment 3•17 years ago
|
||
No, I left that change in on purpose and want it to remain. The "correct" solution to this problem is to separate the hunspell library from the XPCOM glue:
extensions/spellcheck/hunspell
extensions/spellcheck/build
Comment 4•17 years ago
|
||
I've created a patch doing it (almost) this way.
I've seperated the hunspell sources to
extensions/spellcheck/hunspell/hunspell and left the XPCOM glue in spellcheck/hunspell/src.
I'm attaching the patch which looks quite large because of the actual file moves.
It works correctly in initial testing.
Not sure if it's quite ready so not requesting review explicitely but anyway I'm interested in feedback.
Comment 5•17 years ago
|
||
my original patch is too big to attach so I splitted into actual changes and a patch containing the file moves.
Comment 6•17 years ago
|
||
Updated•17 years ago
|
Flags: blocking1.9?
Comment 7•17 years ago
|
||
Wolfgang, if the other patch is just file moves, it's probably easier to attach the commands you used to generate the moves for easier reviewing.
Comment 8•17 years ago
|
||
in extensions/spellcheck/hunspell:
mkdir hunspell
cd src
mv \
affentry.cpp \
affentry.hxx \
affixmgr.cpp \
affixmgr.hxx \
atypes.hxx \
baseaffix.hxx \
csutil.cpp \
csutil.hxx \
hashmgr.cpp \
hashmgr.hxx \
htypes.hxx \
hunspell.cpp \
hunspell.h \
hunspell.hxx \
langnum.hxx \
phonet.cpp \
phonet.hxx \
README.hunspell \
suggestmgr.cpp \
suggestmgr.hxx \
../hunspell
Updated•17 years ago
|
Flags: blocking1.9? → blocking1.9-
Comment 9•17 years ago
|
||
I use this patch:
http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/3.0_rc1/100-system-hunspell-corrections.patch?view=markup
Is not mine, though :)
Reporter | ||
Comment 10•15 years ago
|
||
This is not needed anymore, as a side effect of the internal hunspell now being version 1.2+. What should be the resolution status ? WFM ?
Comment 11•15 years ago
|
||
Yeah, WFM is fine.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•