Closed Bug 318041 Opened 19 years ago Closed 18 years ago

disable-xul doesn't build because minimo uses toolkit

Categories

(Firefox Build System :: General, defect, P2)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: ext-andre.pedralho, Assigned: benjamin)

References

Details

Attachments

(1 file, 2 obsolete files)

I've tried to build the minimo source code with the ac_add_option --disable-xul set. Unfortunately, an error occurs when it is compiling the nsAutoCompleteController. It makes a request to nsITreeView.h, that is generated by the .idl inside layout/xul/base/src/tree/src.
We are able to compile this and partly solve the problem, 'cause after this the error is compiling nsTreeBodyFrame, that we can't just compile (there are another dependences).

My mozconfig is:
mk_add_options MOZ_CO_PROJECT=osso-browser-mozilla-engine
ac_add_options --enable-application=minimo

ac_add_options --prefix=/usr/

# use GTK+-2 widget set with XFT font rendering
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-xft
ac_add_options --disable-freetype2
ac_add_options --disable-xul

ac_add_options --enable-optimize=-Os
ac_add_options --enable-strip
ac_add_options --disable-debug
ac_add_options --enable-reorder
ac_add_options --enable-elf-dynstr-gc

# enable static build
#ac_add_options --disable-shared
#ac_add_options --enable-static

# remove link dependency on libstdc++.so
LIBS=-lsupc++
CXX=gcc

My code was downloaded november 25, 2005.
Why are you using --disable-xul? That's not currently supported in minimo, which uses XUL to define the UI.

This looks like a case of "don't do that" to me...
benjamin, they are interested in the moz embed gtk widget, not minimo the application.  disable-xul should still work.

Andre, without a stack trace, i can't help.
(In reply to comment #2)
> benjamin, they are interested in the moz embed gtk widget, not minimo the
> application.  disable-xul should still work.
> 
> Andre, without a stack trace, i can't help.
> 

Here is the header of the error message (there are more after these, all of them related to the nsAutoCompleteController.cpp):

make[4]: Entering directory `/home/asp/mozilla-cvs/osso-browser-mozilla-engine/toolkit/components/autocomplete/src'
nsAutoCompleteController.cpp
gcc -o nsAutoCompleteController.o -c  -DMOZILLA_INTERNAL_API -DOSTYPE=\"Linux2.6\" -DOSARCH=\"Linux\" -DBUILD_ID=0000000000  -I../../../../dist/include/xpcom -I../../../../dist/include/string -I../../../../dist/include/dom -I../../../../dist/include/layout -I../../../../dist/include/mork -I../../../../dist/include/unicharutil -I../../../../dist/include/autocomplete -I../../../../dist/include -I../../../../dist/include/nspr    -I../../../../dist/sdk/include -I/usr/X11R6/include   -fPIC  -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -ffunction-sections -Os  -I/usr/X11R6/include -DMOZILLA_CLIENT -include ../../../../mozilla-config.h -Wp,-MD,.deps/nsAutoCompleteController.pp nsAutoCompleteController.cpp
In file included from nsAutoCompleteController.cpp:42:
nsAutoCompleteController.h:48:25: nsITreeView.h: No such file or directory
nsAutoCompleteController.h:49:30: nsITreeSelection.h: No such file or directory
In file included from nsAutoCompleteController.cpp:42:
nsAutoCompleteController.h:57: error: parse error before `{' token
nsAutoCompleteController.h:59: error: virtual outside class declaration
nsAutoCompleteController.h:59: error: virtual outside class declaration
nsAutoCompleteController.h:59: error: parse error before `protected'
nsAutoCompleteController.h:60: error: virtual outside class declaration
the autocomplete widget requires nsITreeView.h et. al.  You need to disable this component from building.
Summary: disable-xul crashes mozilla compilation → disable-xul doesn't build because minimo uses toolkit
Product: Minimo → Core
Version: unspecified → Trunk
(In reply to comment #4)
> the autocomplete widget requires nsITreeView.h et. al.  You need to disable
> this component from building.
> 

Ok! I've looked in the configure.in inside the mozilla source base and saw that the ac_add_option --disable-xul just remove some extensions that requires XUL:

dnl ========================================================
dnl disable xul
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(xul,
[  --disable-xul           Disable XUL],
    MOZ_XUL= )
if test "$MOZ_XUL"; then
  AC_DEFINE(MOZ_XUL)
else
  dnl remove extensions that require XUL
  MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's/inspector//' -e 's/venkman//' -e 's/irc//' -e 's/tasks//'`
fi

AC_SUBST(MOZ_XUL)

However, inside the toolkit/components there is a Makefile that try to compile the autocomplete subfolder. However it just try to do it when the application is a XUL application (e.g. Minimo). Look ahead:

# These component dirs are built only for XUL apps

ifdef MOZ_XUL_APP
DIRS += \
	alerts \
	console \
	filepicker \
	printing \
	viewsource \
	viewconfig \
	$(NULL)

ifndef MOZ_THUNDERBIRD
DIRS +=	\
	autocomplete \
	cookie \
	help \
	history \
	passwordmgr \
	satchel \
	typeaheadfind \
	$(NULL)
endif # MOZ_THUNDERBIRD

ifdef MOZ_XPINSTALL
DIRS +=	downloads
endif

DIRS += \
	commandlines \
	startup \
	build \
	$(NULL)

EXTRA_PP_COMPONENTS = nsDefaultCLH.js

endif # MOZ_XUL_APP


So, if I'll compile Minimo, even if I set the disable-xul in the mozconfig, it will try to compile xul components, it'll just remove the xul extensions.
is MOZ_XUL_APP set for you?  Maybe if you set application to minimo, and set --disable-xul, MOZ_XUL_APP is still defined?
(In reply to comment #6)
> is MOZ_XUL_APP set for you? 
No, it isn't.

> Maybe if you set application to minimo, and set
> --disable-xul, MOZ_XUL_APP is still defined?
> 
Yes, it is. I put the following lines in the tail of the mozilla_src/configure file:

if test "$MOZ_XUL_APP"; then {
	echo $MOZ_XUL_APP
	echo "still set!!"
	}
else
	echo "isn't set!!";
fi

The result was:
.
.
.
creating pr/src/threads/Makefile
creating pr/tests/Makefile
creating pr/tests/dll/Makefile
creating pr/src/pthreads/Makefile
configure: warning: Recreating autoconf.mk with updated nspr-config output
1
still set!!
(In reply to comment #7)
> (In reply to comment #6)
> > is MOZ_XUL_APP set for you? 
> No, it isn't.
> 
> > Maybe if you set application to minimo, and set
> > --disable-xul, MOZ_XUL_APP is still defined?
> > 
> Yes, it is. I put the following lines in the tail of the mozilla_src/configure
> file:
> 
> if test "$MOZ_XUL_APP"; then {
>         echo $MOZ_XUL_APP
>         echo "still set!!"
>         }
> else
>         echo "isn't set!!";
> fi
> 
> The result was:
> .
> .
> .
> creating pr/src/threads/Makefile
> creating pr/tests/Makefile
> creating pr/tests/dll/Makefile
> creating pr/src/pthreads/Makefile
> configure: warning: Recreating autoconf.mk with updated nspr-config output
> 1
> still set!!
> 


And if I unset the MOZ_XUL_APP when using disable-xul? I can change the configure file to do it.

configure file before changes (line 18423):

# Check whether --enable-xul or --disable-xul was given.
if test "${enable_xul+set}" = set; then
  enableval="$enable_xul"
  if test "$enableval" = "no"; then
    MOZ_XUL= 
  elif test "$enableval" = "yes"; then
    :
  else
    { echo "configure: error: Option, xul, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi

configure file after changes (line 18423): 

# Check whether --enable-xul or --disable-xul was given.
if test "${enable_xul+set}" = set; then
  enableval="$enable_xul"
  if test "$enableval" = "no"; then {
    MOZ_XUL= 
    MOZ_XUL_APP=
  }
  elif test "$enableval" = "yes"; then
    :
  else
    { echo "configure: error: Option, xul, does not take an argument ($enableval)." 1>&2; exit 1; }
  fi
fi

Actually, I've tried this! It was compiling well... but I got a new error compiling the remote toolkit component! It is enabled to compile when we set the ac_add_options --enable-default-toolkit=gtk2. 
The error gotten is related to the nsICommandLineRunner.h and to the nsXULAppAPI.h, those have not been compiled yet.
The stack error beggins like this:

make[2]: Entering directory `/home/asp/mozilla-cvs/osso-browser-mozilla-engine-0.2.2/toolkit/components'
make[3]: Entering directory `/home/asp/mozilla-cvs/osso-browser-mozilla-engine-0.2.2/toolkit/components/remote'
nsGTKRemoteService.cpp
gcc -o nsGTKRemoteService.o -c  -DMOZILLA_INTERNAL_API -DOSTYPE=\"Linux2.6\" -DOSARCH=\"Linux\" -DBUILD_ID=0000000000  -I../../../dist/include/xpcom -I../../../dist/include/string -I../../../dist/include/appcomps -I../../../dist/include/toolkitcomps -I../../../dist/include/appcomps -I../../../dist/include/xulapp -I../../../dist/include/widget -I../../../dist/include/gfx -I../../../dist/include/dom -I../../../dist/include/docshell -I../../../dist/include/toolkitcomps -I../../../dist/include -I../../../dist/include/nspr    -I../../../dist/sdk/include -I/usr/X11R6/include   -fPIC  -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -pedantic -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -ffunction-sections -Os -D_XOPEN_SOURCE=500 -DXTHREADS -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include    -I/usr/X11R6/include -DMOZILLA_CLIENT -include ../../../mozilla-config.h -Wp,-MD,.deps/nsGTKRemoteService.pp nsGTKRemoteService.cpp
nsGTKRemoteService.cpp:69:34: nsICommandLineRunner.h: No such file or directory
nsGTKRemoteService.cpp:70:25: nsXULAppAPI.h: No such file or directory
nsGTKRemoteService.cpp: In static member function `static const char*
   nsGTKRemoteService::HandleCommand(char*, nsIDOMWindow*)':
nsGTKRemoteService.cpp:283: error: `nsICommandLineRunner' undeclared (first use
   this function)
nsGTKRemoteService.cpp:283: error: (Each undeclared identifier is reported only
   once for each function it appears in.)

My explanation for this is that the toolkit/components/remote is set to be compiled cause minimo uses the gtk2 as default toolkit. No problem! Unfortunately, this component requires another one, the toolkit/components/commandlines (and the toolkit/xre).

Doug, the remote component is required by minimo? 

May I set its compilation just when the MOZ_XUL_APP is set? Will it still work?
This is my .mozconfig file:
*******************************
ac_add_options --enable-application=minimo

ac_add_options --prefix=/usr/

# use GTK+-2 widget set with XFT font rendering
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-xft
ac_add_options --disable-freetype2

ac_add_options --disable-xul

ac_add_options --enable-optimize=-Os
ac_add_options --enable-strip
ac_add_options --disable-debug

#ac_add_options --disable-strip
#ac_add_options --enable-debug
ac_add_options --enable-reorder
#ac_add_options --enable-elf-dynstr-gc

#ac_add_options --enable-dtd-debug
#ac_add_options --enable-logging

ac_add_options --disable-mailnews
ac_add_options --disable-ldap

# enable minimal profile support
ac_add_options --disable-profilesharing
ac_add_options --disable-profilelocking

ac_add_options --disable-libxul

ac_add_options --disable-view-source
#ac_add_options --enable-tests

# enable static build
#ac_add_options --disable-shared
#ac_add_options --enable-static

# remove link dependency on libstdc++.so
LIBS=-lsupc++
CXX=gcc

*******************************************
Also I'am have added into ./configure next entries:
...............................
MOZ_MATHML=
MOZ_PROFILELOCKING=
MOZ_PROFILESHARING=
MOZ_VIEW_SOURCE=
NECKO_PROTOCOLS_DEFAULT="about data file ftp http"
MINIMO=
MOZ_EXTENSIONS_DEFAULT="xml-rpc xmlextras transformiix webservices spatialnavigation"
MOZ_THUNDERBIRD=
MOZ_SUNBIRD=
MOZ_XUL=
MOZ_XUL_APP=
MOZ_ENABLE_XREMOTE=
MOZ_MOVEMAIL=
MOZ_CHROME_FILE_FORMAT="flat"

.....................


After it mozilla engine has build fine without xul...., but when I have tried to run  
# ./run-mozilla.sh ./TestGtkEmbed 127.0.0.1
it crashed with log
***************************************
new_gtk_browser
        menu bar
        tool bar
        location bar
        status bar
No Persistent Registry Found.
Type Manifest File: /targets/arm/usr/lib/osso-browser-mozilla-engine/components/xpti.dat
nsNativeComponentLoader: autoregistering begins.
*** Registering docshell_provider components (all right -- a generic module!)
*** Registering SpatialNavigationModule components (all right -- a generic module!)
*** Registering xpconnect components (all right -- a generic module!)
*** Registering xpconnect_test components (all right -- a generic module!)
*** Registering necko_core_and_primary_protocols components (all right -- a generic module!)
*** Registering chromelite components (all right -- a generic module!)
*** Registering nsLayoutModule components (all right -- a generic module!)
*** Registering nsSampleModule components (all right -- a generic module!)
*** Registering nsMorkModule components (all right -- a generic module!)
*** Registering nsUConvModule components (all right -- a generic module!)
*** Registering nsJarModule components (all right -- a generic module!)
*** Registering Browser_Embedding_Module components (all right -- a generic module!)
*** Registering necko_secondary_protocols components (all right -- a generic module!)
*** Registering nsPluginModule components (all right -- a generic module!)
*** Registering BOOT components (all right -- a generic module!)
*** Registering nsWidgetGtk2Module components (all right -- a generic module!)
*** Registering embedcomponents components (all right -- a generic module!)
*** Registering MyService components (all right -- a generic module!)
*** Registering nsTestDynamicModule components (all right -- a generic module!)
*** Registering nsWebServicesModule components (all right -- a generic module!)
*** Registering nsSecurityManagerModule components (all right -- a generic module!)
*** Registering TransformiixModule components (all right -- a generic module!)
*** Registering nsGfxGTKModule components (all right -- a generic module!)
*** Registering nsEditorModule components (all right -- a generic module!)
*** Registering nsPrefModule components (all right -- a generic module!)
*** Registering nsTransactionManagerModule components (all right -- a generic module!)
*** Registering nsI18nModule components (all right -- a generic module!)
*** Registering nsXMLExtrasModule components (all right -- a generic module!)
*** Registering nsImageLib2Module components (all right -- a generic module!)
*** Registering WSPProxyTestModule components (all right -- a generic module!)
*** Registering nsParserModule components (all right -- a generic module!)
*** Registering appshell components (all right -- a generic module!)
*** Registering NSS components (all right -- a generic module!)
nsNativeComponentLoader: autoregistering succeeded
WARNING: Error parsing application default preferences., file nsPrefService.cpp, line 755
*** Deferring registration of sample JS components
nsNativeComponentLoader: registering deferred (0)
*** Registering sample JS components
nsNativeComponentLoader: registering deferred (0)
nsNativeComponentLoader: registering deferred (0)
nsNativeComponentLoader: autoregistering begins.
nsNativeComponentLoader: autoregistering succeeded
nsNativeComponentLoader: registering deferred (0)
GFX: dpi=96 t2p=0.0666667 p2t=15 depth=16
++WEBSHELL 0xe4c20 == 1
###!!! ASSERTION: EnableGlobalHistory() failed: 'NS_SUCCEEDED(rv)', file nsWebBrowser.cpp, line 1212
Break: at file nsWebBrowser.cpp, line 1212
++DOMWINDOW == 1
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line 273
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line 273
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line 273
open_uri_cb http://127.0.0.1/
load_started_cb
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsCSSLoader.cpp, line 1913
*** open of resource://gre/res/ua.css failed: error=804b0012
###!!! ASSERTION: unexpected null pointer: 'aUAStyleSheet', file nsDocumentViewer.cpp, line 1591
Break: at file nsDocumentViewer.cpp, line 1591
js_status_cb
++DOMWINDOW == 2
js_status_cb
WARNING: unable to load UA style sheet, file nsDocumentViewer.cpp, line 2021
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsCSSLoader.cpp, line 1913
###!!! ASSERTION: Could not load xulscrollbars.css.: 'gStyleCache->mScrollbarsSheet', file nsLayoutStylesheetCache.cpp, line 94
Break: at file nsLayoutStylesheetCache.cpp, line 94
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsCSSLoader.cpp, line 1913
###!!! ASSERTION: Could not load forms.css.: 'gStyleCache->mFormsSheet', file nsLayoutStylesheetCache.cpp, line 116
Break: at file nsLayoutStylesheetCache.cpp, line 116
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line 273
###!!! ASSERTION: no quirk stylesheet: 'mQuirkStyleSheet', file nsStyleSet.cpp, line 318
Break: at file nsStyleSet.cpp, line 318
location_changed_cb
net_state_change_cb 196612
progress_change_cb cur 4838 max -1
 * IConvAdaptor - - GetMaxLength 16384 ( KOI8-R -> UCS-2 )
 * IConvAdaptor - - GetMaxLength 2968 ( KOI8-R -> UCS-2 )
###!!! ASSERTION: no quirk stylesheet: 'mQuirkStyleSheet', file nsStyleSet.cpp, line 318
Break: at file nsStyleSet.cpp, line 318
Note: styleverifytree is disabled
title_changed_cb
net_state_change_cb 65552
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line 273
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line 273
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line 273
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line 273
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line 273
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line 273
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line 273
Note: frameverifytree is disabled
###!!! ASSERTION: Must be a box frame!: 'mScrollCornerBox->IsBoxFrame()', file nsGfxScrollFrame.cpp, line 2421
Break: at file nsGfxScrollFrame.cpp, line 2421
###!!! ASSERTION: A box layout method was called but InitBoxMetrics was never called: 'metrics', file nsFrame.cpp, line 5596
Break: at file nsFrame.cpp, line 5596

*******************************************
 
> After it mozilla engine has build fine without xul...., but when I have tried
> to run  
> # ./run-mozilla.sh ./TestGtkEmbed 127.0.0.1
> it crashed with log
> ***************************************
> new_gtk_browser
>         menu bar
>         tool bar
>         location bar
>         status bar
> No Persistent Registry Found.
> Type Manifest File:
> /targets/arm/usr/lib/osso-browser-mozilla-engine/components/xpti.dat
> nsNativeComponentLoader: autoregistering begins.
> *** Registering docshell_provider components (all right -- a generic module!)
> *** Registering SpatialNavigationModule components (all right -- a generic
> module!)
> *** Registering xpconnect components (all right -- a generic module!)
> *** Registering xpconnect_test components (all right -- a generic module!)
> *** Registering necko_core_and_primary_protocols components (all right -- a
> generic module!)
> *** Registering chromelite components (all right -- a generic module!)
> *** Registering nsLayoutModule components (all right -- a generic module!)
> *** Registering nsSampleModule components (all right -- a generic module!)
> *** Registering nsMorkModule components (all right -- a generic module!)
> *** Registering nsUConvModule components (all right -- a generic module!)
> *** Registering nsJarModule components (all right -- a generic module!)
> *** Registering Browser_Embedding_Module components (all right -- a generic
> module!)
> *** Registering necko_secondary_protocols components (all right -- a generic
> module!)
> *** Registering nsPluginModule components (all right -- a generic module!)
> *** Registering BOOT components (all right -- a generic module!)
> *** Registering nsWidgetGtk2Module components (all right -- a generic module!)
> *** Registering embedcomponents components (all right -- a generic module!)
> *** Registering MyService components (all right -- a generic module!)
> *** Registering nsTestDynamicModule components (all right -- a generic module!)
> *** Registering nsWebServicesModule components (all right -- a generic module!)
> *** Registering nsSecurityManagerModule components (all right -- a generic
> module!)
> *** Registering TransformiixModule components (all right -- a generic module!)
> *** Registering nsGfxGTKModule components (all right -- a generic module!)
> *** Registering nsEditorModule components (all right -- a generic module!)
> *** Registering nsPrefModule components (all right -- a generic module!)
> *** Registering nsTransactionManagerModule components (all right -- a generic
> module!)
> *** Registering nsI18nModule components (all right -- a generic module!)
> *** Registering nsXMLExtrasModule components (all right -- a generic module!)
> *** Registering nsImageLib2Module components (all right -- a generic module!)
> *** Registering WSPProxyTestModule components (all right -- a generic module!)
> *** Registering nsParserModule components (all right -- a generic module!)
> *** Registering appshell components (all right -- a generic module!)
> *** Registering NSS components (all right -- a generic module!)
> nsNativeComponentLoader: autoregistering succeeded
> WARNING: Error parsing application default preferences., file
> nsPrefService.cpp, line 755
> *** Deferring registration of sample JS components
> nsNativeComponentLoader: registering deferred (0)
> *** Registering sample JS components
> nsNativeComponentLoader: registering deferred (0)
> nsNativeComponentLoader: registering deferred (0)
> nsNativeComponentLoader: autoregistering begins.
> nsNativeComponentLoader: autoregistering succeeded
> nsNativeComponentLoader: registering deferred (0)
> GFX: dpi=96 t2p=0.0666667 p2t=15 depth=16
> ++WEBSHELL 0xe4c20 == 1
> ###!!! ASSERTION: EnableGlobalHistory() failed: 'NS_SUCCEEDED(rv)', file
> nsWebBrowser.cpp, line 1212
> Break: at file nsWebBrowser.cpp, line 1212
> ++DOMWINDOW == 1
> WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line
> 273
> WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line
> 273
> WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line
> 273
> open_uri_cb http://127.0.0.1/
> load_started_cb
> WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsCSSLoader.cpp, line
> 1913
> *** open of resource://gre/res/ua.css failed: error=804b0012
> ###!!! ASSERTION: unexpected null pointer: 'aUAStyleSheet', file
> nsDocumentViewer.cpp, line 1591
> Break: at file nsDocumentViewer.cpp, line 1591
> js_status_cb
> ++DOMWINDOW == 2
> js_status_cb
> WARNING: unable to load UA style sheet, file nsDocumentViewer.cpp, line 2021
> WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsCSSLoader.cpp, line
> 1913
> ###!!! ASSERTION: Could not load xulscrollbars.css.:
> 'gStyleCache->mScrollbarsSheet', file nsLayoutStylesheetCache.cpp, line 94
> Break: at file nsLayoutStylesheetCache.cpp, line 94
> WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsCSSLoader.cpp, line
> 1913
> ###!!! ASSERTION: Could not load forms.css.: 'gStyleCache->mFormsSheet', file
> nsLayoutStylesheetCache.cpp, line 116
> Break: at file nsLayoutStylesheetCache.cpp, line 116
> WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line
> 273
> ###!!! ASSERTION: no quirk stylesheet: 'mQuirkStyleSheet', file nsStyleSet.cpp,
> line 318
> Break: at file nsStyleSet.cpp, line 318
> location_changed_cb
> net_state_change_cb 196612
> progress_change_cb cur 4838 max -1
>  * IConvAdaptor - - GetMaxLength 16384 ( KOI8-R -> UCS-2 )
>  * IConvAdaptor - - GetMaxLength 2968 ( KOI8-R -> UCS-2 )
> ###!!! ASSERTION: no quirk stylesheet: 'mQuirkStyleSheet', file nsStyleSet.cpp,
> line 318
> Break: at file nsStyleSet.cpp, line 318
> Note: styleverifytree is disabled
> title_changed_cb
> net_state_change_cb 65552
> WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line
> 273
> WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line
> 273
> WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line
> 273
> WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line
> 273
> WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line
> 273
> WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line
> 273
> WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsStringBundle.cpp, line
> 273
> Note: frameverifytree is disabled
> ###!!! ASSERTION: Must be a box frame!: 'mScrollCornerBox->IsBoxFrame()', file
> nsGfxScrollFrame.cpp, line 2421
> Break: at file nsGfxScrollFrame.cpp, line 2421
> ###!!! ASSERTION: A box layout method was called but InitBoxMetrics was never
> called: 'metrics', file nsFrame.cpp, line 5596
> Break: at file nsFrame.cpp, line 5596
> 
> *******************************************
> 

I have investigate it, and found what it crashed in 
/layout/generic/nsFrame.cpp
in nsFrame::BoxReflow function

nsBoxLayoutMetrics *metrics = BoxMetrics();
BoxMetrics - return NULL value

and it crashed after this on

if (metrics->mStyleChange) {

.....


Problem of this crash can be fixed by this changes


embedding/browser/gtk/src/EmbedPrivate.cpp

            scrollbars->SetVisible
#ifdef MOZ_XUL
               (mChromeMask & nsIWebBrowserChrome::CHROME_SCROLLBARS ?
                PR_TRUE : PR_FALSE);
#else
            (PR_FALSE);
Patch for fixing this crash

--- embedding/browser/gtk/src/EmbedPrivate.cpp  (revision 1528)
+++ embedding/browser/gtk/src/EmbedPrivate.cpp  (working copy)
@@ -448,8 +448,12 @@
          if (scrollbars) {

             scrollbars->SetVisible
+#ifdef MOZ_XUL
                (mChromeMask & nsIWebBrowserChrome::CHROME_SCROLLBARS ?
                 PR_TRUE : PR_FALSE);
+#else
+           (PR_FALSE);
+#endif
          }
       }
    }


>             (PR_FALSE);
> 

are you missing the scrollbar binding file in chrome?

Could you tell me what is in <bin>/chrome?
(In reply to comment #13)
> are you missing the scrollbar binding file in chrome?
> 
> Could you tell me what is in <bin>/chrome?
> 

there are toolkit.jar, and  content/global/bindings/scrollbar.xml - not missed.



I would be happy with the change you suggested, but I think it is masking the real problem.  With your patch, do you still see scrollbars?
(In reply to comment #15)
> I would be happy with the change you suggested, but I think it is masking the
> real problem.  With your patch, do you still see scrollbars?
> 

WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed, file nsCSSLoader.cpp, line 1913
###!!! ASSERTION: Could not load xulscrollbars.css.: 'gStyleCache->mScrollbarsSheet', file nsLayoutStylesheetCache.cpp, line 94

It very strange, but why with --disable-xul option it want to load xulscrollbars.css?

No with it patch scrollbars is disabled...
(In reply to comment #15)
> I would be happy with the change you suggested, but I think it is masking the
> real problem.  With your patch, do you still see scrollbars?
> 

When I have placed  xulscrollbars.css into root of chrome directory, it also not crashed...

Stil one problem, <INPUT type="text"...> elements also not showed on layout... ;(
(In reply to comment #17)
> (In reply to comment #15)
> > I would be happy with the change you suggested, but I think it is masking the
> > real problem.  With your patch, do you still see scrollbars?
> > 
> 
> When I have placed  xulscrollbars.css into root of chrome directory, it also
> not crashed...
But scrollbars also still not showed... ;(
(In reply to comment #18)
> (In reply to comment #17)
> > (In reply to comment #15)
> > > I would be happy with the change you suggested, but I think it is masking the
> > > real problem.  With your patch, do you still see scrollbars?
> > > 
> > 
> > When I have placed  xulscrollbars.css into root of chrome directory, it also
> > not crashed...
> But scrollbars also still not showed... ;(
> 

I got the minimo source code in 11/30 and I made some changes on configure.in. Then I compiled the source code with the following mozconfig:

ac_add_options --enable-application=minimo

ac_add_options --prefix=/usr/

# use GTK+-2 widget set with XFT font rendering
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-xft
ac_add_options --disable-freetype2
ac_add_options --disable-xul
ac_add_options --disable-libxul

ac_add_options --enable-optimize=-Os
ac_add_options --enable-strip
ac_add_options --disable-debug
ac_add_options --enable-reorder
ac_add_options --enable-elf-dynstr-gc

# enable static build
#ac_add_options --disable-shared
#ac_add_options --enable-static

# remove link dependency on libstdc++.so
LIBS=-lsupc++
CXX=gcc

The changes made in configure.in are:

dnl ========================================================
dnl disable xul
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(xul,
[  --disable-xul           Disable XUL],
    MOZ_XUL= )
if test "$MOZ_XUL"; then
  AC_DEFINE(MOZ_XUL)
else
  dnl remove extensions that require XUL
  MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's/inspector//' -e 's/venkman//' -e 's/irc//' -e 's/tasks//'`
  dnl disable minimo features those require XUL
  if test "$MINIMO"; then
     MOZ_XUL_APP=
     MINIMO=
     NECKO_PROTOCOLS_DEFAULT="about data file ftp http"
     MOZ_THUNDERBIRD=
     MOZ_SUNBIRD=
     MOZ_ENABLE_XREMOTE=
     MOZ_MOVEMAIL=
  fi
fi

The compilation was alright, however, the TestGtkEmbed is not rendering as it should do. The page is shown scrambled and there are JS source everywhere.

I think the positive point of my test case is I didn't need to change any other file besides the configure.in and mozconfig...

I don't have vertical scrollbars, too. The autofit for horizontal scrollbars is set!
*** Bug 319346 has been marked as a duplicate of this bug. ***
(In reply to comment #19)
> (In reply to comment #18)
> > (In reply to comment #17)
> > > (In reply to comment #15)
> > > > I would be happy with the change you suggested, but I think it is masking the
> > > > real problem.  With your patch, do you still see scrollbars?
> > > > 
> > > 
> > > When I have placed  xulscrollbars.css into root of chrome directory, it also
> > > not crashed...
> > But scrollbars also still not showed... ;(
> > 
> 
> I got the minimo source code in 11/30 and I made some changes on configure.in.
> Then I compiled the source code with the following mozconfig:
> 
> ac_add_options --enable-application=minimo
> 
> ac_add_options --prefix=/usr/
> 
> # use GTK+-2 widget set with XFT font rendering
> ac_add_options --enable-default-toolkit=gtk2
> ac_add_options --enable-xft
> ac_add_options --disable-freetype2
> ac_add_options --disable-xul
> ac_add_options --disable-libxul
> 
> ac_add_options --enable-optimize=-Os
> ac_add_options --enable-strip
> ac_add_options --disable-debug
> ac_add_options --enable-reorder
> ac_add_options --enable-elf-dynstr-gc
> 
> # enable static build
> #ac_add_options --disable-shared
> #ac_add_options --enable-static
> 
> # remove link dependency on libstdc++.so
> LIBS=-lsupc++
> CXX=gcc
> 
> The changes made in configure.in are:
> 
> dnl ========================================================
> dnl disable xul
> dnl ========================================================
> MOZ_ARG_DISABLE_BOOL(xul,
> [  --disable-xul           Disable XUL],
>     MOZ_XUL= )
> if test "$MOZ_XUL"; then
>   AC_DEFINE(MOZ_XUL)
> else
>   dnl remove extensions that require XUL
>   MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's/inspector//' -e
> 's/venkman//' -e 's/irc//' -e 's/tasks//'`
>   dnl disable minimo features those require XUL
>   if test "$MINIMO"; then
>      MOZ_XUL_APP=
>      MINIMO=
>      NECKO_PROTOCOLS_DEFAULT="about data file ftp http"
>      MOZ_THUNDERBIRD=
>      MOZ_SUNBIRD=
>      MOZ_ENABLE_XREMOTE=
>      MOZ_MOVEMAIL=
>   fi
> fi
> 
> The compilation was alright, however, the TestGtkEmbed is not rendering as it
> should do. The page is shown scrambled and there are JS source everywhere.
> 
> I think the positive point of my test case is I didn't need to change any other
> file besides the configure.in and mozconfig...
> 
> I don't have vertical scrollbars, too. The autofit for horizontal scrollbars is
> set!
> 

OK! It's working now! I placed the suported NECKO_PROTOCOLS_DEFAULT to "about data http file res" and set the MOZ_CHROME_FILE_FORMAT to flat. The TesGtkEmbed ran fine and rendered the page fine.
I think the flat chrome disabled the fit-on-screen feature.

We don't have the scrollbars, yet.
if you build, mozilla/embedding/minimo/chromelite, i think you can stop using chrome flat..

Alternatively, you could add jar to your necko protocol list.
(In reply to comment #22)
> if you build, mozilla/embedding/minimo/chromelite, i think you can stop using
> chrome flat..
> 
> Alternatively, you could add jar to your necko protocol list.

chromelite does not work. It even got built (moz_objdir/dis/bin/components/chrmlite.so) but no scrolling events at all. 

following is the content of my objdir/dist/bin/chrome:

$$ ls chrome/
chromelist.txt  comm.jar  comm.manifest  embed-sample.jar  en-US.jar  en-US.manifest  installed-chrome.txt  minimo.jar  minimo.manifest  toolkit.jar

btw, rdf/chrome doesn't help as well ?

btw2, I have MOZ_XUL unset (because of the --disable-xul) and MOZ_APP_XUL set (because of MiniMo). Sounds odd, isn't it ?!
chromelite requires you to manually flatten your chrome directory see package.sh.  are you doing that?
(In reply to comment #24)
> chromelite requires you to manually flatten your chrome directory see
> package.sh.  are you doing that?
> 

yeap ... I ran it, it creates a dist/Embed. It has a chrome/ and I have everything "flatted" (many files there) inside it.

I also fixed the problem with MinimoGTK and it runs and browses quiet well, but no scrollbar ...
(In reply to comment #23)
> (In reply to comment #22)
> > if you build, mozilla/embedding/minimo/chromelite, i think you can stop using
> > chrome flat..
> > 
> > Alternatively, you could add jar to your necko protocol list.
> 
> chromelite does not work. It even got built
> (moz_objdir/dis/bin/components/chrmlite.so) but no scrolling events at all. 
> 
> following is the content of my objdir/dist/bin/chrome:
> 
> $$ ls chrome/
> chromelist.txt  comm.jar  comm.manifest  embed-sample.jar  en-US.jar 
> en-US.manifest  installed-chrome.txt  minimo.jar  minimo.manifest  toolkit.jar
> 
> btw, rdf/chrome doesn't help as well ?
> 
> btw2, I have MOZ_XUL unset (because of the --disable-xul) and MOZ_APP_XUL set
> (because of MiniMo). Sounds odd, isn't it ?!
> 

I could do the scrollbars working in a hard way. I had to copy a libchrome.so and a librdf.so from the objdir/components and the objdir/chrome/toolkit.manifest of a enabled xul compilation to the respective folders of my disabled xul compilation. How can we fix it?
As long as you have xul.css, xulscrollbar.css, scrollbar.xml, slider.gif, arrow*.gif in your chrome folder, the scrollbar should be visible. At least it works on windows, though the scrollars can't be slided with the mouse but that's a different problem.
(In reply to comment #27)
> As long as you have xul.css, xulscrollbar.css, scrollbar.xml, slider.gif,
> arrow*.gif in your chrome folder, the scrollbar should be visible. At least it
> works on windows, though the scrollars can't be slided with the mouse but
> that's a different problem.
> 

I unmade my changes and put all of these stuff. But I couldn't see scrollbars, at least the browser worked. I let there onky the xulscrollbars.css (this is enough to the browser do not crash). However, looking inside my classic.jar file the xulscrollbar.css is there. Why is it not used? I don't have all my manifest files.
ls OBJDIR/chrome
chromelist.txt  classic.jar  comm.jar  comm.manifest  embed-sample.jar  en-US.jar  en-US.manifest  installed-chrome.txt  modern.jar  toolkit.jar

I really need to learn more about chrome (creating, using, changing, etc).
When you disable xul, you don't need chrome except for some localized strings. Therefore, only a minimal chrome handler is build and it look for file directly inside the chrome folder, not in jar.
(In reply to comment #29)
> When you disable xul, you don't need chrome except for some localized strings.
> Therefore, only a minimal chrome handler is build and it look for file directly
> inside the chrome folder, not in jar.
> 

Ok! I got the xul disabled in a working version of mozilla-minimo. I just set the ac_add_options --disable-xul in mozconfig and inserted the following lines in configure.in:
dnl ========================================================
dnl disable xul
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(xul,
[  --disable-xul           Disable XUL],
    MOZ_XUL= )
if test "$MOZ_XUL"; then
  AC_DEFINE(MOZ_XUL)
else
  dnl remove extensions that require XUL
  MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's/inspector//' -e
's/venkman//' -e 's/irc//' -e 's/tasks//'`
  dnl disable minimo features those require XUL
  if test "$MINIMO"; then
     MOZ_XUL_APP=
     MINIMO=
     NECKO_PROTOCOLS_DEFAULT="about data file ftp http"
     MOZ_THUNDERBIRD=
     MOZ_SUNBIRD=
     MOZ_ENABLE_XREMOTE=
     MOZ_MOVEMAIL=
  fi
fi

After all, we need do extract the .jar of the OBJDIR/chrome folder and copy all the files to the OBJDIR/chrome. We can do this using the following commands:

        find $(DESTDIR)$(mozappdir)/chrome/ -name "*jar" -type f -exec unzip -d $(DESTDIR)$(mozappdir)/chrome/ {} \;
	find $(DESTDIR)$(mozappdir)/chrome/ -type f -exec cp '{}' $(DESTDIR)$(mozappdir)/chrome/ \;
	$(RM) $(DESTDIR)$(mozappdir)/chrome/*.jar
	find $(DESTDIR)$(mozappdir)/chrome/* -type d -exec rm -fr {} \;

Now we've got the scrollbars working on TestGtkEmbed, but the scrollbars don't work properly, like in the bug https://bugzilla.mozilla.org/show_bug.cgi?id=233747

BTW, I have a doubt, what .jar file do I have to extract? I've extracted all of the files inside OBJDIR/chrome...
This doesn't actually do much good yet, since JS_STATIC_BUILD isn't compatible with libxul at the moment: that can change though.
Attachment #213916 - Flags: review?(dougt)
(In reply to comment #31)
> Created an attachment (id=213916) [edit]
> Part -3: start with a --with-embedding-profile flag, rev. 1
> 
> This doesn't actually do much good yet, since JS_STATIC_BUILD isn't compatible
> with libxul at the moment: that can change though.
> 

I think this bug is INVALID because minimo in general based on XUL, and can't works without it.

Particulary building mozilla without XUL can been solved after applying patch
https://bugzilla.mozilla.org/attachment.cgi?id=214900&action=view
from https://bugzilla.mozilla.org/show_bug.cgi?id=330331#c1

But it simply disabled building of /minimo/base.

In common building, and working mozilla embedded without xul, can been fixed by applying patches from 
https://bugzilla.mozilla.org/show_bug.cgi?id=330331#c1
and
https://bugzilla.mozilla.org/show_bug.cgi?id=319346#c22

And bug can be closed as depends from https://bugzilla.mozilla.org/show_bug.cgi?id=319346
(In reply to comment #32)
> (In reply to comment #31)
> > Created an attachment (id=213916) [edit]
> > Part -3: start with a --with-embedding-profile flag, rev. 1
> > 
> > This doesn't actually do much good yet, since JS_STATIC_BUILD isn't compatible
> > with libxul at the moment: that can change though.
> > 
> 
> I think this bug is INVALID because minimo in general based on XUL, and can't
> works without it.
> 
> Particulary building mozilla without XUL can been solved after applying patch
> https://bugzilla.mozilla.org/attachment.cgi?id=214900&action=view
> from https://bugzilla.mozilla.org/show_bug.cgi?id=330331#c1
> 
> But it simply disabled building of /minimo/base.
> 
> In common building, and working mozilla embedded without xul, can been fixed by
> applying patches from 
> https://bugzilla.mozilla.org/show_bug.cgi?id=330331#c1
> and
> https://bugzilla.mozilla.org/show_bug.cgi?id=319346#c22
> 
> And bug can be closed as depends from
> https://bugzilla.mozilla.org/show_bug.cgi?id=319346
> 

Does this patch solve the scrollbar problem? I mean, the problem related to the bug https://bugzilla.mozilla.org/show_bug.cgi?id=233747.
Comment on attachment 213916 [details] [diff] [review]
Part -3: start with a --with-embedding-profile flag, rev. 1

this patch no longer applies cleanly to the trunk.
(In reply to comment #35)
> (From update of attachment 213916 [details] [diff] [review] [edit])
> this patch no longer applies cleanly to the trunk.
> 

Yes ;) I'am  only now have found this problem ;(
I kept plugin support for the basic profile for the time being because the minimo build scripts require it and I didn't want to futz with them now.

I've got a last minimo build going with that change, but I think it's all good.
Assignee: dougt → benjamin
Attachment #213916 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #216024 - Flags: review?(dougt)
Attachment #213916 - Flags: review?(dougt)
Comment on attachment 216024 [details] [diff] [review]
Part -3: start with a --with-embedding-profile flag, rev. 2

trunk only.

I do not understand what MOZ_EMBEDDING_LEVEL are.

MOZ_V1_STRING_ABI means that string backwards compat is not honored.  I am not sure if this is a embedding profile option, or an application options.  Ideally, at somepoint (2.0, 3.0? we just break everyone to take the savings?)

is there a way to express minimal, basic, as subsets of each other?
> I do not understand what MOZ_EMBEDDING_LEVEL are.

MOZ_EMBEDDING_PROFILE is for makefile ifdefs, using ifeq or $(filter), since you can only do text comparisons in makefiles and not integer comparisons.

MOZ_EMBEDDING_LEVEL is for C/C++ ifdefs, and is numeric because you can't do text comparsions in C ifdefs, only numeric comparsions. The numbers chosen are arbitrary; a typical ifdef might look like

#if MOZ_EMBEDDING_LEVEL >= MOZ_EMBEDDING_LEVEL_BASIC
// Do something for minimo+firefox but not for minimal-level embedding
#endif

> MOZ_V1_STRING_ABI means that string backwards compat is not honored.  I am not
> sure if this is a embedding profile option, or an application options. 
> Ideally, at somepoint (2.0, 3.0? we just break everyone to take the savings?)

This is an option that affects XPCOM compilation. We are not planning on enabling this option on the desktop versions of xulrunner unless we decide to totally revise the XPCOM ABI.

> is there a way to express minimal, basic, as subsets of each other?

In the configure script and in makefiles, not really. You can in C++ as I've indicated above.
Blocks: 331431
Priority: -- → P2
Target Milestone: --- → mozilla1.9alpha
Comment on attachment 216024 [details] [diff] [review]
Part -3: start with a --with-embedding-profile flag, rev. 2

my concerns are addressed.
Attachment #216024 - Flags: review?(dougt) → review+
To be checked in, I figured a way to make both makefile and C++ and xul preprocessor defines subsets of eachother:

in Makefiles

ifdef MOZ_EMBEDDING_LEVEL_DEFAULT
// do stuff for desktop but not basic or minimal profiles
endif

in C++ and xul preprocessor
#ifdef MOZ_EMBEDDING_LEVEL_DEFAULT

This was necessary because the xul preprocessor doesn't do integer comparisons and doesn't do || either... blech, I should fix that.
Attachment #216024 - Attachment is obsolete: true
Attachment #218031 - Attachment description: Part -3: start with a --with-embedding-profile flag, rev. 3 → Part -3: start with a --with-embedding-profile flag, rev. 3 [checked in]
Depends on: 335714
Romaxa and timeless have been fixing a bunch of followup bugs on this. Marking this one FIXED.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
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: