Closed Bug 217265 Opened 22 years ago Closed 22 years ago

GCC-3.4 build errors due to extra semi colons and '-pedantic' flag in Makefile

Categories

(SeaMonkey :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 218551

People

(Reporter: ahaas, Unassigned)

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.5b) Gecko/20030823 Build Identifier: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.5b) Gecko/20030823 The latest GCC-3.4 development snapshot fails to build Mozilla due to many extra semi-colon characters in the code. When the '-pedantic' flag is passed to the compiler these extra semi-colons generate an error message and the file does not compile. The GCC-3.4 compiler has a new parser that is _much_ more compilant with C++ standards and finds things like the extra semi-colons that earlier versions of GCC overlooked. Reproducible: Always Steps to Reproduce: 1. Install GCC-3.4 development snapshot. 2. Check out mozilla code from CVS. 3. Compile away! If the '-pedantic' flag is seen when compiling C++ code lots of files will fail to compile. Actual Results: I ended up fixing all the files by removing the extra semi-colons. I then went and built Mozilla with GCC-3.3 to test my changes, and the build completed without problems. I'm currently running the 1.5 Beta build and it works, so my changes do not cause older GCC releases to fail when building Mozilla, and will remove many errors that trip up the next GCC release. I have the a large patch set and will upload it. The patch changes almost 400 files - each patch is a trivial removal of one or more semi-colons.
Apply patch by changing into mozilla directory and 'gzip -cd moz-semi-fixes.diff.gz | patch -p0'. Lots of files will get patched ...
Attachment #130388 - Attachment is patch: false
Attachment #130388 - Attachment mime type: text/plain → application/x-gzip
Comment on attachment 130388 [details] Patch to remove extra semi-colons from mozilla code We have several other 3.4 bugs - is there a reason this hasn't shon up before now? I presume this was done mostly via a script. A quick glance through doesn't show anything wrong, so r=bbaetz if this has been tested on an older compiler.
Attachment #130388 - Flags: review?(bbaetz) → review+
Note that I did not look at this patch at all. I am wondering whether there are more places that you missed, Art. Did you build the whole tree? (Including debug, svg, all extensions, etc.?) Or did you run a command against the whole tree which you could paste here?
.
I built the mail/news client, calendar, chatzilla, and the browser itself. I didn't build SVG, and I probably missed other extensions as well. I'm running on an old machine with limited disk space so a build for me takes roughly 12 hours, and that is not a typo. :-( As to how I build, ... 1. Configure like so ... /mnt/src/mozilla/configure \ --with-system-jpeg \ --with-system-png \ --with-system-mng \ --with-system-zlib \ --enable-default-toolkit=gtk2 \ --enable-xft \ --enable-crypto \ --enable-mathml \ --disable-debug \ --enable-optimize='-O2 -march=pentium-mmx -finline-limit=50000' \ --enable-reorder \ --disable-cpp-rtti \ --disable-cpp-exceptions (Yes, mng is gone in 1.5, but I used this command with 1.4 and didn't bother to remove the mng line) 2) make -i > make_out 2>&1 & 3) Go do other things until build finishes 4) grep error: | grep extra > extra.out 5) Read 'extra.out' and check that the errors are all about extra semi colons 6) Use 'extra.out' as input to the hopefully attached Perl script which edits the files and removes the extra semi-colons 7) Go back to step 2 and repeat until build completes with no errors.
*** This bug has been marked as a duplicate of 218551 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
verified. (Art - thanks for doing some work on this, although it didn't end up getting used. Nothing personal, it was just accidentally overlooked unfortunately...)
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: