MarGo build failed
I upgraded go to 1.2 and got some problem... It seems that GoSublime cannot figure out what version of go I use. Any idea?
| GoSublime error: MarGo build failed
| > This is possibly a bug or miss-configuration of your environment.
| > For more help, please file an issue with the following build output
| > at: https://github.com/DisposaBoy/GoSublime/issues/new
| > or alternatively, you may send an email to: [email protected]
| >
| >
| > cmd: ['C:\\go\\bin\\go.exe', 'build', '-v', '-x', '-o', 'gosublime.margo_r13.12.17-1_go?.exe', 'gosubli.me/margo']
| > stdout: | > stderr:
| > exception: None
| install state: busy
| sublime.version: 3047
| sublime.channel: stable
| about.ann: a13.12.17-1
| about.version: r13.12.17-1
| version: r13.12.17-1
| platform: windows-x64
| ~bin: D:\Software\Sublime Text Build 3047 x64\Data\Packages\User\GoSublime\windows-x64\bin
| margo.exe: ~bin\gosublime.margo_r13.12.17-1_go?.exe (missing)
| go.exe: C:\go\bin\go.exe (ok)
| go.version: go?
| GOROOT: C:\go
| GOPATH: D:\Dropbox\My Documents\Programming\GitRepos\gocode
| GOBIN: C:\go\bin (should usually be (not set))
| set.shell: []
| env.shell:
| shell.cmd: ['C:\WINDOWS\system32\cmd.exe', '/C', '${CMD}']
what's the output of go version
if I run within GoSubline, the console shows as follow:
[ go version | done: ]
Abort. Cannot start MarGo: Exception: Cannot find command D:\Software\Sublime Text Build 3047 x64\Data\Packages\User\GoSublime\windows-x64\bin\gosublime.margo_r13.12.17-1_go?.exe
But if I runs with command prompt, it looks fine: go version go1.2 windows/amd64
type in the sublime console: from gosubl import sh; sh.go_cmd(['version']).run() and post the output (copy-paste)
also, what's the startup output. specifically the lines like GoSublime .* init mod
also, probably obvious... make sure you're on the latest version which is r13.12.17-1
here is the startup output:
DPI scale: 1 startup, version: 3047 windows x64 channel: stable executable: /D/Software/Sublime Text Build 3047 x64/sublime_text.exe working dir: /D/Software/Sublime Text Build 3047 x64 packages path: /D/Software/Sublime Text Build 3047 x64/Data/Packages state path: /D/Software/Sublime Text Build 3047 x64/Data/Local hardware concurrency: 8 zip path: /D/Software/Sublime Text Build 3047 x64/Packages zip path: /D/Software/Sublime Text Build 3047 x64/Data/Installed Packages found 23 files for base name Default.sublime-keymap found 3 files for base name Default.sublime-mousemap found 15 files for base name Main.sublime-menu loading bindings loading pointer bindings found 1 files for base name Flatland Dark.sublime-theme theme loaded app ready startup cache, total files: 214 cache hits: 214 pre session restore time: 0.205677 Loading dictionary Packages/Language - English/en_US.dic using gamma: 2 (err: 43.7493) startup time: 0.367677 first paint time: 0.373677 launching: /D/Software/Sublime Text Build 3047 x64/plugin_host.exe reloading plugin Default.block reloading plugin Default.comment reloading plugin Default.copy_path reloading plugin Default.delete_word reloading plugin Default.detect_indentation reloading plugin Default.duplicate_line reloading plugin Default.echo reloading plugin Default.exec reloading plugin Default.fold reloading plugin Default.font reloading plugin Default.goto_line reloading plugin Default.history_list loaded 837 snippets reloading plugin Default.indentation reloading plugin Default.kill_ring reloading plugin Default.mark reloading plugin Default.new_templates reloading plugin Default.open_file_settings reloading plugin Default.open_in_browser reloading plugin Default.pane reloading plugin Default.paragraph reloading plugin Default.paste_from_history reloading plugin Default.save_on_focus_lost reloading plugin Default.scroll reloading plugin Default.set_unsaved_view_name reloading plugin Default.side_bar reloading plugin Default.sort reloading plugin Default.swap_line reloading plugin Default.switch_file reloading plugin Default.symbol reloading plugin Default.transform reloading plugin Default.transpose reloading plugin Default.trim_trailing_white_space reloading plugin CSS.css_completions reloading plugin Diff.diff reloading plugin HTML.encode_html_entities reloading plugin HTML.html_completions reloading plugin Vintage.vintage reloading plugin Vintage.vintage_commands reloading plugin Vintage.vintage_motions reloading plugin BracketHighlighter.bh_core reloading plugin BracketHighlighter.bh_plugin reloading plugin BracketHighlighter.bh_remove reloading plugin BracketHighlighter.bh_swapping reloading plugin BracketHighlighter.bh_wrapping reloading plugin BracketHighlighter.ure reloading plugin Emmet.emmet-plugin reloading plugin KeymapManager.KeymapManager reloading plugin Package Control.Package Control reloading plugin Pretty JSON.PrettyJson reloading plugin SideBarEnhancements.Edit reloading plugin SideBarEnhancements.SideBar reloading plugin SideBarEnhancements.SideBarDefaultDisable reloading plugin SideBarEnhancements.StatusBarFileSize reloading plugin SideBarEnhancements.StatusBarModifiedTime reloading plugin SmartMarkdown.headline reloading plugin SmartMarkdown.headline_level reloading plugin SmartMarkdown.headline_move reloading plugin SmartMarkdown.pandoc_render reloading plugin SmartMarkdown.smart_folding reloading plugin SmartMarkdown.smart_list reloading plugin SmartMarkdown.smart_table reloading plugin SmartMarkdown.table reloading plugin SmartMarkdown.utilities reloading plugin sublime-EasyMotion.easy_motion reloading plugin SublimeAllAutocomplete.all_views_completions reloading plugin SublimeLinter.SublimeLinter reloading plugin Tag.Edit reloading plugin Tag.Tag reloading plugin Tag.tag_close_tag reloading plugin Tag.tag_close_tag_on_slash reloading plugin Tag.tag_indent reloading plugin Tag.tag_insert_as_tag reloading plugin Tag.tag_lint reloading plugin Tag.tag_remove reloading plugin Tag.tag_remove_attributes reloading plugin WordHighlight.word_highlight reloading plugin ConvertToUTF8.ConvertToUTF8 reloading plugin GoSublime.GoSublime reloading plugin GoSublime.gs9o reloading plugin GoSublime.gscommands reloading plugin GoSublime.gscomplete reloading plugin GoSublime.gsdoc reloading plugin GoSublime.gsev reloading plugin GoSublime.gslint reloading plugin GoSublime.gspalette reloading plugin GoSublime.gssynforce reloading plugin GoSublime.gstest reloading plugin Terminal.Terminal plugins loaded
GoSublime r13.12.17-1: init mod(gs)
GoSublime r13.12.17-1: init mod(sh)
GoSblime r13.12.17-1 sh: load env vars ['C:\WINDOWS\system32\cmd.exe', '/C', 'echo "..."']: go version: ['C:\go\bin\go.exe', 'version'] -> ``->Result(out='', cmd_lst=['C:\go\bin\go.exe', 'version'], err='', ok=True, exc=None): 0.636s
GoSublime r13.12.17-1: init mod(mg9)
Emmet: No need to update PyV8 Package Control: Skipping automatic upgrade, last run at 2013-12-18 21:53:44, next run at 2013-12-18 22:53:44 or after
** 2013-12-18 21:55:33.926614 **:
MarGo: MarGo build failed
cmd: ['C:\\go\\bin\\go.exe', 'build', '-v', '-x', '-o', 'gosublime.margo_r13.12.17-1_go?.exe', 'gosubli.me/margo']
stdout: stderr:
exception: None
** 2013-12-18 21:55:33.932612 **:
GoSublime: | GoSublime error: MarGo build failed
| > This is possibly a bug or miss-configuration of your environment.
| > For more help, please file an issue with the following build output
| > at: https://github.com/DisposaBoy/GoSublime/issues/new
| > or alternatively, you may send an email to: [email protected]
| >
| >
| > cmd: ['C:\\go\\bin\\go.exe', 'build', '-v', '-x', '-o', 'gosublime.margo_r13.12.17-1_go?.exe', 'gosubli.me/margo']
| > stdout: | > stderr:
| > exception: None
| install state: busy
| sublime.version: 3047
| sublime.channel: stable
| about.ann: a13.12.17-1
| about.version: r13.12.17-1
| version: r13.12.17-1
| platform: windows-x64
| ~bin: D:\Software\Sublime Text Build 3047 x64\Data\Packages\User\GoSublime\windows-x64\bin
| margo.exe: ~bin\gosublime.margo_r13.12.17-1_go?.exe (missing)
| go.exe: C:\go\bin\go.exe (ok)
| go.version: go?
| GOROOT: C:\go
| GOPATH: D:\Dropbox\My Documents\Programming\GitRepos\gocode
| GOBIN: (not set) (should usually be (not set))
| set.shell: []
| env.shell:
| shell.cmd: ['C:\WINDOWS\system32\cmd.exe', '/C', '${CMD}']
Traceback (most recent call last): File "D:\Software\Sublime Text Build 3047 x64\sublime_plugin.py", line 287, in on_selection_modified callback.on_selection_modified(v) File "SublimeLinter in D:\Software\Sublime Text Build 3047 x64\Data\Installed Packages\SublimeLinter.sublime-package", line 785, in on_selection_modified File "SublimeLinter in D:\Software\Sublime Text Build 3047 x64\Data\Installed Packages\SublimeLinter.sublime-package", line 109, in last_selected_lineno File "D:\Software\Sublime Text Build 3047 x64\sublime.py", line 450, in getitem raise IndexError() IndexError
** 2013-12-18 21:55:33.935613 **:
GoSublime init r13.12.17-1 (3.617s)
| install margo: cmd: ['C:\\go\\bin\\go.exe', 'build', '-v', '-x', '-o', 'gosublime.margo_r13.12.17-1_go?.exe', 'gosubli.me/margo']
| > stdout: | > stderr:
| > exception: None
| install state: done
| sublime.version: 3047
| sublime.channel: stable
| about.ann: a13.12.17-1
| about.version: r13.12.17-1
| version: r13.12.17-1
| platform: windows-x64
| ~bin: D:\Software\Sublime Text Build 3047 x64\Data\Packages\User\GoSublime\windows-x64\bin
| margo.exe: ~bin\gosublime.margo_r13.12.17-1_go?.exe (missing)
| go.exe: C:\go\bin\go.exe (ok)
| go.version: go?
| GOROOT: C:\go
| GOPATH: D:\Dropbox\My Documents\Programming\GitRepos\gocode
| GOBIN: (not set) (should usually be (not set))
| set.shell: []
| env.shell:
| shell.cmd: ['C:\WINDOWS\system32\cmd.exe', '/C', '${CMD}']
And result in sublime console:
GoSublime r13.12.17-1 9o: type help for help and command documentation
[ from gosubl import sh; sh.go_cmd(['version']).run() | done: ]
Abort. Cannot start MarGo: Exception: Cannot find command D:\Software\Sublime Text Build 3047 x64\Data\Packages\User\GoSublime\windows-x64\bin\gosublime.margo_r13.12.17-1_go?.exe
[ D:/Software/Sublime Text Build 3047 x64/ ] #
well, apparrently go version didn't output anything which could mean that it really didn't output anything or the output got lost somewhere. I guess the next step is to see if any recent changes could've caused this and the only one i can think of is the treatment of decoding errors. can you open Packages/GoSublime/gosubl/gs.py and search for str_decode(s, 'utf-8', 'replace') then change the work replace to strict so it becomes str_decode(s, 'utf-8', 'replace') and then restart sublime text, please. if the string decode is failing you should ideally get an exception in the sublime console
I tried it and still got the same problem... : ( But I found the current version of sublime 3 was Build 3059(I use Build 3047 currently). I upgrade it and all the problems were gone!!
weird... re-open if you face any more issues
i fund the same problem:
[go build | done: ]
Abort. Cannot start MarGo: Exception: Cannot find command /home/xmo/.config/sublime-text-3/Packages/User/GoSublime/linux-x64/bin/gosublime.margo_r13.12.26-3_go1.exe
same question...in OS X 10.11. Install go with gvm.
Facing same issue.
From Sublime console:
GoSublime
cannot fmt file. error: `Abort. Cannot start MarGo: Exception: Cannot find command `/Users/vishal/Library/Application Support/Sublime Text 3/Packages/User/GoSublime/osx-x64/bin/gosublime.margo_r14.12.06-1_go1.5.1.exe`
>>> from gosubl import sh; sh.go_cmd(['version']).run()
Result(out='go version go1.5.1 darwin/amd64\n', cmd_lst=['/usr/local/Cellar/go/1.5.1/libexec/bin/go', 'version'], err='', ok=True, exc=None)
also the same.
try chmod a+x gosublime.margo_r16.07.09-1_goXXX.exe @vrcoder
- go env . Check your go path
- Sublime ->Package Setting -> GoSublime -> settings - user This is my go path { "env": { "GOPATH": "C:/Users/Tattoo.L/Documents/gowark", "GOROOT": "C:/Users/Tattoo.L/Documents/go" } }
- in Sublime. ctrl + B. check it
I had a similar problem as OP (OSX 10.13). The problem disappeared after I've followed @ZhouYanlang advice to set up go env for GoSublime as well as I've installed MargoGo using go get as advised here:
go get github.com/DisposaBoy/GoSublime/src/gosubli.me/margo go get github.com/DisposaBoy/GoSublime/tree/master/src/gosubli.me/margo
I've installed both packages, so, to be honest, I don't know which one resolved the issue