Can't properly build cef2go.

180 views
Skip to first unread message

Timur Fayzrakhmanov

unread,
Dec 10, 2014, 8:46:26 AM12/10/14
to cef...@googlegroups.com
Hello, I'm trying to get work CEF in go. I've read instructions at the main page of the project, install dependencies, download the CEF_linux64.zip archive and exctract it into cef2go/Release. But when I try to make the cef2go, I get the following:

Makefile:22: extraneous text after 'else' directive
make Linux
make[1]: Entering directory '/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go'
Makefile:22: extraneous text after 'else' directive
clear
[3;J
go install gtk
# gtk
/usr/bin/ld: warning: libudev.so.0, needed by /home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so, not found (try using -rpath or -rpath-link)
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_monitor_unref'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_enumerate_scan_devices'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_new'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_list_entry_get_name'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_enumerate_get_list_entry'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_list_entry_get_next'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_device_new_from_syspath'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_monitor_receive_device'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_device_get_property_value'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_unref'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_monitor_enable_receiving'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_monitor_filter_add_match_subsystem_devtype'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_monitor_get_fd'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_device_get_devnode'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_device_get_subsystem'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_enumerate_unref'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_enumerate_new'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_device_get_parent_with_subsystem_devtype'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_monitor_new_from_netlink'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_device_unref'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_device_get_sysattr_value'
/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/libcef.so: undefined reference to `udev_enumerate_add_match_subsystem'
collect2: error: ld returned 1 exit status
Makefile:33: recipe for target 'Linux' failed
make[1]: *** [Linux] Error 2
make[1]: Leaving directory '/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go'
Makefile:30: recipe for target 'detect_os' failed
make: *** [detect_os] Error 2

What's wrong?


Czarek Tomczak

unread,
Dec 10, 2014, 9:31:12 AM12/10/14
to cef...@googlegroups.com
"Extraneous text" warning fixed here: https://github.com/CzarekTomczak/cef2go/commit/7ddce364e44a67325e9c3f5d6d26459a44d50bf7

The second part fails because libudev.so.0 is missing. For example Ubuntu 12 has this library, but subsequent Ubuntu 13 and 14 do not.  To fix it on Ubuntu 14 create a symbolic link like this:
     cd /lib/x86_64-linux-gnu/
     sudo ln -sf libudev.so.1 libudev.so.0
The path to libudev.so.1 may be different on other OS'es, see:
       * Ubuntu, Xubuntu, Mint - /lib/x86_64-linux-gnu/
       * SUSE, Fedora - /usr/lib64/
       * Arch, Fedora 32bit - /usr/lib/
       * Ubuntu 32bit - /lib/i386-linux-gnu/

Alternatively you may create that symbolic link in app directory and set LD_LIBRARY_PATH or rpath appropriately so that it knows where to look for it.

Dependency on libudev.so.0 is going to be removed in Chrome 41.


--
You received this message because you are subscribed to the Google Groups "CEF2go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cef2go+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/cef2go.
To view this discussion on the web visit https://groups.google.com/d/msgid/cef2go/121f7d1e-7ae1-4fce-91d7-8f771322f8c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Timur Fayzrakhmanov

unread,
Dec 10, 2014, 3:36:09 PM12/10/14
to cef...@googlegroups.com
It's great man! Now something has changed! I greated by new window..
Here is new output from terminal:

go install gtk
go install cef
go test -ldflags "-r /home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release" src/tests/cef_test.go
ok   command-line-arguments 0.214s
go build -ldflags "-r ." -o Release/cef2go src/main_linux.go
cd Release && ./cef2go && cd ../
[cef] cef.go:94: ExecuteProcess, args= [./cef2go]
initialize_app_handler
initialize_cef_base
cef_base_t.size = 72
initialize_client_handler
initialize_cef_base
cef_base_t.size = 144
[cef] cef_linux.go:25: FillMainArgs, argc= 1
cef_base_t.add_ref
cef_base_t.release
[cef] cef.go:112: Initialize
[cef] cef.go:133: CachePath= /home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/webcache
[cef] cef.go:148: LogFile= /home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/debug.log
[cef] cef.go:163: ResourcesDirPath= /home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release
[cef] cef.go:178: LocalesDirPath= /home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/locales
on_before_command_line_processing
on_register_custom_schemes
get_browser_process_handler
[cef] cef.go:94: ExecuteProcess, args= [/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/cef2go --type=zygote --no-sandbox --lang=en-US --locales-dir-path=/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/locales --log-file=/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/debug.log --resources-dir-path=/home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release]
initialize_app_handler
initialize_cef_base
cef_base_t.size = 72
initialize_client_handler
initialize_cef_base
cef_base_t.size = 144
[cef] cef_linux.go:25: FillMainArgs, argc= 7
cef_base_t.add_ref
cef_base_t.release
on_before_command_line_processing
on_register_custom_schemes
[gtk] gtk.go:42: CreateWindow
[gtk] gtk.go:78: ConnectDestroySignal
[cef] cef.go:195: CreateBrowser, url= file:///home/timur/cloud/go/src/github.com/CzarekTomczak/cef2go/Release/example.html
[cef] cef_linux.go:34: FillWindowInfo
[cef] cef.go:232: RunMessageLoop
get_life_span_handler
get_load_handler
get_focus_handler
[1210/231906:ERROR:renderer_main.cc(226)] Running without renderer sandbox
get_render_process_handler
get_request_handler
get_display_handler

I don't know much what is going on here, but is the message "[1210/231906:ERROR:renderer_main.cc(226)] Running without renderer sandbox" normal?

Timur Fayzrakhmanov

unread,
Dec 10, 2014, 5:04:11 PM12/10/14
to cef...@googlegroups.com
Now I can't make "Hello world".
I can't understand where to place your repository.
Now I have the following structure:
#I've the root of your project into ~/.profile file
#export GOPATH=$HOME/cloud/go:$HOME/cloud/go/src/github.com/CzarekTomczak/cef2go
cloud
/go/src/github.com/CzarekTomczak/cef2go
#project path
cloud/go/src/myapp/app.go

However when I try to "go run app.go", I get the following:
/tmp/go-build526896982/command-line-arguments/_obj/exe/app: error while loading shared libraries: libcef.so: cannot open shared object file: No such file or directory
exit status 127

What need I do?

Czarek Tomczak

unread,
Dec 10, 2014, 5:15:55 PM12/10/14
to cef...@googlegroups.com
Sandboxing is disabled, it's safe to ignore that error message.

There may be changes required to use cef2go as a package. I know that paperlesspost/cef2go fork did dir/file restructuring to accomplish it. Please create an issue in the tracker.

--
You received this message because you are subscribed to the Google Groups "CEF2go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cef2go+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/cef2go.

Timur Fayzrakhmanov

unread,
Dec 11, 2014, 5:00:04 AM12/11/14
to cef...@googlegroups.com
If to be honest I can't get it work yet. Please, what do I need?

Czarek Tomczak

unread,
Dec 11, 2014, 5:44:12 AM12/11/14
to cef...@googlegroups.com
I have created a separate issue: https://github.com/CzarekTomczak/cef2go/issues/21

Please do not ask questions in the tracker.

Regarding "error while loading shared libraries: libcef.so: ". It couldn't find the library. See https://github.com/CzarekTomczak/cef2go#getting-started-on-linux > step 3. You have to copy binaries to your app directory, to where your final executable resides.



On Thu, Dec 11, 2014 at 11:00 AM, Timur Fayzrakhmanov <hanggli...@gmail.com> wrote:
If to be honest I can't get it work yet. Please, what do I need?

--
You received this message because you are subscribed to the Google Groups "CEF2go" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cef2go+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/cef2go.

Timur Fayzrakhmanov

unread,
Dec 11, 2014, 1:44:16 PM12/11/14
to cef...@googlegroups.com
Now it works! But still it seems like I do something tricky. 

Please, check out my steps:
  1. Download your repository and place it is in: ~/go/src/github.com/CzarekTomczak/cef2go
  2. Make link as you said: cd /lib/x86_64-linux-gnu/ && sudo ln -sf libudev.so.1 libudev.so.0
  3. Run make in the repository's root directory.
  4. Add the path ~/go/src/github.com/CzarekTomczak/cef2go/src in the ~/.profile file: export GOPATH=$HOME/go:$HOME/go/src/github.com/CzarekTomczak/cef2go
  5. Copy content placed under ~/go/src/github.com/CzarekTomczak/cef2go/src into my project's root directory
  6. Copy file libcef.so into the same project's root directory
  7. Run go run main_linux.go in project's root directory
  8. Works!
May be there is more simple way to get it work? If isn't may be it need to be explained?
Reply all
Reply to author
Forward
0 new messages