Closed Bug 165558 Opened 22 years ago Closed 19 years ago

building with --disable-logging and GTK2 default widget fails to compile

Categories

(Firefox Build System :: General, defect)

x86
Linux
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8beta3

People

(Reporter: masataka, Assigned: browser-china-gtk2)

References

Details

Attachments

(3 files, 4 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826

Using v1.1 release tarball.  Using these configure options:

--prefix=/usr/mozilla
--with-pthreads
--with-system-jpeg
--with-system-zlib
--with-system-png
--enable-default-toolkit=gtk2
--disable-toolkit-gtk
--disable-toolkit-qt
--disable-gtktest
--enable-freetype2
--enable-xft
--enable-optimize=-O2
--enable-xinerama
--disable-tests
--disable-debug
--disable-logging
--enable-strip
--enable-default-mozilla-five-home=/usr/mozilla
--disable-libIDLtest
--disable-glibtest

The build fails in widget/src/gtk2/nsWindow.cpp.  It didn't seem to error out
anything useful.  It gave a bunch of warnings and some C++ code forbidden
notices but nothing to indicate anything that would error out like that.  Am I
missing anything?  If I leave out the --disable-logging, it compiles as normal.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.

Actual Results:  
Compile fails at widget/src/nsWindow.cpp

Expected Results:  
It should've compile.


I'm flagging this as minor since the simple workaround to this is removing the
--disable-logging option.  But I would like to have used it otherwise.
Over to the gtk2 guys.  The LOG() macros should be wrapped in PR_LOGGING ifdefs.
Assignee: seawood → john.sun
Hmm, I was using PR_FORCE_LOGGING - or at least I thought I was.
Blocks: gtk2
The header need to be included anyway. #define FORCE_PR_LOG will enable/disable
it.
This is how it's done in other files in mozilla tree. 
I did this patch some time ago and I thought to have submitted a bug. Will mark
as dup if I find it ;)
Comment on attachment 97229 [details] [diff] [review]
include prlog.h also with --disable-logging

If you make that change, you'll need to remove gWidgetLog from the PR_LOGGING
ifdef at
http://lxr.mozilla.org/seamonkey/source/widget/src/gtk2/nsAppShell.cpp#55 as
well.
Attachment #97229 - Flags: needs-work+
You are right. And I missed your previous comment about wrapping LOG() in
PR_LOGGING. I should read all comments before submitting stuff.
I guess I'll let blizzard decide how he wants to fix this :)
I think that this patch is better. It works and it really disables logging, if
--disable-logging is used. ( The other patch doesn't seem to disable logging
... )
Build still fails at same place unless patched, with CVS (checked out 11/18/2002
3:50PM EST) and MOZILLA_1_2_BRANCH source.  Any updates on this?  It hasn't been
filed as a dup yet.
-> change owner
Assignee: john.sun → browser-china-gtk2
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch Updated attempted fix (obsolete) — Splinter Review
I copied the structure from dom/src/base/nsJSEnvironment.cpp so it should be
correct.
the attached patch was suggestd by timeless in #mozilla.
he seend to feel that a include file race was being triggered,
and moving the include order fixed this.
Build works after patch is applied.
Attached patch patchSplinter Review
Or, even better, just remove the MOZ_LOGGING since we're using FORCE_PR_LOG.
Attachment #97229 - Attachment is obsolete: true
Attachment #102695 - Attachment is obsolete: true
Attachment #107579 - Attachment is obsolete: true
Attachment #107674 - Attachment is obsolete: true
Fixed.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
That's the wrong fix.  The MOZ_LOGGING ifdef is needed so that we can disable
the logging using --disable-logging.  The FORCE_PR_LOG define should always be
wrapped inside a MOZ_LOGGING ifdef.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I recently built LFS CVS 20030219 and now I'm working on BLFS CVS 20030404. I
have run into the same problem using gtk+ 2.2.1 source and mozilla 1.2.1 source
with logging disabled.

Error message:

nsWindow.cpp: In destructor `virtual nsWindow::~nsWindow()':
nsWindow.cpp:301: `gWidgetLog' undeclared (first use this function)
nsWindow.cpp:301: (Each undeclared identifier is reported only once for each 
   function it appears in.)
nsWindow.cpp:301: warning: left-hand operand of comma expression has no effect
nsWindow.cpp:301: `PR_LOG' undeclared (first use this function)
nsWindow.cpp: In member function `virtual nsresult nsWindow::Destroy()':

...

nsWindow.cpp: In function `void IM_preedit_changed_cb(GtkIMContext*, 
   nsWindow*)':
nsWindow.cpp:3469: warning: left-hand operand of comma expression has no effect
nsWindow.cpp:3469: warning: left-hand operand of comma expression has no effect
make[4]: *** [nsWindow.o] Error 1
make[4]: Leaving directory `/usr/src/lfs/mozilla/build/widget/src/gtk2'
make[3]: *** [libs] Error 2
make[3]: Leaving directory `/usr/src/lfs/mozilla/build/widget/src'
make[2]: *** [libs] Error 2
make[2]: Leaving directory `/usr/src/lfs/mozilla/build/widget'
make[1]: *** [libs] Error 2
make[1]: Leaving directory `/usr/src/lfs/mozilla/build'
make: *** [all] Error 2

I will try again with logging enabled.
Removing --disable-logging from the config options solved my problem.
Working on this is going to be waaaay down on my todo list.  If you give me a
patch, though...
Product: Browser → Seamonkey
Attachment #185416 - Flags: review?(blizzard)
Product: Mozilla Application Suite → Core
Attachment #185416 - Flags: review?(blizzard) → review+
Attachment #185416 - Flags: superreview?(roc)
Attachment #185416 - Flags: superreview?(roc) → superreview+
Attachment #185416 - Flags: approval1.8b3?
Comment on attachment 185416 [details] [diff] [review]
Disable widget logging when given --disable-logging

a=chofmann
Attachment #185416 - Flags: approval1.8b3? → approval1.8b3+
Checking in widget/src/gtk2/nsCommonWidget.h;
/cvsroot/mozilla/widget/src/gtk2/nsCommonWidget.h,v  <--  nsCommonWidget.h
new revision: 1.24; previous revision: 1.23
Status: REOPENED → RESOLVED
Closed: 22 years ago19 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8beta3
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: