Building on OSX El Capitan

169 views
Skip to first unread message

al...@decoded.com

unread,
Mar 16, 2016, 6:15:23 AM3/16/16
to CEF2go
Hi
I have pulled your repository on my mac.

I have downloaded the CEF binary (64 bit) from here: https://cefbuilds.com/ the 32bit one is depricated.

In that zip, is the release folder containing this, amongst others:

```
/Users/alex/Downloads/cef_binary_3.2641.1392.ge1aa8cc_macosx64 2/Release
└── Chromium Embedded Framework.framework
└── Resources
├── am.lproj
├── ar.lproj
├── bg.lproj
├── bn.lproj
├── ca.lproj
├── crash_report_sender.app
│   └── Contents
│   ├── MacOS
│   └── Resources
│   └── English.lproj
├── cs.lproj
├── da.lproj
```

I copied the Chromium Embedded Framework.framework to `cef2go/Release/Chromium Embedded Framework.framework`

I ran make.

I get:

```
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -o $WORK/cef/_obj/_cgo_.o $WORK/cef/_obj/_cgo_main.o $WORK/cef/_obj/_cgo_export.o $WORK/cef/_obj/cef.cgo2.o $WORK/cef/_obj/cef_darwin.cgo2.o -F/Users/alex/go/src/github.com/amlwwalker/cztomczak/cef2go/Release/tmp -framework Cocoa -framework cef -framework Cocoa
# cef
ld: framework not found cef
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Darwin] Error 2
make: *** [detect_os] Error 2
```

This is one line in the makefile I think that is relevant:

```
export CGO_LDFLAGS=-F$(PWD)/Release/tmp -framework Cocoa -framework cef
```

I can see in the makefile this, for Darwin:

```
cp -rf Release/cef2go.app/Contents/Frameworks/Chromium\ Embedded\ Framework.framework Release/tmp/cef.framework ;\
mv Release/tmp/cef.framework/Chromium\ Embedded\ Framework Release/tmp/cef.framework/cef ;\
```

Is it incorrect??

Thanks
Alex

Czarek Tomczak.

unread,
Mar 16, 2016, 7:57:06 AM3/16/16
to CEF2go

miked...@gmail.com

unread,
May 26, 2016, 12:50:49 PM5/26/16
to CEF2go
I am getting the same error, and following the directions you posted do not help. I am not trying to use a newer version, I am using the one provided in the github OSX section. If I do build a new version and follow all the directions with replacing filenames and strings I still get the error.

Can you please advise a solution, or be more specific as to what I am looking for in those posts? I don't see anything that seems to help, tested all advice on newer cef and with cef provided by the author on github.

miked...@gmail.com

unread,
May 26, 2016, 1:52:51 PM5/26/16
to CEF2go
Ok I got past it, apparently I must have ran make before placing the files once, after blowing away the Release/tmp dir things sort of worked. First I got an error about building i386 since I am using x86_64, so I built the latest cef and did all the renames and string replacement, but now the app wont run. Here is the error:

make Darwin
clear
Copying CEF framework directory to Release/tmp
go install -x cef
WORK=/var/folders/3j/r05hk92x5yl41t3vfpzrbq5cf700p2/T/go-build268697270
rm -f Release/cef2go.app/Contents/MacOS/cef2go
go build -x -ldflags "-r ." -o Release/cef2go.app/Contents/MacOS/cef2go src/main_darwin.go
WORK=/var/folders/3j/r05hk92x5yl41t3vfpzrbq5cf700p2/T/go-build979417945
mkdir -p $WORK/cocoa/_obj/
mkdir -p $WORK/
cd /Users/s0043826/GitRepos/cef2go/src/cocoa
CGO_LDFLAGS="-F/Users/s0043826/GitRepos/cef2go/Release/tmp" "-framework" "Cocoa" "-framework" "cef" "-framework" "Cocoa" "-framework" "Cocoa" /usr/local/Cellar/go/1.6.2/libexec/pkg/tool/darwin_amd64/cgo -objdir $WORK/cocoa/_obj/ -importpath cocoa -- -I $WORK/cocoa/_obj/ -I./../../ -x objective-c -I./../../ -x objective-c cocoa.go export.go
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/cocoa/_obj/ -g -O2 -I./../../ -x objective-c -I./../../ -x objective-c -o $WORK/cocoa/_obj/_cgo_main.o -c $WORK/cocoa/_obj/_cgo_main.c
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/cocoa/_obj/ -g -O2 -I./../../ -x objective-c -I./../../ -x objective-c -o $WORK/cocoa/_obj/_cgo_export.o -c $WORK/cocoa/_obj/_cgo_export.c
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/cocoa/_obj/ -g -O2 -I./../../ -x objective-c -I./../../ -x objective-c -o $WORK/cocoa/_obj/cocoa.cgo2.o -c $WORK/cocoa/_obj/cocoa.cgo2.c
# cocoa
src/cocoa/cocoa.go:30:5: warning: implicit declaration of function '_GoDestroySignal' is invalid in C99 [-Wimplicit-function-declaration]
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -I $WORK/cocoa/_obj/ -g -O2 -I./../../ -x objective-c -I./../../ -x objective-c -o $WORK/cocoa/_obj/export.cgo2.o -c $WORK/cocoa/_obj/export.cgo2.c
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -o $WORK/cocoa/_obj/_cgo_.o $WORK/cocoa/_obj/_cgo_main.o $WORK/cocoa/_obj/_cgo_export.o $WORK/cocoa/_obj/cocoa.cgo2.o $WORK/cocoa/_obj/export.cgo2.o -F/Users/s0043826/GitRepos/cef2go/Release/tmp -framework Cocoa -framework cef -framework Cocoa -framework Cocoa
/usr/local/Cellar/go/1.6.2/libexec/pkg/tool/darwin_amd64/cgo -objdir $WORK/cocoa/_obj/ -dynpackage cocoa -dynimport $WORK/cocoa/_obj/_cgo_.o -dynout $WORK/cocoa/_obj/_cgo_import.go
clang -I . -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common -o $WORK/cocoa/_obj/_all.o $WORK/cocoa/_obj/_cgo_export.o $WORK/cocoa/_obj/cocoa.cgo2.o $WORK/cocoa/_obj/export.cgo2.o -F/Users/s0043826/GitRepos/cef2go/Release/tmp -Wl,-r -nostdlib
/usr/local/Cellar/go/1.6.2/libexec/pkg/tool/darwin_amd64/compile -o $WORK/cocoa.a -trimpath $WORK -p cocoa -buildid 5a70bb8c0d8babe688bf29f229baac0c4663debc -D _/Users/s0043826/GitRepos/cef2go/src/cocoa -I $WORK -pack $WORK/cocoa/_obj/_cgo_gotypes.go $WORK/cocoa/_obj/cocoa.cgo1.go $WORK/cocoa/_obj/export.cgo1.go $WORK/cocoa/_obj/_cgo_import.go
pack r $WORK/cocoa.a $WORK/cocoa/_obj/_all.o # internal
mkdir -p $WORK/command-line-arguments/_obj/
mkdir -p $WORK/command-line-arguments/_obj/exe/
cd /Users/s0043826/GitRepos/cef2go/src
/usr/local/Cellar/go/1.6.2/libexec/pkg/tool/darwin_amd64/compile -o $WORK/command-line-arguments.a -trimpath $WORK -p main -complete -buildid 7b809025c458232a71da5e67d22e01e02e6ca13e -D _/Users/s0043826/GitRepos/cef2go/src -I $WORK -I /Users/s0043826/GitRepos/cef2go/pkg/darwin_amd64 -pack ./main_darwin.go
cd .
/usr/local/Cellar/go/1.6.2/libexec/pkg/tool/darwin_amd64/link -o $WORK/command-line-arguments/_obj/exe/a.out -L $WORK -L /Users/s0043826/GitRepos/cef2go/pkg/darwin_amd64 -extld=clang -buildmode=exe -buildid=7b809025c458232a71da5e67d22e01e02e6ca13e -r . $WORK/command-line-arguments.a
mkdir -p Release/cef2go.app/Contents/MacOS/
mv $WORK/command-line-arguments/_obj/exe/a.out Release/cef2go.app/Contents/MacOS/cef2go
install_name_tool -change @executable_path/Chromium\ Embedded\ Framework @executable_path/../Frameworks/Chromium\ Embedded\ Framework.framework/Chromium\ Embedded\ Framework Release/cef2go.app/Contents/MacOS/cef2go
cp -f Release/example.html Release/cef2go.app/Contents/MacOS/example.html
cd Release/cef2go.app/Contents/MacOS && ./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_darwin.go:32: FillMainArgs, argc= 1
cef_base_t.add_ref
cef_base_t.release
[cef] cef.go:112: Initialize
[cef] cef.go:133: CachePath= /Users/s0043826/GitRepos/cef2go/Release/cef2go.app/Contents/MacOS/webcache
[cef] cef.go:148: LogFile= /Users/s0043826/GitRepos/cef2go/Release/cef2go.app/Contents/MacOS/debug.log
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x4a pc=0x7fff8bcccf49]

runtime stack:
runtime.throw(0x413bd60, 0x2a)
/usr/local/Cellar/go/1.6.2/libexec/src/runtime/panic.go:547 +0x90
runtime.sigpanic()
/usr/local/Cellar/go/1.6.2/libexec/src/runtime/sigpanic_unix.go:12 +0x5a

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x40b9e00, 0xc820055d00, 0x0)
/usr/local/Cellar/go/1.6.2/libexec/src/runtime/cgocall.go:123 +0x11b fp=0xc820055cc8 sp=0xc820055c98
cef._Cfunc_cef_initialize(0x26802360, 0x26802000, 0x26800160, 0x0, 0x0)
??:0 +0x41 fp=0xc820055d00 sp=0xc820055cc8
cef.Initialize(0xc820014370, 0x4a, 0x0, 0xc8200143c0, 0x4b, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/s0043826/GitRepos/cef2go/src/cef/cef.go:189 +0x1217 fp=0xc820055e88 sp=0xc820055d00
main.main()
/Users/s0043826/GitRepos/cef2go/src/main_darwin.go:30 +0x116 fp=0xc820055f50 sp=0xc820055e88
runtime.main()
/usr/local/Cellar/go/1.6.2/libexec/src/runtime/proc.go:188 +0x2b0 fp=0xc820055fa0 sp=0xc820055f50
runtime.goexit()
/usr/local/Cellar/go/1.6.2/libexec/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc820055fa8 sp=0xc820055fa0

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/Cellar/go/1.6.2/libexec/src/runtime/asm_amd64.s:1998 +0x1

cztomczak

unread,
May 27, 2016, 2:25:32 AM5/27/16
to CEF2go
When reporting problems provide details on versions: OS, Golang, CEF version etc.
It fails when calling CefInitialize(). Providing a patch with your code changes would help.
Try googling the error message: https://www.google.com/#hl=en&q=%22fatal+error:+unexpected+signal+during+runtime+execution%22+%22signal+0xb+code%3D0x1%22
Reply all
Reply to author
Forward
0 new messages