Lance,
Do you also see similar issues when running against the Mozilla 1.8 branch? You can update to the branch by adding this to your mozconfig:

mk_add_options MOZ_CO_TAG=MOZILLA_1_8_BRANCH

then

make -f client.mk

Doug

Lance Fitz-Herbert wrote:
Hi,

I'm trying to build an application embeding Gecko.

I am following the information obtained from http://www.mozilla.org/projects/embedding/
but I am finding myself a little lost.

This is a run down of what I have attempted so far, feel free to point out anything that
is wrong or just plain stupid.
(I apologise in advance for the interleaving of explanations and output messages)

I downloaded the mozilla source tree from:
ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.13/source/mozilla-1.7.13-source.tar.bz2 <ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.13/source/mozilla-1.7.13-source.tar.bz2>

I then created a .mozconfig file in ~/Desktop/mozilla/ containing:
ac_add_options --enable-default-toolkit=gtk2

I then proceeded to build the source by:
make -f client.mk <http://client.mk> build

An hour and a half later the build finished without any apparent errors.
I then proceeded as follows to make an embedding build:

cd ~/Desktop/mozilla/embedding/config
make

Lots of output scrolls by, some of which as follows might be of interest:


cp: cannot stat `./all.js': No such file or directory
make[2]: [embed_copy] Error 1 (ignored)
Warning: package error or possible missing or unnecessary file: libgtksuperwin.so (./basebrowser-unix, 49). Warning: package error or possible missing or unnecessary file: components/libwidget_gtk.so (./basebrowser-unix, 56). Warning: package error or possible missing or unnecessary file: libmoz_art_lgpl.so (./basebrowser-unix, 61). Warning: package error or possible missing or unnecessary file: components/chrome.xpt (./basebrowser-unix, 100). Warning: package error or possible missing or unnecessary file: components/libchrmlite.so (./basebrowser-unix, 101). Warning: package error or possible missing or unnecessary file: components/plugin.xpt (./basebrowser-unix, 188). Warning: package error or possible missing or unnecessary file: components/libpipboot.so (./basebrowser-unix, 204). Warning: package error or possible missing or unnecessary file: components/pipboot.xpt (./basebrowser-unix, 205). Warning: package error or possible missing or unnecessary file: components/libpipnss.so (./basebrowser-unix, 206). Warning: package error or possible missing or unnecessary file: components/pipnss.xpt (./basebrowser-unix, 207). Warning: package error or possible missing or unnecessary file: chrome/pipnss.jar (./basebrowser-unix, 208). Warning: package error or possible missing or unnecessary file: defaults/pref/security-prefs.js (./basebrowser-unix, 209). Warning: package error or possible missing or unnecessary file: libnss3.so (./basebrowser-unix, 210). Warning: package error or possible missing or unnecessary file: libsmime3.so (./basebrowser-unix, 211). Warning: package error or possible missing or unnecessary file: libsoftokn3.chk (./basebrowser-unix,212). Warning: package error or possible missing or unnecessary file: libsoftokn3.so (./basebrowser-unix, 2 13). Warning: package error or possible missing or unnecessary file: libssl3.so (./basebrowser-unix, 214). Warning: package error or possible missing or unnecessary file: libnssckbi.so (./basebrowser-unix, 215). Warning: package error or possible missing or unnecessary file: res/entityTables/htmlEntityVersion.properties (./basebrowser-unix, 252).


I then proceeded to try and run TestGtkEmbed

$ cd ~/Desktop/mozilla/dist/Embed/
$ ./run-mozilla.sh ./TestGtkEmbed
new_gtk_browser
        menu bar
        tool bar
        location bar
        status bar
No Persistent Registry Found.
Type Manifest File: /home/lance/Desktop/mozilla/dist/Embed/components/xpti.dat
nsNativeComponentLoader: autoregistering begins.
*** Registering xpcomObsoleteModule components (all right -- a generic module!)
*** Registering xpconnect components (all right -- a generic module!)
*** Registering nsGfxGTKModule components (all right -- a generic module!)
*** Registering nsGfxPSModule components (all right -- a generic module!)
*** Registering nsGfxXprintModule components (all right -- a generic module!) nsNativeComponentLoader: SelfRegisterDll(libwidget_gtk2.so) Load FAILED with error: libgtkxtbin.so: c annot open shared object file: No such file or directory
*** Registering nsLayoutModule components (all right -- a generic module!)
*** Registering nsParserModule components (all right -- a generic module!)
*** Registering nsImageLib2Module components (all right -- a generic module!)
*** Registering appshell components (all right -- a generic module!)
*** Registering nsSecurityManagerModule components (all right -- a generic module!)
*** Registering nsCookieModule components (all right -- a generic module!)
*** Registering docshell_provider components (all right -- a generic module!)
*** Registering nsChromeModule components (all right -- a generic module!)
*** Registering Browser_Embedding_Module components (all right -- a generic module!)
*** Registering embedcomponents components (all right -- a generic module!)
*** Registering nsJarModule components (all right -- a generic module!)
*** Registering nsPrefModule components (all right -- a generic module!)
*** Registering nsProfileModule components (all right -- a generic module!)
*** Registering nsRDFModule components (all right -- a generic module!)
*** Registering nsUConvModule components (all right -- a generic module!)
*** Registering nsI18nModule components (all right -- a generic module!)
*** Registering nsEditorModule components (all right -- a generic module!)
*** Registering necko_core_and_primary_protocols components (all right -- a generic module!) *** Registering necko_secondary_protocols components (all right -- a generic module!) nsNativeComponentLoader: SelfRegisterDll(libgkplugin.so) Load FAILED with error: libgtkxtbin.so: cannot open shared object file: No such file or directory
*** Registering nsWalletModule components (all right -- a generic module!)
*** Registering nsXMLExtrasModule components (all right -- a generic module!)
*** Registering nsP3PModule components (all right -- a generic module!)
*** Registering "EmbedLite components" components (all right -- a generic module!)
nsNativeComponentLoader: autoregistering succeeded
nNCL: registering deferred (0)
nsNativeComponentLoader: autoregistering begins.
nsNativeComponentLoader: SelfRegisterDll(libwidget_gtk2.so) Load FAILED with error: libgtkxtbin.so: c annot open shared object file: No such file or directory nsNativeComponentLoader: SelfRegisterDll(libgkplugin.so) Load FAILED with error: libgtkxtbin.so: cannot open shared object file: No such file or directory
nsNativeComponentLoader: autoregistering succeeded
nNCL: registering deferred (0)
WARNING: No default pref files found., file nsPrefService.cpp, line 698
WARNING: Failed to create appshell in EmbedPrivate::PushStartup!
, file EmbedPrivate.cpp, line 460
WARNING: NS_ENSURE_TRUE(mInternalWidget = do_CreateInstance(kChildCID)) failed, file nsWebBrowser.cpp, line 1099 ###!!! ASSERTION: You can't dereference a NULL nsCOMPtr with operator->().: 'mRawPtr != 0', file ../../../../dist/include/xpcom/nsCOMPtr.h, line 711
Break: at file ../../../../dist/include/xpcom/nsCOMPtr.h, line 711
./run-mozilla.sh: line 159: 32147 Segmentation fault      "$prog" ${1+"$@"}



Running ./run-mozilla.sh with -g gives a little more information:

0xb7f4c335 in EmbedPrivate::Realize (this=0x80a6df8, aAlreadyRealized=0xbf981534)
    at EmbedPrivate.cpp:264
264         NS_STATIC_CAST(GdkWindow *,


Looking in EmbedPrivate.cpp on line 264 we have:


  // get the native drawing area
  GdkWindow *tmp_window =
    NS_STATIC_CAST(GdkWindow *,
           mozWidget->GetNativeData(NS_NATIVE_WINDOW));


And thats where i am now. Any information on what i have done wrong, what i need to do, or further links to resources about embeding Gecko into applications would be appreciated.

Thanks,
Lance Fitz-Herbert.


_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to