Closed
Bug 103579
Opened 23 years ago
Closed 23 years ago
Build fails in nsLookAndFeel.cpp with undefined type 'struct nsSize'
Categories
(SeaMonkey :: Build Config, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: Morten, Assigned: netscape)
Details
Attachments
(3 files)
(deleted),
text/plain
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
pavlov
:
review+
|
Details | Diff | Splinter Review |
I'm using a dual Pentium III running a modified Trustix Secure Linux.
building mozilla from cvs, I get the following;
make[4]: Entering directory `/usr/src/mozilla/widget/src/qt'
nsLookAndFeel.cpp
c++ -o nsLookAndFeel.o -c -DOSTYPE=\"Linux2.4\" -DOSARCH=\"Linux\"
-DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP -DOJI -D_IMPL_NS_WIDGET -D_BSD_SOURCE
-I../../../dist/include/xpcom -I../../../dist/include/string
-I../../../dist/include/gfx -I../../../dist/include/layout
-I../../../dist/include/content -I../../../dist/include/dom
-I../../../dist/include/gfx2 -I../../../dist/include/appshell
-I../../../dist/include/pref -I../../../dist/include/uconv
-I../../../dist/include/widget -I../../../dist/include
-I/usr/src/mozilla/dist/include/nspr -I/usr/include -I/usr/include
-I/usr/include -I./../xpwidgets -I. -I../../../gfx/src/qt -I/usr/X11R6/include
-fPIC -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion
-Wpointer-arith -Wbad-function-cast -Wcast-align -Woverloaded-virtual -Wsynth
-pedantic -Wno-long-long -pipe -pthread -DDEBUG -DDEBUG_root -DTRACING -g
-I/usr/local/qt/include -DQT_GENUINE_STR -I/usr/X11R6/include -DMOZILLA_CLIENT
-include ../../../config-defs.h -Wp,-MD,.deps/nsLookAndFeel.pp nsLookAndFeel.cpp
nsLookAndFeel.cpp: In method `nsresult
nsLookAndFeel::GetNavSize(nsILookAndFeel::nsMetricNavWidgetID,
nsILookAndFeel::nsMetricNavFontID, int, nsSize &)':
nsLookAndFeel.cpp:449: invalid use of undefined type `struct nsSize'
../../../dist/include/widget/nsILookAndFeel.h:45: forward declaration of `struct
nsSize'
nsLookAndFeel.cpp:450: invalid use of undefined type `struct nsSize'
../../../dist/include/widget/nsILookAndFeel.h:45: forward declaration of `struct
nsSize'
make[4]: *** [nsLookAndFeel.o] Error 1
make[4]: Leaving directory `/usr/src/mozilla/widget/src/qt'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/usr/src/mozilla/widget/src'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/usr/src/mozilla/widget'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/usr/src/mozilla'
make: *** [build] Error 2
Reporter | ||
Comment 1•23 years ago
|
||
Disabling debug removes the problem, mozilla compiles happily, but won't start...
mortenn@dr_p /usr/src/mozilla/dist/bin$ strace -o ~/strace ./mozilla
./run-mozilla.sh ./mozilla-bin
MOZILLA_FIVE_HOME=/usr/src/mozilla/dist/bin
LD_LIBRARY_PATH=/usr/src/mozilla/dist/bin:/usr/src/mozilla/dist/bin/plugins:/usr/local/qt/lib:/usr/local/qt/lib:
LIBRARY_PATH=/usr/src/mozilla/dist/bin:/usr/src/mozilla/dist/bin/components
SHLIB_PATH=/usr/src/mozilla/dist/bin
LIBPATH=/usr/src/mozilla/dist/bin
ADDON_PATH=/usr/src/mozilla/dist/bin
MOZ_PROGRAM=./mozilla-bin
MOZ_TOOLKIT=
moz_debug=0
moz_debugger=
/usr/src/mozilla/dist/bin/run-mozilla.sh: line 72: 20338 Aborted
$prog ${1+"$@"}
attaching output of strace
Reporter | ||
Comment 2•23 years ago
|
||
Assignee | ||
Comment 3•23 years ago
|
||
Duplicated the build problem. Looks like the forward declaration of 'struct
nsSize' in
http://lxr.mozilla.org/seamonkey/source/widget/public/nsILookAndFeel.h isn't
good enough when actually implementing code that uses it. The fix appears to be
just replacing the forward declaration with a #include "nsSize.h" .
The crash on startup problem could be a number of things. Knowing the exact
build config would help narrow the choices. Also, try generating a backtrace
using gdb. I can't deduce anything from the strace.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 4•23 years ago
|
||
I'll need to install gdb, but in the meantime here's some info about my system:
Dual P-III 700
384 MB PC100 RAM
running on a trustix 1.5 with everything the build page said I needed plus an
upgraded OpenSSL which I did need, but the page didn't mention. (had OpenSSH 1.x)
Reporter | ||
Comment 5•23 years ago
|
||
okay... just how do I make a backtrace? I've never used gdb before
(I have version 5.0)
Assignee | ||
Comment 6•23 years ago
|
||
Which mozilla build options did you use?
See http://www.mozilla.org/unix/debugging-faq.html for info about using gdb.
Reporter | ||
Comment 7•23 years ago
|
||
mortenn@dr_p ~$ cat /root/.mozconfig
# sh
# Build configuration script
#
# See http://www.mozilla.org/build/unix.html for build instructions.
#
# Options for client.mk.
# Options for 'configure' (same as command-line options).
ac_add_options --disable-accessibility
#ac_add_options --disable-debug
#ac_add_options --enable-strip-libs
ac_add_options --enable-crypto
ac_add_options --enable-mathml
ac_add_options --enable-svg
ac_add_options --with-gtk
ac_add_options --with-xlib
ac_add_options --with-qt
ac_add_options --with-jpeg=/usr
ac_add_options --with-zlib=/usr
ac_add_options --with-png=/usr
I'm reading the debug-faq, but I haven't found anything regarding a backtrace yet...
Assignee | ||
Comment 8•23 years ago
|
||
Ok, with those configure options, the crash on startup is probably due to bug
91829. Mozilla cannot run with multiple toolkit components installed at once.
Remove the unwanted toolkit libs or only configure with a single toolkit
rm -f dist/bin/components/*_xlib.so
rm -f dist/bin/components/*_qt.so
Assignee | ||
Comment 9•23 years ago
|
||
Assignee | ||
Comment 10•23 years ago
|
||
Comment 11•23 years ago
|
||
Comment on attachment 53218 [details] [diff] [review]
Keep forward decl & add #include to file that actually uses class
r=pavlov
Attachment #53218 -
Flags: review+
Assignee | ||
Comment 12•23 years ago
|
||
Patch 53218 has been checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 13•23 years ago
|
||
eek! Please don't |#ifdef| |#include|s.
See http://mozilla.org/hacking/portable-cpp.html#dont_ifdef_include .
Reporter | ||
Comment 14•23 years ago
|
||
Opened a new bug on my segfault... Bug 105190
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•