Closed Bug 280901 Opened 21 years ago Closed 21 years ago

Mozilla build fails when trying to build in mozilla/extensions/spellcheck/myspell/src directory.

Categories

(Core :: Spelling checker, defect)

DEC
OSF/1
defect
Not set
blocker

Tracking

()

RESOLVED FIXED
mozilla1.8beta1

People

(Reporter: laxmi.harikumar, Assigned: mscott)

Details

Attachments

(3 files)

User-Agent: Mozilla/5.0 (X11; U; OSF1 alpha; en-US; rv:1.8b) Gecko/20050202 Build Identifier: Mozilla/5.0 (X11; U; OSF1 alpha; en-US; rv:1.8b) Gecko/20050202 In mozilla/extensions/spellcheck/myspell/src, the build fails with the following error: cxx: Error: affentry.cpp, line 3: could not open source file "cctype" #include <cctype> -----------------^ cxx: Error: affentry.cpp, line 4: could not open source file "cstring" #include <cstring> ------------------^ cxx: Error: affentry.cpp, line 5: could not open source file "cstdlib" #include <cstdlib> ------------------^ cxx: Error: affentry.cpp, line 6: could not open source file "cstdio" #include <cstdio> -----------------^ cxx: Error: affixmgr.hxx, line 11: could not open source file "cstdio" #include <cstdio> -----------------^ cxx: Error: affixmgr.hxx, line 58: identifier "FILE" is undefined int parse_reptable(char * line, FILE * af); -----------------------------------^ cxx: Error: affixmgr.hxx, line 59: identifier "FILE" is undefined int parse_maptable(char * line, FILE * af); -----------------------------------^ cxx: Error: affixmgr.hxx, line 60: identifier "FILE" is undefined int parse_affix(char * line, const char at, FILE * af); -----------------------------------------------^ cxx: Error: affentry.cpp, line 29: identifier "memcpy" is undefined memcpy(&conds[0],&dp->conds[0],SETSIZE*sizeof(conds[0])); --^ cxx: Error: affentry.cpp, line 30: identifier "NULL" is undefined next = NULL; ---------^ cxx: Error: affentry.cpp, line 39: identifier "free" is undefined if (appnd) free(appnd); ---------------^ cxx: Error: affentry.cpp, line 40: identifier "free" is undefined if (strip)free(strip); ---------------^ cxx: Error: affentry.cpp, line 165: identifier "NULL" is undefined pmyMgr = NULL; -------------^ cxx: Error: affentry.cpp, line 187: identifier "strcpy" is undefined strcpy(tword,word); --------------^ cxx: Error: affentry.cpp, line 200: identifier "NULL" is undefined return NULL; ------------^ cxx: Error: affentry.cpp, line 220: identifier "NULL" is undefined return NULL; ---------------^ cxx: Info: Error limit reached. cxx: Info: 30 errors detected in the compilation of "affentry.cpp". Info: Compilation terminated. gmake[1]: *** [affentry.o] Error 1 gmake[1]: Leaving directory `/usr4/dailybld/mozilla/extensions/spellcheck/myspell/src' Reproducible: Always Steps to Reproduce: 1.build in mozilla/extensions/spellcheck/myspell/src 2. 3. Actual Results: Build failed Expected Results: Build should have been completed without any errors and libmyspell.so created.
Attached patch Suggested fix — — Splinter Review
Attached patch Suggested fix — — Splinter Review
cxx (native Tru64 Unix compiler) is used to build Mozilla in Tru64 Unix. It does not have support for the files cctype.h, cstring.h, cstdio.h etc. As a result the build fails. One suggestion is to use cstype.h, string.h, stdio.h etc instead of cctype.h, cstring.h, cstdio.h. This solves the problem for Tru64. I am attaching the patch for the suggested fix here (comment #3).
Confirming. Scott, mvl, that code seems to be violating item 5 in the portability guidelines (http://www.mozilla.org/hacking/portable-cpp.html) (in fact, these headers don't have a .h on my system, which makes them immediately suspect).
Severity: critical → blocker
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #173252 - Flags: superreview?(mscott)
Attachment #173252 - Flags: review?(mvl)
We should probably get rid of the occurrences "using namespace std" as well. This probably doesn't compile on a whole bunch of compilers that we support. spellcheck should also be listed in MOZ_EXTENSIONS_ALL in configure.in so that it's tested by people building with --enable-extensions=all. But that probably shouldn't happen until it's a little more portable.
Comment on attachment 173252 [details] [diff] [review] Suggested fix Please add a note to readme.mozilla about this change. With that, r=mvl
Attachment #173252 - Flags: review?(mvl) → review+
(In reply to comment #5) > We should probably get rid of the occurrences "using namespace std" as well. All the occurences of that in spellcheck are either commented out, or #ifdef sun (bug 278672)
Same problem while compiling on IRIX gmake[4]: Leaving directory `/usr/local/mozilla/obj-mips-sgi-irix6.5-1.8a/extensions/spellcheck/idl' gmake[4]: Entering directory `/usr/local/mozilla/obj-mips-sgi-irix6.5-1.8a/extensions/spellcheck/myspell' gmake[5]: Entering directory `/usr/local/mozilla/obj-mips-sgi-irix6.5-1.8a/extensions/spellcheck/myspell/src' affentry.cpp Building deps for ../../../../../extensions/spellcheck/myspell/src/affentry.cpp CC -o affentry.o -c -DOSTYPE=\"IRIX6\" -DOSARCH=\"IRIX\" -DHAVE_DEPENDENT_LIBS -I../../../../dist/include/xpcom -I../../../../dist/include/string -I../../../../dist/include/uconv -I../../../../dist/include/unicharutil -I../../../../dist/include/spellchecker -I../../../../dist/include/myspell -I../../../../dist/include -I/usr/local/mozilla/obj-mips-sgi-irix6.5-1.8a/dist/include/nspr -I. -KPIC -LANG:exceptions=OFF -woff 3262 -G 4 -LANG:std -n32 -DNDEBUG -DTRIMMED -DMOZILLA_VERSION=\"1.8b\" -DIRIX=1 -DNSCAP_DISABLE_DEBUG_PTR_TYPES=1 -DD_INO=d_ino -DSTDC_HEADERS=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_SIGINFO_T=1 -DHAVE_INT16_T=1 -DHAVE_INT32_T=1 -DHAVE_INT64_T=1 -DHAVE_UINT=1 -DHAVE_UINT_T=1 -DHAVE_UINT16_T=1 -DHAVE_DIRENT_H=1 -DHAVE_GETOPT_H=1 -DHAVE_MEMORY_H=1 -DHAVE_UNISTD_H=1 -DHAVE_NL_TYPES_H=1 -DHAVE_MALLOC_H=1 -DHAVE_X11_XKBLIB_H=1 -DHAVE_SYS_STATVFS_H=1 -DHAVE_SYS_STATFS_H=1 -DHAVE_SYS_CDEFS_H=1 -DHAVE_LIBM=1 -DHAVE_LIBDL=1 -DHAVE_LIBSOCKET=1 -DFUNCPROTO=15 -DHAVE_XSHM=1 -DHAVE_RANDOM=1 -DHAVE_STRERROR=1 -DHAVE_LCHOWN=1 -DHAVE_FCHMOD=1 -DHAVE_SNPRINTF=1 -DHAVE_MEMMOVE=1 -DHAVE_RINT=1 -DHAVE_STAT64=1 -DHAVE_LSTAT64=1 -DHAVE_FLOCKFILE=1 -DHAVE_LOCALTIME_R=1 -DHAVE_STRTOK_R=1 -DHAVE_LANGINFO_CODESET=1 -DHAVE_I18N_LC_MESSAGES=1 -DMOZ_DEFAULT_TOOLKIT=\"gtk\" -DMOZ_WIDGET_GTK=1 -DMOZ_ENABLE_XREMOTE=1 -DMOZ_X11=1 -DMOZ_BUILD_APP=suite -DMOZ_DISTRIBUTION_ID=\"org.mozilla\" -DMOZ_ENABLE_COREXFONTS=1 -DMOZ_EXTRA_X11CONVERTERS=1 -DOJI=1 -DIBMBIDI=1 -DMOZ_VIEW_SOURCE=1 -DACCESSIBILITY=1 -DMOZ_XPINSTALL=1 -DMOZ_JSLOADER=1 -DMOZ_XTF=1 -DMOZ_MATHML=1 -DMOZ_LOGGING=1 -DMOZ_USER_DIR=\".mozilla\" -DMOZ_XUL=1 -DMOZ_PROFILESHARING=1 -DMOZ_PROFILELOCKING=1 -DMOZ_DLL_SUFFIX=\".so\" -DXP_UNIX=1 -DUNIX_ASYNC_DNS=1 -DJS_THREADSAFE=1 -DNS_PRINT_PREVIEW=1 -DNS_PRINTING=1 -DMOZILLA_LOCALE_VERSION=\"1.8b\" -DMOZILLA_REGION_VERSION=\"1.8b\" -DMOZILLA_SKIN_VERSION=\"1.5\" -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT ../../../../../extensions/spellcheck/myspell/src/affentry.cpp cc-1005 CC: ERROR File = ../../../../../extensions/spellcheck/myspell/src/affentry.cpp, Line = 3 The source file "cctype" is unavailable. #include <cctype> ^ 1 catastrophic error detected in the compilation of "../../../../../extensions/spellcheck/myspell/src/affentry.cpp". Compilation terminated. gmake[5]: *** [affentry.o] Error 2 gmake[5]: Leaving directory `/usr/local/mozilla/obj-mips-sgi-irix6.5-1.8a/extensions/spellcheck/myspell/src' gmake[4]: *** [libs] Error 2 gmake[4]: Leaving directory `/usr/local/mozilla/obj-mips-sgi-irix6.5-1.8a/extensions/spellcheck/myspell' gmake[3]: *** [libs] Error 2 gmake[3]: Leaving directory `/usr/local/mozilla/obj-mips-sgi-irix6.5-1.8a/extensions/spellcheck' gmake[2]: *** [libs] Error 2 gmake[2]: Leaving directory `/usr/local/mozilla/obj-mips-sgi-irix6.5-1.8a/extensions' gmake[1]: *** [tier_94] Error 2 gmake[1]: Leaving directory `/usr/local/mozilla/obj-mips-sgi-irix6.5-1.8a' gmake: *** [default] Error 2 # ../configure --disable-optimize --disable-debug --enable-nspr-autoconf --enable-crypto --enable-ldap --enable-ldap-experimental --enable-xsl --enable-mathml --with-extensions=irc,transformiix,xml-rpc,xmlextras,xmlterm --disable-gle --disable-dtd-debug --disable-tests --disable-gtktest --disable-libIDLtest --disable-glibtest --enable-application=suite
Comment on attachment 173252 [details] [diff] [review] Suggested fix These files are direct copies from the Open Office.org CVS repository which hosts the myspell engine that we also use. We now periodically copy those files back over these when myspell gets updated with new features. Please update readme.mozilla with a clear description of which files were changed and what the change was. Otherwise, the next time I copy over the myspell files I'll end up causing this bug all over again.
Attachment #173252 - Flags: superreview?(mscott) → superreview+
Is there a reason that we don't use a CVS vendor branch for tracking the upstream myspell? That would make it easier to track -- I dare not say "automate the tracking of" -- local changes such as these.
Laxmi Harikumar, can you make the readme.mozilla changes Scott asked for?
somehow the build system fails if the cpp files aren't name .cpp but .cxx. And the OOo tree uses .cxx. Would a cvs import work with that change?
I am attaching the changes for mozilla/extensions/spellcheck/myspell/src/README.mozilla. It lists the files that have changed and also the changes in them.
This file lists the changes for README.mozilla. It lists the files that have changed and also the changes to each file.
that looks great. Thanks a lot.
Scott, can you handle landing this? Or should I?
fixed
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8beta1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: