-
-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New cef linux release or build instructions #16
Comments
The Linux release was built from sources to disable tcmalloc memory allocator global hook. When CEF .so library is imported that hook will replace the default malloc implementation. As a precaution I've prepared a custom build for CEF2go to disable that, as I've had problems with tcmalloc in another project. In CEF Python when CEF was not the very first library imported then it caused random segmentation faults in app in unrelated places (eg. wx imported first and allocated memory using malloc, then cef library imported and hooked tcmalloc, if now wx tries to free its memory seg fault may occur). If you can guarantee that CEF .so library is the first one loaded, then you don't need a custom build and could use one from cefbuilds.com. It might even not be an issue at all with Go, I don't know if that tcmalloc hook is going to cause issues in Go same as it did in Python. You can download branch 1750 from here: When updating you should compare include/capi/ directories from current cef2go binary (branch 1750 revision 1604) and the new binary (branch 1750 revision 1794). There might be some minor changes, like a new variable in one of client handlers callback was added. If so then you need to update headers in the cef2go/handlers/ directory. So basically when comparing include/capi/ directories, check any file that ends with "_handler_capi.h", whether it was modified. If it's referenced in cef2go/handlers/ then you you need to modify of what have changed. There are also a few non-handlers imported, these are: cef_base_capi.h, cef_client_capi.h and cef_app_capi.h - you should check modifications for these as well. I don't think that there would be any more changes, but if some basic function like cef_create_browser was modified (or one of the keys in cef_settings_t that are exposed by cef2go), then you would also need to make changes in src/cef/cef.go. If you need to build from sources with tcmalloc disabled, then see here on how to disable it: |
Build instructions for CEF are here: You may as well use the instructions from CEF Python, but some sections that are cefpython specific should be ignored: |
After a second thought, I don't think tcmalloc hoook needs to be disabled. In Python the CEF library is dynamically initialized/loaded during program execution. I don't think this is the case with Go, as it's a compiled language and I think CEF library is initialized before main program is executed. During that initialization of library the tcmalloc allocator is globally hooked. In C++ tcmalloc hook is not an issue, so it also shouldn't be an issue in Go. I think it should be safe to use builds from http://cefbuilds.com without need to compile Chromium from sources. |
@CzarekTomczak I was actually just updating this issue! I finally tried building with a cefbuilds version last week and with a little twiddling was able to get it to work. See: paperlesspost/cef2go@master...upgrade_to_2272 Besides some header and api related changes, the biggest change is that new CEF actually no longer relies on GTK for linux which makes booting and doing offscreen rendering like we are MUCH faster and easier and requires less dependencies. Unfortunately it didnt fix #8 and I'm still trying to debug and figure that out. It also changed the way the path structure had to be laid out (a bunch of files are now hard-coded to have to be in the same dir as the application binaries), so theres some work to do in figuring out how to make that simpler. |
I see that you use the --single-process flag. Know that this mode is not stable and is meant only to ease debugging. When using the |
See comment |
Interesting - will definitely try those flags now. RE: single-process, been going back and forth with this because when On Thu, Feb 12, 2015 at 3:43 PM, Czarek Tomczak notifications@github.com
|
After reading around the forums I'm realizing that upgrading libcef itself on linux is not just a matter of dropping in the new headers and .so file, but that the build hosted here is different than the one provided by cefbuilds. Is it possible to upload a build of the new stable release? Or document the build process somewhere?
The text was updated successfully, but these errors were encountered: