leoliu / ggtags

Emacs frontend to GNU Global source code tagging system.
http://elpa.gnu.org
578 stars 57 forks source link

‘global’ non-zero exit: sh: global: command not found #206

Closed Blade6570 closed 4 years ago

Blade6570 commented 4 years ago

Hi, I am on emacs 27, ubuntu 18.04, gtags-6.6.5 both on the client and the server. When I use ggtags with tramp in python mode I get this error. Here is the backtrace report. Note: It works perfectly on local files.

Debugger entered--Lisp error: (error "‘global’ non-zero exit: sh: global: command not fo...") signal(error ("‘global’ non-zero exit: sh: global: command not fo...")) error("`%s' non-zero exit: %s" "global" "sh: global: command not found") ggtags-process-string("global" "-p") ggtags-make-project(#("/ssh:puhti:/scratch/project_2001838/soumya/PyVGGFa..." 1 4 (helm-ff-file t) 5 10 (helm-ff-file t))) ggtags-find-project() ggtags-ensure-project() byte-code("\10?\205\7\0\301 \302 \210\211\203\24\0\211\303D\202\36\0\304\305\10\"\10\205\35\0\305D\207" [current-prefix-arg ggtags-include-file ggtags-ensure-project include ggtags-read-tag definition] 4) call-interactively(ggtags-find-tag-dwim record nil) command-execute(ggtags-find-tag-dwim record) helm-M-x-execute-command(ggtags-find-tag-dwim) helm-execute-selection-action-1() helm-execute-selection-action() helm-internal((((name . "Emacs Commands history") (candidates . #f(compiled-function () #<bytecode 0x1570d9422d05>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1570d9223d2d>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keep...") (must-match . t) (group . helm-command) (match-dynamic . t)) ((name . "Emacs Commands") (candidates . #f(compiled-function () #<bytecode 0x1570d966a6a1>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1570d9223d2d>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keep...") (must-match . t) (group . helm-command) (match-dynamic . t))) nil "M-x " nil nil "helm M-x" nil nil helm-M-x-input-history) apply(helm-internal ((((name . "Emacs Commands history") (candidates . #f(compiled-function () #<bytecode 0x1570d9422d05>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1570d9223d2d>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) (67108989 . helm-narrow-window) (19 . undefined) (24 keymap ... ... ... ... ... ... ... ... ... ... ... ...) (11 . helm-delete-minibuffer-contents) (67108896 . helm-toggle-visible-mark-forward) (0 . helm-toggle-visible-mark) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keeping se...") (must-match . t) (group . helm-command) (match-dynamic . t)) ((name . "Emacs Commands") (candidates . #f(compiled-function () #<bytecode 0x1570d966a6a1>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1570d9223d2d>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) (67108989 . helm-narrow-window) (19 . undefined) (24 keymap ... ... ... ... ... ... ... ... ... ... ... ...) (11 . helm-delete-minibuffer-contents) (67108896 . helm-toggle-visible-mark-forward) (0 . helm-toggle-visible-mark) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keeping se...") (must-match . t) (group . helm-command) (match-dynamic . t))) nil "M-x " nil nil "helm M-x" nil nil helm-M-x-input-history)) helm((((name . "Emacs Commands history") (candidates . #f(compiled-function () #<bytecode 0x1570d9422d05>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1570d9223d2d>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keep...") (must-match . t) (group . helm-command) (match-dynamic . t)) ((name . "Emacs Commands") (candidates . #f(compiled-function () #<bytecode 0x1570d966a6a1>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1570d9223d2d>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keep...") (must-match . t) (group . helm-command) (match-dynamic . t))) nil "M-x " nil nil "helm M-x" nil nil helm-M-x-input-history) apply(helm ((((name . "Emacs Commands history") (candidates . #f(compiled-function () #<bytecode 0x1570d9422d05>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1570d9223d2d>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) (67108989 . helm-narrow-window) (19 . undefined) (24 keymap ... ... ... ... ... ... ... ... ... ... ... ...) (11 . helm-delete-minibuffer-contents) (67108896 . helm-toggle-visible-mark-forward) (0 . helm-toggle-visible-mark) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keeping se...") (must-match . t) (group . helm-command) (match-dynamic . t)) ((name . "Emacs Commands") (candidates . #f(compiled-function () #<bytecode 0x1570d966a6a1>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1570d9223d2d>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) (67108989 . helm-narrow-window) (19 . undefined) (24 keymap ... ... ... ... ... ... ... ... ... ... ... ...) (11 . helm-delete-minibuffer-contents) (67108896 . helm-toggle-visible-mark-forward) (0 . helm-toggle-visible-mark) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keeping se...") (must-match . t) (group . helm-command) (match-dynamic . t))) nil "M-x " nil nil "helm M-x" nil nil helm-M-x-input-history)) helm(:sources (((name . "Emacs Commands history") (candidates . #f(compiled-function () #<bytecode 0x1570d9422d05>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1570d9223d2d>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keep...") (must-match . t) (group . helm-command) (match-dynamic . t)) ((name . "Emacs Commands") (candidates . #f(compiled-function () #<bytecode 0x1570d966a6a1>)) (keymap keymap (keymap ...) keymap (21 . helm-M-x-universal-argument) keymap (127 . delete-backward-char) (27 keymap ...) (C-return . helm-cr-empty-string) keymap (f13 lambda nil ... ...) (f12 lambda nil ... ...) (f11 lambda nil ... ...) (f10 lambda nil ... ...) (f9 lambda nil ... ...) (f8 lambda nil ... ...) (f7 lambda nil ... ...) (f6 lambda nil ... ...) (f5 lambda nil ... ...) (f4 lambda nil ... ...) (f3 lambda nil ... ...) (f2 lambda nil ... ...) (menu-bar keymap ...) (help keymap ...) (23 . #f(compiled-function () ... #<bytecode 0x1570d9223d2d>)) (f1 lambda nil ... ...) (8 keymap ... ... ... ... ...) (20 . helm-toggle-resplit-and-swap-windows) (C-tab . undefined) (67108897 . helm-toggle-suspend-update) (3 keymap ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (67108987 . helm-enlarge-window) ...) (action . helm-type-command-actions) (persistent-action . helm-M-x-persistent-action) (persistent-help . "Describe this command") (help-message . helm-M-x-help-message) (requires-pattern . 0) (filtered-candidate-transformer helm-M-x-transformer-no-sort helm-fuzzy-highlight-matches) (volatile . t) (match . identity) (redisplay . identity) (nomark . t) (coerce . helm-symbolify) (header-line . "C-j: Describe this command (keep...") (must-match . t) (group . helm-command) (match-dynamic . t))) :prompt "M-x " :buffer "helm M-x" :history helm-M-x-input-history) helm-M-x-read-extended-command([rng-ipattern-after localp diary-included-files epg-context-signers locals 0 rng-what-schema vc-git-stash-snapshot denied edebug-trace pdf-cache-renderpage-highlight pdf-cache-pagelinks semantic-tag-write-list-slot-value 0 org-emphasis-regexp-components mml-secure-smime-sign-with-sender helm-type-timers-actions clearfunsym template nsm-permanent-host-settings flycheck-error-list-mode-line-map mixal encourage-mode elpy-insert--generic-button-action cl-print--preprocess semantic--tag-unlink-list-from-buffer doi-utils-pubmed edebug-clear-frequency-count wicon vc-git-conflicted-files 0 post-deadline semanticdb-project-database-file-child-p shr-parse-image-data Load\ snippets... f-directory\? Edebug\ All\ Defs helm-kill-regexp-as-sexp container \' ---5 helm-grep-mode-jump-other-window-forward org-ref-notes-directory ---8 request-list alert--log-disable-messaging tagger-params define-mode-local-override undo-adjusted-markers projectile-tags-file-name ...]) helm-M-x(nil) funcall-interactively(helm-M-x nil) call-interactively(helm-M-x nil nil) command-execute(helm-M-x)

leoliu commented 4 years ago

Hi @Blade6570, could you try running which global in your shell and paste the result here? From the error it seems global is not available. Maybe it's been renamed to something else.

Blade6570 commented 4 years ago

Hi, I fixed the problem. On the server, I don't have the sudo rights so I installed gnu global in a non-default location which was not in the searching path of the tramp. I had to add the gnu global installation folder to the tramp and then it works fine.

Thanks