Skip to content

Commit

Permalink
add troubleshooting section
Browse files Browse the repository at this point in the history
  • Loading branch information
alexflint committed Feb 12, 2017
1 parent 7ad2af1 commit ee564dc
Showing 1 changed file with 37 additions and 15 deletions.
52 changes: 37 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,21 +272,43 @@ The [Chromium Embedded Framework](https://bitbucket.org/chromiumembedded/cef) is
The goal of Gallium is to make it possible to write cross-platform
desktop UI applications in Go.

### Common pitfalls

- When you run an app bundle with `open Foo.app`, OSX launch services
discards standard output and standard error. If you need to see
this output for debugging purposes, use a redirect:
```
gallium.RedirectStdoutStderr("output.log")
```
- When you run an app bundle with `open Foo.app`, OSX launch services
will only start your app if there is not already another instance
of the same application running, so if your app refuses to start then
try checking the activity monitor for an already running instance.
- If you run the binary directly without building an app bundle then
your menus will not show up, and the window will initially appear
behind other applications.
### Troubleshooting

**`ld: warning: file was built for unsupported file format`**

If you see this error:
```
ld: warning: ignoring file go/src/github.com/alexflint/gallium/dist/Gallium.framework/Gallium, file was built for unsupported file format ( 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x20 0x68 0x74 0x74 0x70 0x73 0x3A 0x2F 0x2F ) which is not the architecture being linked (x86_64): go/src/github.com/alexflint/gallium/dist/Gallium.framework/Gallium
Undefined symbols for architecture x86_64 ...
```
then you probably have an issue with `git lfs`. You can confirm that this is
the problem by checking the size of the file in the error message: it should
be over 1 MB, but if you see a much smaller file then this is your problem.

To fix this, try re-installing `git lfs` as described in the installation
section above, then delete and re-install gallium.

**No console output**

When you run an app bundle with `open Foo.app`, OSX launch services discards
standard output and standard error. If you need to see this output for
debugging purposes, use a redirect:
```
gallium.RedirectStdoutStderr("output.log")
```

**App does not start**

When you run an app bundle with `open Foo.app`, OSX launch services will only
start your app if there is not already another instance of the same
application running, so if your app refuses to start then try checking the
activity monitor for an already running instance.

**Menus not visible**

If you run the binary directly without building an app
bundle then your menus will not show up, and the window will initially appear
behind other applications.

### UI thread issues and runtime.LockOSThread

Expand Down

0 comments on commit ee564dc

Please sign in to comment.