Build on Ubuntu 12.04

1,637 views
Skip to first unread message

alexharrington

unread,
May 4, 2012, 5:07:47 AM5/4/12
to Berkelium
Hey there

I'm looking to build Berkelium on Ubuntu 12.04

I noticed a commit log here that suggests ewencp has it building on
12.04 but I can't figure out what I need to do to make it happen?

https://github.com/sirikata/sirikata/commit/71bb19198cd6e922270783f4840054ab927ff66c

Any help gratefully received :)

Many thanks

Alex

Ewen Cheslack-Postava

unread,
May 4, 2012, 1:08:06 PM5/4/12
to berk...@googlegroups.com
On Fri, May 4, 2012 at 2:07 AM, alexharrington <fast...@gmail.com> wrote:
> Hey there
>
> I'm looking to build Berkelium on Ubuntu 12.04
>
> I noticed a commit log here that suggests ewencp has it building on
> 12.04 but I can't figure out what I need to do to make it happen?

Can you be more specific about the problem you're encountering? There
are instructions in the README.txt, only a couple of commands to run.
What step isn't working?

-Ewen

alexharrington

unread,
May 5, 2012, 6:08:51 AM5/5/12
to Berkelium
> Can you be more specific about the problem you're encountering? There
> are instructions in the README.txt, only a couple of commands to run.
> What step isn't working?

I run ./util/build-chromium.sh --deps

It checks out Chrome sources and begins patching then I get the
following error:

________ running '/usr/bin/python src/build/gyp_chromium' in '/home/
eng/build/berkelium/sirikata-berkelium-9f3b3dc/build/chromium'
Updating projects from gyp files...
Traceback (most recent call last):
File "src/build/gyp_chromium", line 143, in <module>
sys.exit(gyp.main(args))
File "/usr/lib/pymodules/python2.7/gyp/__init__.py", line 457, in
main
options.circular_check)
File "/usr/lib/pymodules/python2.7/gyp/__init__.py", line 101, in
Load
depth, generator_input_info, check, circular_check)
File "/usr/lib/pymodules/python2.7/gyp/input.py", line 2269, in Load
depth, check)
File "/usr/lib/pymodules/python2.7/gyp/input.py", line 435, in
LoadTargetBuildFile
includes, depth, check)
File "/usr/lib/pymodules/python2.7/gyp/input.py", line 435, in
LoadTargetBuildFile
includes, depth, check)
File "/usr/lib/pymodules/python2.7/gyp/input.py", line 435, in
LoadTargetBuildFile
includes, depth, check)
File "/usr/lib/pymodules/python2.7/gyp/input.py", line 363, in
LoadTargetBuildFile
includes, True, check)
File "/usr/lib/pymodules/python2.7/gyp/input.py", line 210, in
LoadOneBuildFile
raise Exception("%s not found (cwd: %s)" % (build_file_path,
os.getcwd()))
Exception: src/third_party/icu/icu.gyp not found (cwd: /home/eng/build/
berkelium/sirikata-berkelium-9f3b3dc/build/chromium) while loading
dependencies of src/base/base.gyp while loading dependencies of src/
app/app.gyp while loading dependencies of src/build/all.gyp while
trying to load src/build/all.gyp
Error: Command /usr/bin/python src/build/gyp_chromium returned non-
zero exit status 1 in /home/eng/build/berkelium/sirikata-
berkelium-9f3b3dc/build/chromium
[0mFailed to install: chromium chromium

Cheers

Alex

Ewen Cheslack-Postava

unread,
May 8, 2012, 2:48:14 PM5/8/12
to berk...@googlegroups.com
This looks like something may have just failed to checkout properly,
I've had this happen sometimes when the network fails while it's
updating Chromium, which can take quite awhile. Maybe try rerunning,
which might get the gclient sync to finish properly?

-Ewen

Alex Harrington

unread,
May 8, 2012, 2:55:02 PM5/8/12
to berk...@googlegroups.com

I have already run it twice but I'll try one more time when I'm able.

Cheers

Alex

Patrick Reiter Horn

unread,
May 9, 2012, 12:08:24 AM5/9/12
to berk...@googlegroups.com
If svn gets an error while syncing, gclient sometimes thinks it was successful so will not try again to update.

Make sure to run gclient sync --force if you want to make sure that svn retries. You can do this by passing --force to util/build-chromium.sh which will also pass it to gclient.

You should see each subrepo (like 70 of them) showing "Updated to version X" instead of just skipping past.

-Patrick

alexharrington

unread,
May 9, 2012, 1:48:56 AM5/9/12
to Berkelium
> Make sure to run gclient sync --force if you want to make sure that svn
> retries. You can do this by passing --force to util/build-chromium.sh which
> will also pass it to gclient.

I ran

util/build-chromium.sh --deps --force

As suggested but still get an error:

pplying patch /home/eng/build/berkelium/sirikata-berkelium-9f3b3dc/
patches/xcode_uuid_change.patch
patching file build/mac/strip_save_dsym
Failed to install: chromium chromium

I'll try blowing the whole lot away and running with --force from the
outset.

Has anyone else successfully built on 12.04? I'm wondering if it's the
switch to Python 2.7 by default that's causing this?

Cheers

Alex

Ewen Cheslack-Postava

unread,
May 9, 2012, 1:45:49 PM5/9/12
to berk...@googlegroups.com
Ah, I didn't look carefully enough at your original email. That patch
to sirikata updates the *chromium8* branch, which is not the default
in the Berkelium repository. Looking at the last commits, I don't
think anybody's tried to make things work properly on the chromium11
branch on 12.04 yet.

-Ewen

alexharrington

unread,
May 9, 2012, 1:47:28 PM5/9/12
to Berkelium
On May 9, 6:45 pm, Ewen Cheslack-Postava <ewe...@cs.stanford.edu>
wrote:
> Ah, I didn't look carefully enough at your original email. That patch
> to sirikata updates the *chromium8* branch, which is not the default
> in the Berkelium repository.

Right - so I should try with chromium8 branch instead?

I'll try now.

Thanks

Alex

Ewen Cheslack-Postava

unread,
May 9, 2012, 1:50:23 PM5/9/12
to berk...@googlegroups.com
Or try porting the changes that got things working on the chromium8
branch to the chromium11. I'm sure others would appreciate that :)

-Ewen

alexharrington

unread,
May 9, 2012, 3:11:52 PM5/9/12
to Berkelium
On May 9, 6:50 pm, Ewen Cheslack-Postava <ewe...@cs.stanford.edu>
wrote:
> Or try porting the changes that got things working on the chromium8
> branch to the chromium11. I'm sure others would appreciate that :)

If I had the skills I would!

I've downloaded the chromium8 branch and I get this now:

No file to patch. Skipping patch.
7 out of 7 hunks ignored
FAILED TO APPLY /home/eng/build/berkelium/sirikata-berkelium-f8c441a/
patches/chromium_text_alpha_hack_win.patch -- Important if this patch
is needed on this platform.
patching file chrome/renderer/render_widget.cc
patching file sandbox/src/policy_broker.h
Hunk #1 succeeded at 7 with fuzz 2 (offset 2 lines).
patching file sandbox/src/sandbox_types.h
patching file chrome/renderer/webplugin_delegate_proxy.cc
patching file sandbox/src/Wow64.cc
patching file build/mac/strip_save_dsym

________ running '/usr/bin/python src/build/gyp_chromium' in '/home/
eng/build/berkelium/sirikata-berkelium-f8c441a/build/chromium'
Updating projects from gyp files...
Traceback (most recent call last):
File "src/build/gyp_chromium", line 97, in <module>
berkelium/sirikata-berkelium-f8c441a/build/chromium) while loading
dependencies of src/base/base.gyp while loading dependencies of src/
app/app.gyp while loading dependencies of src/build/all.gyp while
trying to load src/build/all.gyp
Error: Command /usr/bin/python src/build/gyp_chromium returned non-
zero exit status 1 in /home/eng/build/berkelium/sirikata-berkelium-
f8c441a/build/chromium
Failed to install: chromium chromium

Sorry! I don't really see how I can be messing this up though :/

Alex

Ewen Cheslack-Postava

unread,
May 11, 2012, 11:13:56 PM5/11/12
to berk...@googlegroups.com
Yeah, I'm confused as to what's happening as well.

I just pushed an update to the chromium11 branch that takes care of
merging the patches from the chromium8 branch and installing a couple
of packages explicitly that used to be satisfied implicitly by other
packages we installed. It works fine on Debian testing (modulo having
to manually choose between regular linker or gold), so it's almost
certainly fine on Ubuntu as well.

Your problem is odd in that it just looks like gclient is consistently
failing to check out the third_party/icu properly. Can you take a look
earlier in the input for errors relating to icu? And if you ls in
third_party, do you have a long list of other packages? I count 76
files+directories in there. Or is icu there and just not icu/icu.gyp?

-Ewen

alexharrington

unread,
May 13, 2012, 6:09:12 AM5/13/12
to Berkelium
On May 12, 4:13 am, Ewen Cheslack-Postava <ewe...@cs.stanford.edu>
wrote:
> Yeah, I'm confused as to what's happening as well.

I deleted what I had again and got a fresh copy of the chromium11
branch and it gets much much further now.

Instead I get this:

ACTION Generating SSL False Start blacklist out/Release/obj/gen/net/
base/ssl_false_start_blacklist_data.cc
Have 5126 hosts after parse
Have 5018 hosts after removing duplicates
Have 4846 hosts after removing redundants
Using 128 entry hash table
Largest bucket has 115 entries
CXX(target) out/Release/obj.target/default_plugin/chrome/
default_plugin/plugin_impl_gtk.o
CXX(target) out/Release/obj.target/default_plugin/chrome/
default_plugin/plugin_main.o
AR(target) out/Release/obj.target/third_party/openmax/libil.a
AR(target) out/Release/obj.target/chrome/libdebugger.a
AR(target) out/Release/obj.target/content/libcontent_browser.a
AR(target) out/Release/obj.target/third_party/WebKit/Source/
JavaScriptCore/JavaScriptCore.gyp/libyarr.a
AR(target) out/Release/obj.target/third_party/WebKit/Source/
JavaScriptCore/JavaScriptCore.gyp/libwtf.a
LINK(host) out/Release/protoc
CXX(target) out/Release/obj.target/app_base/ui/base/animation/
animation.o
CXX(target) out/Release/obj.target/app_base/ui/base/animation/
animation_container.o
CXX(target) out/Release/obj.target/app_base/ui/base/animation/
linear_animation.o
CXX(target) out/Release/obj.target/app_base/ui/base/animation/
multi_animation.o
CXX(target) out/Release/obj.target/app_base/ui/base/animation/
slide_animation.o
CXX(target) out/Release/obj.target/app_base/ui/base/animation/
throb_animation.o
CXX(target) out/Release/obj.target/app_base/ui/base/animation/
tween.o
CXX(target) out/Release/obj.target/app_base/ui/base/clipboard/
clipboard.o
CXX(target) out/Release/obj.target/app_base/ui/base/clipboard/
clipboard_linux.o
CXX(target) out/Release/obj.target/app_base/ui/base/clipboard/
scoped_clipboard_writer.o
CXX(target) out/Release/obj.target/app_base/ui/base/dragdrop/
gtk_dnd_util.o
CXX(target) out/Release/obj.target/app_base/ui/base/gtk/
event_synthesis_gtk.o
CXX(target) out/Release/obj.target/app_base/ui/base/gtk/
gtk_signal_registrar.o
CXX(target) out/Release/obj.target/app_base/ui/base/keycodes/
keyboard_code_conversion_gtk.o
CXX(target) out/Release/obj.target/app_base/ui/base/keycodes/
keyboard_code_conversion_x.o
CXX(target) out/Release/obj.target/app_base/ui/base/l10n/
l10n_font_util.o
CXX(target) out/Release/obj.target/app_base/ui/base/l10n/l10n_util.o
CXX(target) out/Release/obj.target/app_base/ui/base/l10n/
l10n_util_posix.o
CXX(target) out/Release/obj.target/app_base/ui/base/models/
button_menu_item_model.o
ui/base/l10n/l10n_util.cc: In function ‘std::string
l10n_util::GetApplicationLocale(const string&)’:
ui/base/l10n/l10n_util.cc:405:55: error: ‘g_get_language_names’ was
not declared in this scope
make: *** [out/Release/obj.target/app_base/ui/base/l10n/l10n_util.o]
Error 1
make: *** Waiting for unfinished jobs....
Failed to install: chromium
eng@xibo-test:~/build/berkelium$

Any ideas?

Cheers

Alex

Ewen Cheslack-Postava

unread,
May 14, 2012, 1:24:05 PM5/14/12
to berk...@googlegroups.com
You could check if that cc file or any headers it includes has
glib/g18n-lib.h included, which according to this
http://developer.gnome.org/glib/2.32/glib-I18N.html is the header you
need for that function.

-Ewen

Mathieu Virbel

unread,
May 15, 2012, 10:24:53 AM5/15/12
to berk...@googlegroups.com
Hi guys,

I just started to build 32 bits version of berkelium, and i runned and resolved most issues you've found already, before checking the forum.
1. So yes, about the "g_get_language_names" missing, you need to apply http://codereview.chromium.org/9360031/diff2/1:6002/ui/base/l10n/l10n_util.cc 
2. You'll also get a crash in "gconf_client_get_default()". By looking at the logs, we are seeing a message "... forgot to call g_type_init()". And that's right, you need to edit build/chromium/src/net/proxy/proxy_config_service_linux.cc, and add "g_type_init();" call just before the line containing "client_ = gconf_client_get_default();"

And then i am currently stuck, crashing on "gdk_window_enable_synchronized_configure()".

Don't look about the "python" part, i'm embedding berkelium as a python extension.
And i'm running chromium-11 branch too.

Mathieu

JPZ

unread,
Jun 13, 2012, 4:11:51 AM6/13/12
to berk...@googlegroups.com

Good morning,
I built the project under ubuntu 12.04 64bits.
First I had the same error that Alex had got :
ui/base/l10n/l10n_util.cc: In function ‘std::string 
l10n_util::GetApplicationLocale(const string&)’: 
ui/base/l10n/l10n_util.cc:405:55: error: ‘g_get_language_names’ was 
not declared in this scope 

I resolved that by changing the includes in the ui/base/l10n/l10n_util.cc file :

#if defined(TOOLKIT_USES_GTK)
//#include <glib/gutils.h>
#include <glib.h>
#endif

After that, the build works well.
Sincerely.
JPZ

alexharrington

unread,
Jun 13, 2012, 12:10:22 PM6/13/12
to Berkelium
> #if defined(TOOLKIT_USES_GTK)
> //#include <glib/gutils.h>
> #include <glib.h>
> #endif

I can get Chromium to build with that patch but when I try and build
Berkelium, it first complains about libspeex being unavailable. I
installed the libspeex-dev package then ran make again, and get the
following error:

Linking CXX shared library liblibberkelium.so
/usr/bin/ld: warning: type and size of dynamic symbol
`jpeg_simd_cpu_support@@LIBJPEG_8.0' are not defined
/usr/bin/ld: build/chromium/src/out/Release/obj.target/third_party/
libjpeg_turbo/../../libjpeg/third_party/libjpeg_turbo/
jcmarker.o(.text.emit_dqt+0x9d): unresolvable R_386_32 relocation
against symbol `jpeg_natural_order@@LIBJPEG_8.0'
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[2]: *** [liblibberkelium.so] Error 1
make[1]: *** [CMakeFiles/libberkelium.dir/all] Error 2
make: *** [all] Error 2

That's on 32 bit Ubuntu 12.04

Cheers

Alex

Ivan Vučica

unread,
Aug 8, 2012, 1:12:58 PM8/8/12
to berk...@googlegroups.com
Hi all,

ditto here. Here are two patches to get it to compile on Ubuntu 12.04 and Clang:
Unfortunately, the libjpeg problem is pestering me. If someone has some tips, I'd appreciate them.

I'm not really sure where to start digging with regards to this problem.

Ivan Vučica

unread,
Aug 8, 2012, 1:55:40 PM8/8/12
to berk...@googlegroups.com
A quick update for this particular issue.

After building and getting the previously mentioned error, edit this file:
./CMakeFiles/libberkelium.dir/link.txt
and remove all instances of " -ljpeg " (surround with spaces so you don't pick up anything else by mistake). Two jpeg libraries are conflicting, apparently.

Unfortunately, I still couldn't get the glut_input.cpp demo to run. I've moved liblibberkelium.so to installed-chromium/. Then, here's a Makefile I quickly whipped together:

demo/glut_input/Makefile
--------------
all: glut_input

glut_input: glut_input.cpp
        clang glut_input.cpp -L../../installed-chromium -llibberkelium $(shell pkg-config --cflags glib-2.0) -I ../../include -I ..  -o glut_input -lGL -lglut
--------------
(I use clang as my compiler.)

Also, the launch will fail immediately if g_type_init() isn't called. Instead of patching Berkelium, I decided it's a bit faster to patch glut_input.cpp:

----------------------
diff --git a/demo/glut_input/glut_input.cpp b/demo/glut_input/glut_input.cpp
index 6a65950..74b1114 100644
--- a/demo/glut_input/glut_input.cpp
+++ b/demo/glut_input/glut_input.cpp
@@ -233,9 +233,10 @@ void idle() {
 
     Berkelium::update();
 }
-
+#include <glib.h>
+#include <glib-object.h>
 int main (int argc, char** argv) {
-
+    g_type_init();
     // Create a GLUT window and setup callbacks
     glutInit(&argc, argv);
     glutInitDisplayMode( GLUT_RGBA | GLUT_DOUBLE );
----------------------

After that, I've copied glut_input to installed_chromium/ (that's how the .so ended there). This seems to be needed so Berkelium can pick up Chromium's data files.

liblibberkelium.so still can't be found, so I modified the dynamic linker search path:

ivucica@ivucica-MacBook:~/berkelium/installed-chromium$ LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH ./glut_input 
[0808/195049:ERROR:Root.cpp(160)] Gtk: IA__gtk_clipboard_get_for_display: assertion `display != NULL' failed
[0808/195049:ERROR:Root.cpp(160)] Gtk: IA__gtk_clipboard_get_for_display: assertion `display != NULL' failed
LaunchApp: failed to execvp:
/home/ivucica/berkelium/build/chromium/src/out/Release/berkelium
[17867:17867:11797833000:ERROR:Root.cpp(160)] GLib-GObject: invalid (NULL) pointer instance
[17867:17867:11797833054:ERROR:Root.cpp(160)] GLib-GObject: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
[17867:17867:11797833158:ERROR:Root.cpp(160)] GLib-GObject: invalid (NULL) pointer instance
[17867:17867:11797833183:ERROR:Root.cpp(160)] GLib-GObject: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
[17867:17867:11797834271:ERROR:Root.cpp(160)] Gdk: IA__gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed

(process:17867): Pango-CRITICAL **: pango_context_set_font_description: assertion `context != NULL' failed

(process:17867): Pango-CRITICAL **: pango_context_set_base_dir: assertion `context != NULL' failed

(process:17867): Pango-CRITICAL **: pango_context_set_language: assertion `context != NULL' failed

(process:17867): Pango-CRITICAL **: pango_layout_new: assertion `context != NULL' failed

(process:17867): Pango-CRITICAL **: pango_layout_set_attributes: assertion `layout != NULL' failed

(process:17867): Pango-CRITICAL **: pango_layout_set_text: assertion `layout != NULL' failed

(process:17867): Pango-CRITICAL **: pango_layout_get_unknown_glyphs_count: assertion `PANGO_IS_LAYOUT (layout)' failed
[17867:17867:11797834666:ERROR:Root.cpp(160)] GLib-GObject: g_object_unref: assertion `G_IS_OBJECT (object)' failed
[17867:17867:11797835088:ERROR:Root.cpp(160)] Gdk: IA__gdk_screen_get_default_colormap: assertion `GDK_IS_SCREEN (screen)' failed
[17867:17867:11797835124:ERROR:Root.cpp(160)] Gdk: IA__gdk_colormap_get_visual: assertion `GDK_IS_COLORMAP (colormap)' failed
[17867:17867:11797835147:ERROR:Root.cpp(160)] Gdk: IA__gdk_screen_get_default_colormap: assertion `GDK_IS_SCREEN (screen)' failed
[17867:17867:11797835171:ERROR:Root.cpp(160)] Gdk: IA__gdk_screen_get_root_window: assertion `GDK_IS_SCREEN (screen)' failed
[17867:17867:11797835199:ERROR:Root.cpp(160)] Gdk: IA__gdk_screen_get_root_window: assertion `GDK_IS_SCREEN (screen)' failed
[17867:17867:11797835222:ERROR:Root.cpp(160)] Gdk: IA__gdk_window_new: assertion `GDK_IS_WINDOW (parent)' failed
Segmentation fault (core dumped)


Backtrace from GDB:

(gdb) bt
#0  0xb3a7183e in gdk_window_enable_synchronized_configure ()
   from /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0
#1  0xb3d38ecb in ?? () from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#2  0xb400e243 in g_cclosure_marshal_VOID__VOIDv ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#3  0xb400adb7 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#4  0xb400c727 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#5  0xb4025a29 in g_signal_emit_valist ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#6  0xb4026453 in g_signal_emit ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#7  0xb3d2ad0b in gtk_widget_realize ()
   from /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0
#8  0xb4d772ff in GtkThemeProvider::GtkThemeProvider() ()
   from /home/ivucica/berkelium/installed-chromium/liblibberkelium.so
#9  0xb4cb0128 in ProfileImpl::InitThemes() ()
   from /home/ivucica/berkelium/installed-chromium/liblibberkelium.so
#10 0xb4caf80f in ProfileImpl::GetThemeProvider() ()
   from /home/ivucica/berkelium/installed-chromium/liblibberkelium.so
#11 0xb4b9023e in ExtensionService::GarbageCollectExtensions() ()
   from /home/ivucica/berkelium/installed-chromium/liblibberkelium.so
#12 0xb4b902ce in ExtensionService::Init() ()
   from /home/ivucica/berkelium/installed-chromium/liblibberkelium.so
---Type <return> to continue, or q <return> to quit---
#13 0xb4cb5aa7 in ProfileImpl::InitExtensions() ()
   from /home/ivucica/berkelium/installed-chromium/liblibberkelium.so
#14 0xb4a71849 in Berkelium::Root::init (this=0x80f99b0, homeDirectory=..., 
    subprocessDirectory=..., extra_argc=0, extra_argv=0x0)
    at /home/ivucica/berkelium/src/Root.cpp:505
#15 0xb4a5fa38 in Berkelium::init (homeDirectory=..., extra_argc=0, 
    extra_argv=0x0) at /home/ivucica/berkelium/src/Berkelium.cpp:53
#16 0x0804b413 in main ()




Any ideas?

--
Ivan Vučica - iv...@vucica.net


Andrea Magnetto

unread,
Oct 11, 2012, 7:19:13 AM10/11/12
to berk...@googlegroups.com
I've tried to build berkelium on Ubuntu 12.04. It works
but I get the same problems as Ivan while running it.

This is the output of make test:


1011/131639:ERROR:Root.cpp(160)] Gtk:
IA__gtk_clipboard_get_for_display: assertion `display != NULL' failed
[1011/131639:ERROR:Root.cpp(160)] Gtk:
IA__gtk_clipboard_get_for_display: assertion `display != NULL' failed
[9408:9408:13122556295:ERROR:Root.cpp(160)] GLib-GObject:
/build/buildd/glib2.0-2.32.3/./gobject/gtype.c:2722: You forgot to
call g_type_init()
[9408:9408:13122556834:ERROR:Root.cpp(160)] GLib: g_once_init_leave:
assertion `result != 0' failed
[9408:9408:13122557275:ERROR:Root.cpp(160)] GLib-GObject:
/build/buildd/glib2.0-2.32.3/./gobject/gtype.c:2722: You forgot to
call g_type_init()
[9408:9408:13122557710:ERROR:Root.cpp(160)] GLib-GObject:
/build/buildd/glib2.0-2.32.3/./gobject/gtype.c:2722: You forgot to
call g_type_init()
[9408:9408:13122558168:ERROR:Root.cpp(160)] GLib-GObject:
/build/buildd/glib2.0-2.32.3/./gobject/gtype.c:2722: You forgot to
call g_type_init()
[9408:9408:13122558656:ERROR:Root.cpp(160)] GLib-GObject:
g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE
(instance_type)' failed
[9408:9408:13122559139:ERROR:Root.cpp(160)] GLib-GObject:
/build/buildd/glib2.0-2.32.3/./gobject/gtype.c:2722: You forgot to
call g_type_init()
[9408:9408:13122559584:ERROR:Root.cpp(160)] GLib-GObject:
g_type_interface_add_prerequisite: assertion `G_TYPE_IS_INTERFACE
(interface_type)' failed
[9408:9408:13122560042:ERROR:Root.cpp(160)] GLib: g_once_init_leave:
assertion `result != 0' failed
[9408:9408:13122560448:ERROR:Root.cpp(160)] GLib-GObject:
g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE
(instance_type)' failed
[9408:9408:13122560839:ERROR:Root.cpp(160)] GLib-GObject:
/build/buildd/glib2.0-2.32.3/./gobject/gtype.c:2722: You forgot to
call g_type_init()

Do you have any suggestion?

Thanks in advance
Andrea

2012/8/8 Ivan Vučica <ivu...@gmail.com>:

Ivan Vučica

unread,
Oct 11, 2012, 9:41:13 AM10/11/12
to berk...@googlegroups.com
Andrea,

you need to add g_type_init() to main(). But after adding it, I suspect you'll have the same crashes as I will.

Dennis Rieks

unread,
Oct 11, 2012, 12:21:34 PM10/11/12
to berk...@googlegroups.com
Hi,

im working on a new berkelium version with support for all current
chromium versions. this version should compile well on win/mac and
ubuntu 10.04/12.04

there is a lot of work to do, this version not not yet usable.. only
onPaint and onTitleChange are working more or less. i will write an
overview in the next few days.

Code is available at https://github.com/berkelium/berkelium

Dennis


2012/10/11 Ivan Vučica <ivu...@gmail.com>:
--
Dennis Rieks

netzprofis GmbH & Co. KG
Saarlandstraße 25
44139 Dortmund

Fon: +49-231-399802-70
Fax: +49-231-399802-69
Cell: +49-179-5492192
Skype: dennisrieks

USt-IdNr. DE225365236 Amtsgericht Dortmund HRA 16304, Komplementärin:
Netzprofis Verwaltungsgesellschaft mbH Amtsgericht Dortmund HRB 20179,
Geschäftsführer: Thomas Louis

djan riza

unread,
Oct 12, 2012, 1:57:50 AM10/12/12
to berk...@googlegroups.com
Hello, 

Thanks for your answer. I have already post a reply on the google.groups

Regards 

Patrick Reiter Horn

unread,
Oct 12, 2012, 3:24:47 AM10/12/12
to berk...@googlegroups.com
Wow, this is awesome news!
I really like the start you have.

There are a few concerns that I had when writing the initial implementation of Berkelium, which contributed heavily to its messiness.
1. Root and Berkelium.cpp: The ContentMainDelegate seems to have removed the need for most of this copy-and-paste stuff.
2. Complete reimplementation of TabContents (and by extension, a copy-and-paste of NavigationController). This was really ugly, and again the need to the do this is obsoleted by the new interfaces
3. WindowImpl and Widget: implementations of what is now WebContentsView and RenderViewHostDelegateView may still need to implement some of these functions to expose similar functionality for what is currently supported in berkelium 11.

It sounds like you have #1 and #2 down which cuts down the ugly code a ton, and it's a really good start. I'm not sure what's involved in replacing #3, but we can add features back as we need them and so far the code is a ton cleaner. I also like the idea of the extra public IPC interface in theory, and in reality for everything except for paint events.

However, I have concerns regarding the IPC interface, and I'm worried it's going to hurt the performance. Right now, it looks like you are sending the data that changed to the host process, rather than using shared-memory like the interface between the Renderer process and the Browser process.

This is going to become a bigger problem if you include GPU-rendered content. One of the things that I was hoping to add to berkelium would be a way to keep the data on GPU. However, if we send data to another process, I'm worried that we may have to copy data into the CPU and then back to the GPU, which could hurt framerate for video or other content rendered on the graphics hardware. True, it's no worse than what we have right now, but I'm worried it could be bad for animations and other hardware accelerated content.

I'm not sure what to do about this, but it's one reason I liked the ability to link berkelium directly to chromium as a library and link to an application so that we don't need to make another copy of graphics data.

For use cases with fewer page updates, or where performance isn't a concern, this implementation is going to be much simpler to use, so that's a benefit.

-Patrick

Ivan Vučica

unread,
Oct 12, 2012, 1:29:27 PM10/12/12
to berk...@googlegroups.com
Is there a chance that this new Berkelium somehow gets integrated into upstream Chromium? It might get attention from more developers that way, and ensure less breakage, if you can squeeze it into upstream.
--
Ivan Vučica
iv...@vucica.net - http://ivan.vucica.net/

Dennis Rieks

unread,
Oct 14, 2012, 6:53:28 PM10/14/12
to berk...@googlegroups.com
Hi,

integrating into upstream chromium is a good idea, but i think we must
first have a stable version. another question are bindings for other
languages than c++, im not sure if they are welcome there. I plan some
patches for easier berkelium builds, currently patches to chromium are
needed to build/link berkelium.

- Dennis

2012/10/12 Ivan Vučica <ivu...@gmail.com>:

Dennis Rieks

unread,
Oct 14, 2012, 7:14:27 PM10/14/12
to berk...@googlegroups.com
Hi,

see inline.

Dennis

2012/10/12 Patrick Reiter Horn <patric...@gmail.com>:
> Wow, this is awesome news!
> I really like the start you have.
>
> There are a few concerns that I had when writing the initial implementation
> of Berkelium, which contributed heavily to its messiness.
> 1. Root and Berkelium.cpp: The ContentMainDelegate seems to have removed the
> need for most of this copy-and-paste stuff.
> 2. Complete reimplementation of TabContents (and by extension, a
> copy-and-paste of NavigationController). This was really ugly, and again the
> need to the do this is obsoleted by the new interfaces
> 3. WindowImpl and Widget: implementations of what is now WebContentsView and
> RenderViewHostDelegateView may still need to implement some of these
> functions to expose similar functionality for what is currently supported in
> berkelium 11.
>
> It sounds like you have #1 and #2 down which cuts down the ugly code a ton,
> and it's a really good start. I'm not sure what's involved in replacing #3,
> but we can add features back as we need them and so far the code is a ton
> cleaner. I also like the idea of the extra public IPC interface in theory,
> and in reality for everything except for paint events.

Yes, #1 is almost complete. #2 and #3 must be extended for every
needed function, but i think this should be easy.
there is currently only one window/tab supported, but i think it will
not be to hard to implement this.

> However, I have concerns regarding the IPC interface, and I'm worried it's
> going to hurt the performance. Right now, it looks like you are sending the
> data that changed to the host process, rather than using shared-memory like
> the interface between the Renderer process and the Browser process.

socket ipc is only a workaround, i had no time to look at shared
memory ipc yet. I agree with you that copying the memory around will
be very inefficient. one idea was to record all ipc messages with
timestamps into a file so this session can be later played back for
testing or debugging purposes.

>
> This is going to become a bigger problem if you include GPU-rendered
> content. One of the things that I was hoping to add to berkelium would be a
> way to keep the data on GPU. However, if we send data to another process,
> I'm worried that we may have to copy data into the CPU and then back to the
> GPU, which could hurt framerate for video or other content rendered on the
> graphics hardware. True, it's no worse than what we have right now, but I'm
> worried it could be bad for animations and other hardware accelerated
> content.

Im interested in using berkelium for open gl textures, so it would be
good if it is not needed to download and reupload gpu content. but
currently i have no plans for this..

>
> I'm not sure what to do about this, but it's one reason I liked the ability
> to link berkelium directly to chromium as a library and link to an
> application so that we don't need to make another copy of graphics data.

the main reason why i use a seperat executable is to break down 32/64
bit problems. as long as there is no 64 bit chrome it is not possible
to use berkelium with an 64 bit application, e.g. a 64 bit java vm on
windows.

>
> For use cases with fewer page updates, or where performance isn't a concern,
> this implementation is going to be much simpler to use, so that's a benefit.

I definitely want to use shared memory as the standard ipc method. but
socket communication could be interesting for client / server
applications i think. We must have a look at this matter... :-)

-Dennis

Dennis Rieks

unread,
Oct 14, 2012, 7:24:09 PM10/14/12
to berk...@googlegroups.com
Hi,

im not sure if Widget is really needed. a context menu can be
implemented using html divs or directly by a native approach of the
client application...

i never used it for berkelium-java...

Also all berkelium javascript classes are not directly needed, i think
it is easer to inject javascript code as strings, especially because
javascript is typeless...

Dennis

2012/10/15 Dennis Rieks <ri...@netzprofis.de>:

Ewen Cheslack-Postava

unread,
Oct 14, 2012, 7:25:49 PM10/14/12
to berk...@googlegroups.com
On Sun, Oct 14, 2012 at 4:24 PM, Dennis Rieks <ri...@netzprofis.de> wrote:
> Hi,
>
> im not sure if Widget is really needed. a context menu can be
> implemented using html divs or directly by a native approach of the
> client application...

Some people have been using Berkelium to display existing pages that
they can't modify. They wouldn't have these alternatives as an option.

-Ewen

Patrick Reiter Horn

unread,
Oct 14, 2012, 7:32:31 PM10/14/12
to berk...@googlegroups.com
I think the only thing that uses Widget is the <select> tag :-/ Problem is, sometimes it's a required field in a form and now you have no choice but to implement it. There might be one or two other obscure things in HTML that use widgets, but that's the only important thing I can think of. If I could think of a simpler way to do this, I would... one thing we can do is paint the widget directly to the backing store, and hope the page doesn't scroll while it was open.

Regarding the IPC, it makes a lot of sense. I agree about the 64-bit issue. It's not been a problem on linux, but 64-bit for windows and mac is probably not coming any time soon... It also means we don't need to build berkelium on Linux with a hardcoded list of 100 libraries and crazy compiler options just to get the thing to link, so a huge benefit for maintainability. So let's go down this path--I think it's a clean design, and we can always add shared memory for paint in the future (we can make a copy, or use the same shared memory as the renderer and browser process).

-Patrick

Ewen Cheslack-Postava

unread,
Oct 14, 2012, 10:02:41 PM10/14/12
to berk...@googlegroups.com
Happy to see work on an updated version, but in the meantime, I fixed
up the build on 12.04 (and it should still be working fine on older
Ubuntus, I tested on 10.04 as well). Current chromium11 branch has
this fix.

Note that one of the fixes (for the g_type_init() issue discussed
earlier), https://github.com/sirikata/berkelium/commit/30dcf2c8da3147333e6921748e0cbd6ed3166a95#diff-2
, ends up calling g_type_init() *and* gtk_init(). I'm guessing this is
why Mathieu was seeing the crash after adding a call to g_type_init().
However, adding this means that if your own application was calling
gtk_init there may be a conflict. Not sure if that's the case, but
figured I'd warn people in case they start seeing a problem.

-Ewen
Reply all
Reply to author
Forward
0 new messages