Closed anfeierde closed 6 years ago
What did you expect to happen? working
What actually happened? not working with golang
"not working" isn't really enough to go on.
You ticked the box that said you read CONTRIBUTING.md
, but clearly it didn't sink in. Please can you include exactly what you did and exactly what you expected to happen including steps to reproduce, as requested clearly in CONTRIBUTING.md
@puremourning sorry.
@anfeierde Which version of Go are you using?
@micbou 1.10
That's probably why. Gocode doesn't work well with that version of Go. From the Gocode repository:
IMPORTANT: consider switching to https://github.com/mdempsky/gocode if you have problems starting with Go version 1.10, due to changes in binary packages architecture (introduction of package cache) I'm not going to adjust gocode for it for quite some time. There is a higher chance that fork under the given link will have some solution to the problem sooner or later.
@micbou thx.
For anyone struggling to get go1.11 working with YCM, I resolved my problem by reinstalling YouCompleteMe with the following steps:
cd ~/.vim/bundle
git clone git@github.com:Valloric/YouCompleteMe.git
cd YouCompleteMe
git submodule update --init --recursive
python install.py --go-completer
cd third_party/ycmd/third_party/
rm -rf gocode
git clone git@github.com:mdempsky/gocode.git
cd gocode
go mod init
go build .
My environment: macOS 10.13.6, go 1.11 (installed with homebrew), Python 3.7.0 (also homebrew), VIM 8.1 (homebrew as well).
Does this mean that YCM should switch to mdempsky/gocode
?
Looks like VS Code did: https://github.com/Microsoft/vscode-go/issues/1645#issuecomment-395156610
@andreimatei https://github.com/Valloric/ycmd/pull/1098
@cneill life saver!
I find using @cneill 's solution seems will fail once I change GOPATH
.
A nice way is just disable YCM completing for GO at all, and use vim-go
instead, which will directly use the gocode
found under GOPATH, solving issue i faced.
Or, instead, do the following:
cd YouCompleteMe/third_party/ycmd
git checkout master
git pull
git submodule update --init --recursive
./build.py --go-completer
And everything works. This is fixed in ycmd, but YCM has yet to update the submodule.
@bstaletic However, this still has this issue once I change $GOPATH
.
Why not add -source
in ycmd/completers/go/go_completer.py:212?
Reading that issue it seems that -source
is terribly slow and to work around that we need experimental patches from the cache branch. Have you tried using this gocode fork and the -source
flag?
Not yet, so does it mean I should either wait ycmd verified gocode performance after using -source
and merge it, or just add it myself but bearing low performance?
For stuff like this user input is very valuable. I don't think any of ycmd maintainers uses go every day, so we need users to tell us that benefits of -source
outweigh the performance penalty. Of course, once the issue is fixed upstream, we can update our gocode submodule. In the mean time, again, we need to learn about user experience.
For anyone struggling to get go1.11 working with YCM, I resolved my problem by reinstalling YouCompleteMe with the following steps:
cd ~/.vim/bundle git clone git@github.com:Valloric/YouCompleteMe.git cd YouCompleteMe git submodule update --init --recursive python install.py --go-completer cd third_party/ycmd/third_party/ rm -rf gocode git clone git@github.com:mdempsky/gocode.git cd gocode go mod init go build .
My environment: macOS 10.13.6, go 1.11 (installed with homebrew), Python 3.7.0 (also homebrew), VIM 8.1 (homebrew as well).
thanks man !!!
Please don't do that... we have updated our gocode submodule to point to the mdempsky
fork, so you should update your submodules instead of doing things like that manually.
ERROR: Unable to find executable 'go'. go is required to build gocode.
I use asdf to control go version. Anyone know how can I solve this problem ?
make sure that 'go' is in your PATH, as written in the documentation.
For anyone struggling to get go1.11 working with YCM, I resolved my problem by reinstalling YouCompleteMe with the following steps:
cd ~/.vim/bundle git clone git@github.com:Valloric/YouCompleteMe.git cd YouCompleteMe git submodule update --init --recursive python install.py --go-completer cd third_party/ycmd/third_party/ rm -rf gocode git clone git@github.com:mdempsky/gocode.git cd gocode go mod init go build .
My environment: macOS 10.13.6, go 1.11 (installed with homebrew), Python 3.7.0 (also homebrew), VIM 8.1 (homebrew as well).
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-48-generic x86_64)
Welcome to Alibaba Cloud Elastic Compute Service !
Last login: Fri Jan 17 10:13:55 2020 from 220.202.152.65
mysakure@ubuntu:~$
mysakure@ubuntu:~$
mysakure@ubuntu:~$
mysakure@ubuntu:~$
mysakure@ubuntu:~$
mysakure@ubuntu:~$
mysakure@ubuntu:~$
mysakure@ubuntu:~$
mysakure@ubuntu:~$ g++
g++: fatal error: no input filescompilation terminated.
mysakure@ubuntu:~$ git
usage: git [--version] [--help] [-C
These are common Git commands used in various situations:
start a working area (see also: git help tutorial) clone Clone a repository into a new directory init Create an empty Git repository or reinitialize an existing one
work on the current change (see also: git help everyday) add Add file contents to the index mv Move or rename a file, a directory, or a symlink reset Reset current HEAD to the specified state rm Remove files from the working tree and from the index
examine the history and state (see also: git help revisions) bisect Use binary search to find the commit that introduced a bug grep Print lines matching a pattern log Show commit logs show Show various types of objects status Show the working tree status
grow, mark and tweak your common history branch List, create, or delete branches checkout Switch branches or restore working tree files commit Record changes to the repository diff Show changes between commits, commit and working tree, etc merge Join two or more development histories together rebase Reapply commits on top of another base tip tag Create, list, delete or verify a tag object signed with GPG
collaborate (see also: git help workflows) fetch Download objects and refs from another repository pull Fetch from and integrate with another repository or a local branch push Update remote refs along with associated objects
'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help
go1.11.linux-amd64.ta 100%[======================>] 121.27M 12.3MB/s in 8.9s
2020-01-17 11:14:55 (13.6 MB/s) - ‘go1.11.linux-amd64.tar.gz’ saved [127163815/127163815]
mysakure@ubuntu:~$ su Password: root@ubuntu:/home/mysakure# tar xf go1.11.linux-amd64.tar.gz -C /opt root@ubuntu:/home/mysakure# vi /etc/profile root@ubuntu:/home/mysakure# export GO111MODULE=on root@ubuntu:/home/mysakure# export GOROOT=/opt/go root@ubuntu:/home/mysakure# export PATH=$PATH:$GOROOT/bin root@ubuntu:/home/mysakure# root@ubuntu:/home/mysakure# root@ubuntu:/home/mysakure# root@ubuntu:/home/mysakure# source /etc/profile root@ubuntu:/home/mysakure# go -env flag provided but not defined: -env Go is a tool for managing Go source code.
Usage:
go command [arguments]
The commands are:
build compile packages and dependencies
clean remove object files and cached files
doc show documentation for package or symbol
env print Go environment information
bug start a bug report
fix update packages to use new APIs
fmt gofmt (reformat) package sources
generate generate Go files by processing source
get download and install packages and dependencies
install compile and install packages and dependencies
list list packages
run compile and run Go program
test test packages
tool run specified go tool
version print Go version
vet report likely mistakes in packages
Use "go help [command]" for more information about a command.
Additional help topics:
c calling between Go and C
buildmode build modes
cache build and test caching
filetype file types
gopath GOPATH environment variable
environment environment variables
importpath import path syntax
packages package lists
testflag testing flags
testfunc testing functions
Use "go help [topic]" for more information about that topic.
root@ubuntu:/home/mysakure# go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/opt/go"
GOTMPDIR=""
GOTOOLDIR="/opt/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build163235726=/tmp/go-build -gno-record-gcc-switches"
root@ubuntu:/home/mysakure# exit
exit
mysakure@ubuntu:~$ cd
mysakure@ubuntu:~$ ls
go1.11.linux-amd64.tar.gz
mysakure@ubuntu:~$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
Cloning into '/home/mysakure/.vim/bundle/Vundle.vim'...
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 3140 (delta 0), reused 0 (delta 0), pack-reused 3139
Receiving objects: 100% (3140/3140), 935.39 KiB | 356.00 KiB/s, done.
Resolving deltas: 100% (1106/1106), done.
mysakure@ubuntu:~$ vi .vimrc
mysakure@ubuntu:~$ sudo apt-get install build-essential cmake
[sudo] password for mysakure:
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.4ubuntu1).
The following packages were automatically installed and are no longer required:
libopts25 sntp
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
cmake-data libjsoncpp1 librhash0 libuv1
Suggested packages:
cmake-doc ninja-build
The following NEW packages will be installed:
cmake cmake-data libjsoncpp1 librhash0 libuv1
0 upgraded, 5 newly installed, 0 to remove and 166 not upgraded.
Need to get 4,700 kB of archives.
After this operation, 24.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 cmake-data all 3.10.2-1ubuntu2.18.04.1 [1,332 kB]
Get:2 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 libjsoncpp1 amd64 1.7.4-3 [73.6 kB]
Get:3 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 librhash0 amd64 1.3.6-2 [78.1 kB]
Get:4 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 libuv1 amd64 1.18.0-3 [64.4 kB]
Get:5 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 cmake amd64 3.10.2-1ubuntu2.18.04.1 [3,152 kB]
Fetched 4,700 kB in 0s (35.7 MB/s)
Selecting previously unselected package cmake-data.
(Reading database ... 118472 files and directories currently installed.)
Preparing to unpack .../cmake-data_3.10.2-1ubuntu2.18.04.1_all.deb ...
Unpacking cmake-data (3.10.2-1ubuntu2.18.04.1) ...
Selecting previously unselected package libjsoncpp1:amd64.
Preparing to unpack .../libjsoncpp1_1.7.4-3_amd64.deb ...
Unpacking libjsoncpp1:amd64 (1.7.4-3) ...
Selecting previously unselected package librhash0:amd64.
Preparing to unpack .../librhash0_1.3.6-2_amd64.deb ...
Unpacking librhash0:amd64 (1.3.6-2) ...
Selecting previously unselected package libuv1:amd64.
Preparing to unpack .../libuv1_1.18.0-3_amd64.deb ...
Unpacking libuv1:amd64 (1.18.0-3) ...
Selecting previously unselected package cmake.
Preparing to unpack .../cmake_3.10.2-1ubuntu2.18.04.1_amd64.deb ...
Unpacking cmake (3.10.2-1ubuntu2.18.04.1) ...
Setting up libuv1:amd64 (1.18.0-3) ...
Setting up cmake-data (3.10.2-1ubuntu2.18.04.1) ...
Setting up librhash0:amd64 (1.3.6-2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up libjsoncpp1:amd64 (1.7.4-3) ...
Setting up cmake (3.10.2-1ubuntu2.18.04.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
mysakure@ubuntu:~$ sudo apt-get install build-essential cmake
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.4ubuntu1).
cmake is already the newest version (3.10.2-1ubuntu2.18.04.1).
The following packages were automatically installed and are no longer required:
libopts25 sntp
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 166 not upgraded.
mysakure@ubuntu:~$ sudo apt-get install python-dev python3-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libopts25 sntp
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
dh-python libexpat1 libexpat1-dev libpython-dev libpython2.7 libpython2.7-dev
libpython2.7-minimal libpython2.7-stdlib libpython3-dev libpython3.6
libpython3.6-dev libpython3.6-minimal libpython3.6-stdlib libssl1.1 python2.7
python2.7-dev python2.7-minimal python3-distutils python3-lib2to3 python3.6
python3.6-dev python3.6-minimal
Suggested packages:
python2.7-doc binfmt-support python3.6-venv python3.6-doc
The following NEW packages will be installed:
dh-python libexpat1-dev libpython-dev libpython2.7-dev libpython3-dev
libpython3.6-dev python-dev python2.7-dev python3-dev python3-distutils
python3-lib2to3 python3.6-dev
The following packages will be upgraded:
libexpat1 libpython2.7 libpython2.7-minimal libpython2.7-stdlib libpython3.6
libpython3.6-minimal libpython3.6-stdlib libssl1.1 python2.7 python2.7-minimal
python3.6 python3.6-minimal
12 upgraded, 12 newly installed, 0 to remove and 154 not upgraded.
Need to get 86.0 MB of archives.
After this operation, 124 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security/main amd64 libexpat1 amd64 2.2.5-3ubuntu0.2 [80.5 kB]
Get:2 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 libpython3.6 amd64 3.6.9-1~18.04 [1,414 kB]
Get:3 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security/main amd64 libssl1.1 amd64 1.1.1-1ubuntu2.1~18.04.5 [1,300 kB]
Get:4 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 python3.6 amd64 3.6.9-1~18.04 [203 kB]
Get:5 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 libpython3.6-stdlib amd64 3.6.9-1~18.04 [1,709 kB]
Get:6 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 python3.6-minimal amd64 3.6.9-1~18.04 [1,610 kB]
Get:7 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 libpython3.6-minimal amd64 3.6.9-1~18.04 [533 kB]
Get:8 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 python2.7 amd64 2.7.17-1~18.04 [248 kB]
Get:9 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 libpython2.7 amd64 2.7.17-1~18.04 [1,053 kB]
Get:10 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 libpython2.7-stdlib amd64 2.7.17-1~18.04 [1,915 kB]
Get:11 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 python2.7-minimal amd64 2.7.17-1~18.04 [1,294 kB]
Get:12 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 libpython2.7-minimal amd64 2.7.17-1~18.04 [335 kB]
Get:13 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 python3-lib2to3 all 3.6.9-1~18.04 [77.4 kB]
Get:14 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 python3-distutils all 3.6.9-1~18.04 [144 kB]
Get:15 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 dh-python all 3.20180325ubuntu2 [89.2 kB]
Get:16 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security/main amd64 libexpat1-dev amd64 2.2.5-3ubuntu0.2 [122 kB]
Get:17 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 libpython2.7-dev amd64 2.7.17-1~18.04 [28.3 MB]
Get:18 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 libpython-dev amd64 2.7.15~rc1-1 [7,684 B]
Get:19 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 libpython3.6-dev amd64 3.6.9-1~18.04 [44.8 MB]
Get:20 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 libpython3-dev amd64 3.6.7-1~18.04 [7,328 B]
Get:21 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 python2.7-dev amd64 2.7.17-1~18.04 [277 kB]
Get:22 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 python-dev amd64 2.7.15~rc1-1 [1,256 B]
Get:23 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 python3.6-dev amd64 3.6.9-1~18.04 [508 kB]
Get:24 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 python3-dev amd64 3.6.7-1~18.04 [1,288 B]
Fetched 86.0 MB in 16s (5,530 kB/s)
Preconfiguring packages ...
(Reading database ... 120867 files and directories currently installed.)
Preparing to unpack .../00-libexpat1_2.2.5-3ubuntu0.2_amd64.deb ...
Unpacking libexpat1:amd64 (2.2.5-3ubuntu0.2) over (2.2.5-3) ...
Preparing to unpack .../01-libpython3.6_3.6.9-1~18.04_amd64.deb ...
Unpacking libpython3.6:amd64 (3.6.9-1~18.04) over (3.6.7-1~18.04) ...
Preparing to unpack .../02-libssl1.1_1.1.1-1ubuntu2.1~18.04.5_amd64.deb ...
Unpacking libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.5) over (1.1.0g-2ubuntu4.3) ...
Preparing to unpack .../03-python3.6_3.6.9-1~18.04_amd64.deb ...
Unpacking python3.6 (3.6.9-1~18.04) over (3.6.7-1~18.04) ...
Preparing to unpack .../04-libpython3.6-stdlib_3.6.9-1~18.04_amd64.deb ...
Unpacking libpython3.6-stdlib:amd64 (3.6.9-1~18.04) over (3.6.7-1~18.04) ...
Preparing to unpack .../05-python3.6-minimal_3.6.9-1~18.04_amd64.deb ...
Unpacking python3.6-minimal (3.6.9-1~18.04) over (3.6.7-1~18.04) ...
Preparing to unpack .../06-libpython3.6-minimal_3.6.9-1~18.04_amd64.deb ...
Unpacking libpython3.6-minimal:amd64 (3.6.9-1~18.04) over (3.6.7-1~18.04) ...
Preparing to unpack .../07-python2.7_2.7.17-1~18.04_amd64.deb ...
Unpacking python2.7 (2.7.17-1~18.04) over (2.7.15~rc1-1ubuntu0.1) ...
Preparing to unpack .../08-libpython2.7_2.7.17-1~18.04_amd64.deb ...
Unpacking libpython2.7:amd64 (2.7.17-1~18.04) over (2.7.15~rc1-1ubuntu0.1) ...
Preparing to unpack .../09-libpython2.7-stdlib_2.7.17-1~18.04_amd64.deb ...
Unpacking libpython2.7-stdlib:amd64 (2.7.17-1~18.04) over (2.7.15~rc1-1ubuntu0.1) ...
Preparing to unpack .../10-python2.7-minimal_2.7.17-1~18.04_amd64.deb ...
Unpacking python2.7-minimal (2.7.17-1~18.04) over (2.7.15~rc1-1ubuntu0.1) ...
Preparing to unpack .../11-libpython2.7-minimal_2.7.17-1~18.04_amd64.deb ...
Unpacking libpython2.7-minimal:amd64 (2.7.17-1~18.04) over (2.7.15~rc1-1ubuntu0.1) ...
Selecting previously unselected package python3-lib2to3.
Preparing to unpack .../12-python3-lib2to3_3.6.9-1~18.04_all.deb ...
Unpacking python3-lib2to3 (3.6.9-1~18.04) ...
Selecting previously unselected package python3-distutils.
Preparing to unpack .../13-python3-distutils_3.6.9-1~18.04_all.deb ...
Unpacking python3-distutils (3.6.9-1~18.04) ...
Selecting previously unselected package dh-python.
Preparing to unpack .../14-dh-python_3.20180325ubuntu2_all.deb ...
Unpacking dh-python (3.20180325ubuntu2) ...
Selecting previously unselected package libexpat1-dev:amd64.
Preparing to unpack .../15-libexpat1-dev_2.2.5-3ubuntu0.2_amd64.deb ...
Unpacking libexpat1-dev:amd64 (2.2.5-3ubuntu0.2) ...
Selecting previously unselected package libpython2.7-dev:amd64.
Preparing to unpack .../16-libpython2.7-dev_2.7.17-1~18.04_amd64.deb ...
Unpacking libpython2.7-dev:amd64 (2.7.17-1~18.04) ...
Selecting previously unselected package libpython-dev:amd64.
Preparing to unpack .../17-libpython-dev_2.7.15~rc1-1_amd64.deb ...
Unpacking libpython-dev:amd64 (2.7.15~rc1-1) ...
Selecting previously unselected package libpython3.6-dev:amd64.
Preparing to unpack .../18-libpython3.6-dev_3.6.9-1~18.04_amd64.deb ...
Unpacking libpython3.6-dev:amd64 (3.6.9-1~18.04) ...
Selecting previously unselected package libpython3-dev:amd64.
Preparing to unpack .../19-libpython3-dev_3.6.7-1~18.04_amd64.deb ...
Unpacking libpython3-dev:amd64 (3.6.7-1~18.04) ...
Selecting previously unselected package python2.7-dev.
Preparing to unpack .../20-python2.7-dev_2.7.17-1~18.04_amd64.deb ...
Unpacking python2.7-dev (2.7.17-1~18.04) ...
Selecting previously unselected package python-dev.
Preparing to unpack .../21-python-dev_2.7.15~rc1-1_amd64.deb ...
Unpacking python-dev (2.7.15~rc1-1) ...
Selecting previously unselected package python3.6-dev.
Preparing to unpack .../22-python3.6-dev_3.6.9-1~18.04_amd64.deb ...
Unpacking python3.6-dev (3.6.9-1~18.04) ...
Selecting previously unselected package python3-dev.
Preparing to unpack .../23-python3-dev_3.6.7-1~18.04_amd64.deb ...
Unpacking python3-dev (3.6.7-1~18.04) ...
Setting up libexpat1:amd64 (2.2.5-3ubuntu0.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.5) ...
Checking for services that may need to be restarted...done.
Checking for services that may need to be restarted...done.
Checking init scripts...
Restarting services possibly affected by the upgrade:
Services restarted successfully.
Setting up libexpat1-dev:amd64 (2.2.5-3ubuntu0.2) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Setting up libpython2.7-minimal:amd64 (2.7.17-1~18.04) ... Setting up python3-lib2to3 (3.6.9-1~18.04) ... Setting up python3-distutils (3.6.9-1~18.04) ... Setting up libpython2.7-stdlib:amd64 (2.7.17-1~18.04) ... Setting up python2.7-minimal (2.7.17-1~18.04) ... Setting up python2.7 (2.7.17-1~18.04) ... Setting up libpython3.6-minimal:amd64 (3.6.9-1~18.04) ... Setting up libpython2.7:amd64 (2.7.17-1~18.04) ... Setting up libpython2.7-dev:amd64 (2.7.17-1~18.04) ... Setting up dh-python (3.20180325ubuntu2) ... Setting up python2.7-dev (2.7.17-1~18.04) ... Setting up libpython-dev:amd64 (2.7.15~rc1-1) ... Setting up libpython3.6-stdlib:amd64 (3.6.9-1~18.04) ... Setting up python-dev (2.7.15~rc1-1) ... Setting up python3.6-minimal (3.6.9-1~18.04) ... Setting up libpython3.6:amd64 (3.6.9-1~18.04) ... Setting up python3.6 (3.6.9-1~18.04) ... Setting up libpython3.6-dev:amd64 (3.6.9-1~18.04) ... Setting up python3.6-dev (3.6.9-1~18.04) ... Setting up libpython3-dev:amd64 (3.6.7-1~18.04) ... Setting up python3-dev (3.6.7-1~18.04) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... mysakure@ubuntu:~$ go ebv go: unknown subcommand "ebv" Run 'go help' for usage. mysakure@ubuntu:~$ go env GOARCH="amd64" GOBIN="" GOCACHE="/home/mysakure/.cache/go-build" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/mysakure/go" GORACE="" GOROOT="/usr/lib/go-1.10" GOTMPDIR="" GOTOOLDIR="/usr/lib/go-1.10/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build094646064=/tmp/go-build -gno-record-gcc-switches" mysakure@ubuntu:~$ mysakure@ubuntu:~$ cd ~/.vim/bundle mysakure@ubuntu:~/.vim/bundle$ git clone https://github.com/Valloric/YouCompleteMe.git Cloning into 'YouCompleteMe'... remote: Enumerating objects: 11, done. remote: Counting objects: 100% (11/11), done. remote: Compressing objects: 100% (10/10), done. remote: Total 35386 (delta 2), reused 3 (delta 0), pack-reused 35375 Receiving objects: 100% (35386/35386), 33.22 MiB | 172.00 KiB/s, done. Resolving deltas: 100% (12922/12922), done. mysakure@ubuntu:~/.vim/bundle$ cd ~/.vim/bundle/YouCompleteMe mysakure@ubuntu:~/.vim/bundle/YouCompleteMe$ git submodule update --init --recursive Submodule 'third_party/python-future' (https://github.com/PythonCharmers/python-future) registered for path 'third_party/python-future' Submodule 'third_party/requests-futures' (https://github.com/ross/requests-futures) registered for path 'third_party/requests-futures' Submodule 'third_party/requests_deps/certifi' (https://github.com/certifi/python-certifi) registered for path 'third_party/requests_deps/certifi' Submodule 'third_party/requests_deps/chardet' (https://github.com/chardet/chardet) registered for path 'third_party/requests_deps/chardet' Submodule 'third_party/requests_deps/idna' (https://github.com/kjd/idna) registered for path 'third_party/requests_deps/idna' Submodule 'third_party/requests_deps/requests' (https://github.com/requests/requests) registered for path 'third_party/requests_deps/requests' Submodule 'third_party/requests_deps/urllib3' (https://github.com/urllib3/urllib3) registered for path 'third_party/requests_deps/urllib3' Submodule 'third_party/ycmd' (https://github.com/ycm-core/ycmd) registered for path 'third_party/ycmd' Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/python-future'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/requests-futures'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/requests_deps/certifi'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/requests_deps/chardet'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/requests_deps/idna'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/requests_deps/requests'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/requests_deps/urllib3'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd'... Submodule path 'third_party/python-future': checked out 'a8114e48ce7dbc4cecbf6a764d73e83d03b0d6ba' Submodule path 'third_party/requests-futures': checked out '98712e7d0f6be2a090b6fda2a925f85e63656b58' Submodule path 'third_party/requests_deps/certifi': checked out '5b9e05c06e69fe5c7835052cfc3ae1c899dfc8b1' Submodule path 'third_party/requests_deps/chardet': checked out '9b8c5c2fb118d76c6beeab9affd01c332732a530' Submodule path 'third_party/requests_deps/idna': checked out '0f50bdcea71e6602bf4cd22897970d71fc4074d9' Submodule path 'third_party/requests_deps/requests': checked out '6cfbe1aedd56f8c2f9ff8b968efe65b22669795b' Submodule path 'third_party/requests_deps/urllib3': checked out 'a6ec68a5c5c5743c59fe5c62c635c929586c429b' Submodule path 'third_party/ycmd': checked out '5091b462e7e03759e6aa8c6eb3b8ed05df50e4a8' Submodule 'third_party/bottle' (https://github.com/defnull/bottle) registered for path 'third_party/ycmd/third_party/bottle' Submodule 'third_party/cregex' (https://github.com/ycm-core/regex.git) registered for path 'third_party/ycmd/third_party/cregex' Submodule 'third_party/go/src/golang.org/x/tools' (https://github.com/golang/tools) registered for path 'third_party/ycmd/third_party/go/src/golang.org/x/tools' Submodule 'third_party/jedi' (https://github.com/davidhalter/jedi) registered for path 'third_party/ycmd/third_party/jedi_deps/jedi' Submodule 'third_party/jedi_deps/numpydoc' (https://github.com/numpy/numpydoc) registered for path 'third_party/ycmd/third_party/jedi_deps/numpydoc' Submodule 'third_party/parso' (https://github.com/davidhalter/parso) registered for path 'third_party/ycmd/third_party/jedi_deps/parso' Submodule 'third_party/python-future' (https://github.com/PythonCharmers/python-future) registered for path 'third_party/ycmd/third_party/python-future' Submodule 'third_party/certifi' (https://github.com/certifi/python-certifi) registered for path 'third_party/ycmd/third_party/requests_deps/certifi' Submodule 'third_party/chardet' (https://github.com/chardet/chardet) registered for path 'third_party/ycmd/third_party/requests_deps/chardet' Submodule 'third_party/idna' (https://github.com/kjd/idna) registered for path 'third_party/ycmd/third_party/requests_deps/idna' Submodule 'third_party/requests' (https://github.com/requests/requests) registered for path 'third_party/ycmd/third_party/requests_deps/requests' Submodule 'third_party/urllib3' (https://github.com/urllib3/urllib3) registered for path 'third_party/ycmd/third_party/requests_deps/urllib3' Submodule 'third_party/waitress' (https://github.com/Pylons/waitress) registered for path 'third_party/ycmd/third_party/waitress' Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/bottle'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/cregex'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/go/src/golang.org/x/tools'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/jedi_deps/jedi'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/jedi_deps/numpydoc'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/jedi_deps/parso'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/python-future'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests_deps/certifi'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests_deps/chardet'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests_deps/idna'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests_deps/requests'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests_deps/urllib3'... Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/waitress'... Submodule path 'third_party/ycmd/third_party/bottle': checked out '7423aa0f64e381507d1e06a6bcab48888baf9a7b' Submodule path 'third_party/ycmd/third_party/cregex': checked out 'cc538bb6d0fcf0a6411537a5522d13cc9b86789d' Submodule path 'third_party/ycmd/third_party/go/src/golang.org/x/tools': checked out '58d531046acdc757f177387bc1725bfa79895d69' Submodule path 'third_party/ycmd/third_party/jedi_deps/jedi': checked out '35e5cf2c2aa7c2f2c8ea08d74ef64f681582e49e' Submodule 'jedi/third_party/typeshed' (https://github.com/davidhalter/typeshed.git) registered for path 'third_party/ycmd/third_party/jedi_deps/jedi/jedi/third_party/typeshed' Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/jedi_deps/jedi/jedi/third_party/typeshed'... Submodule path 'third_party/ycmd/third_party/jedi_deps/jedi/jedi/third_party/typeshed': checked out '3319cadf85012328f8a12b15da4eecc8de0cf305' Submodule path 'third_party/ycmd/third_party/jedi_deps/numpydoc': checked out 'c8513c5db6088a305711851519f944b33f7e1b25' Submodule 'doc/scipy-sphinx-theme' (https://github.com/scipy/scipy-sphinx-theme) registered for path 'third_party/ycmd/third_party/jedi_deps/numpydoc/doc/scipy-sphinx-theme' Cloning into '/home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/jedi_deps/numpydoc/doc/scipy-sphinx-theme'... Submodule path 'third_party/ycmd/third_party/jedi_deps/numpydoc/doc/scipy-sphinx-theme': checked out 'bc3b4b8383d4cd676fe75b7ca8c3e11d6afa8d97' Submodule path 'third_party/ycmd/third_party/jedi_deps/parso': checked out '59df3fab4358d5889556c2450c2d1deb36facdb7' Submodule path 'third_party/ycmd/third_party/python-future': checked out '6b8341c0412ddf8081151692e9034986a6f867bc' Submodule path 'third_party/ycmd/third_party/requests_deps/certifi': checked out '5b9e05c06e69fe5c7835052cfc3ae1c899dfc8b1' Submodule path 'third_party/ycmd/third_party/requests_deps/chardet': checked out '9b8c5c2fb118d76c6beeab9affd01c332732a530' Submodule path 'third_party/ycmd/third_party/requests_deps/idna': checked out '0f50bdcea71e6602bf4cd22897970d71fc4074d9' Submodule path 'third_party/ycmd/third_party/requests_deps/requests': checked out '6cfbe1aedd56f8c2f9ff8b968efe65b22669795b' Submodule path 'third_party/ycmd/third_party/requests_deps/urllib3': checked out 'a6ec68a5c5c5743c59fe5c62c635c929586c429b' Submodule path 'third_party/ycmd/third_party/waitress': checked out '7bb27bb66322fc564e14005d29cb6fddd76a0ab6' mysakure@ubuntu:~/.vim/bundle/YouCompleteMe$ python install.py --go-completer Searching Python 2.7 libraries... Found Python library: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so Found Python headers folder: /usr/include/python2.7 -- The C compiler identification is GNU 7.4.0 -- The CXX compiler identification is GNU 7.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonLibs: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.17", minimum required is "2.7") -- NOT using libclang, no semantic completion for C/C++/ObjC will be available -- NOT using clang-tidy for static analysis. -- Configuring done -- Generating done -- Build files have been written to: /tmp/ycm_build_a2OTYf Scanning dependencies of target BoostParts [ 2%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/codecvt_error_category.cpp.o [ 4%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/operations.cpp.o [ 7%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/path.cpp.o [ 9%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/path_traits.cpp.o [ 11%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/portability.cpp.o [ 14%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/unique_path.cpp.o [ 16%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/utf8_codecvt_facet.cpp.o [ 19%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/filesystem/src/windows_file_codecvt.cpp.o [ 21%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/c_regex_traits.cpp.o [ 23%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/cpp_regex_traits.cpp.o [ 26%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/cregex.cpp.o [ 28%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/fileiter.cpp.o [ 30%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/icu.cpp.o [ 33%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/instances.cpp.o [ 35%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/posix_api.cpp.o [ 38%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex.cpp.o [ 40%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_debug.cpp.o [ 42%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_raw_buffer.cpp.o [ 45%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/regex_traits_defaults.cpp.o [ 47%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/static_mutex.cpp.o [ 50%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/usinstances.cpp.o [ 52%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/w32_regex_traits.cpp.o [ 54%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/wc_regex_traits.cpp.o [ 57%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/wide_posix_api.cpp.o [ 59%] Building CXX object BoostParts/CMakeFiles/BoostParts.dir/libs/regex/src/winstances.cpp.o [ 61%] Linking CXX static library libBoostParts.a [ 61%] Built target BoostParts Scanning dependencies of target ycm_core [ 64%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Candidate.cpp.o [ 66%] Building CXX object ycm/CMakeFiles/ycm_core.dir/CandidateRepository.cpp.o [ 69%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Character.cpp.o [ 71%] Building CXX object ycm/CMakeFiles/ycm_core.dir/CharacterRepository.cpp.o [ 73%] Building CXX object ycm/CMakeFiles/ycm_core.dir/CodePoint.cpp.o [ 76%] Building CXX object ycm/CMakeFiles/ycm_core.dir/CodePointRepository.cpp.o [ 78%] Building CXX object ycm/CMakeFiles/ycm_core.dir/IdentifierCompleter.cpp.o [ 80%] Building CXX object ycm/CMakeFiles/ycm_core.dir/IdentifierDatabase.cpp.o [ 83%] Building CXX object ycm/CMakeFiles/ycm_core.dir/IdentifierUtils.cpp.o [ 85%] Building CXX object ycm/CMakeFiles/ycm_core.dir/PythonSupport.cpp.o [ 88%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Result.cpp.o [ 90%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Utils.cpp.o [ 92%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Word.cpp.o [ 95%] Building CXX object ycm/CMakeFiles/ycm_core.dir/versioning.cpp.o [ 97%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ycm_core.cpp.o [100%] Linking CXX shared library /home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/ycm_core.so [100%] Built target ycm_core -- The C compiler identification is GNU 7.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Found PythonLibs: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so (found version "2.7.17") -- Configuring done -- Generating done -- Build files have been written to: /tmp/regex_build_eN3X_N Scanning dependencies of target _regex [ 33%] Building C object CMakeFiles/_regex.dir/regex_2/_regex.c.o [ 66%] Building C object CMakeFiles/_regex.dir/regex_2/_regex_unicode.c.o [100%] Linking C shared library /home/mysakure/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/cregex/regex_2/_regex.so [100%] Built target _regex main.go:15:2: cannot find package "golang.org/x/tools/internal/lsp/cmd" in any of: /usr/lib/go-1.10/src/golang.org/x/tools/internal/lsp/cmd (from $GOROOT) /home/mysakure/go/src/golang.org/x/tools/internal/lsp/cmd (from $GOPATH) main.go:16:2: cannot find package "golang.org/x/tools/internal/lsp/debug" in any of: /usr/lib/go-1.10/src/golang.org/x/tools/internal/lsp/debug (from $GOROOT) /home/mysakure/go/src/golang.org/x/tools/internal/lsp/debug (from $GOPATH) main.go:17:2: cannot find package "golang.org/x/tools/internal/tool" in any of: /usr/lib/go-1.10/src/golang.org/x/tools/internal/tool (from $GOROOT) /home/mysakure/go/src/golang.org/x/tools/internal/tool (from $GOPATH) mysakure@ubuntu:~/.vim/bundle/YouCompleteMe$
How can I solve this problem,thx
I have go setup in the PATH variable yet is shows the same error.
ERROR: Unable to find executable 'go'. go is required to build gopls.
Are you sure go
is in your $PATH
in the shell that you're running python from? install.py
is literally iterating through $PATH
and trying to find go
.
@bstaletic The output for the PATH does contain go.
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/bishal/bin:/usr/local/go/bin:/home/bishal/bin:/usr/local/go/bin
Is there something else should I look into to fix this since I am clearly able to use go command while install.py keeps complaining about the absence of go?
It was my stupid mistake of ignoring the warning about install.py unable to modify any directories inside third_party/ycmd/third_party/. I was getting the error about the executable go's absence when ran the install.py in sudo (despite having mentioned the PATH go in /etc/profile). I changed the directory's permission and it works.
Thanks
Or, instead, do the following:
cd YouCompleteMe/third_party/ycmd
git checkout master
git pull
git submodule update --init --recursive
./build.py --go-completer
And everything works. This is fixed in ycmd, but YCM has yet to update the submodule.
Just in case anyone else stumbles upon this like I did I also had to do:
pip install cmake --upgrade
CXX=~/gcc-9.3.0/bin/g++ ./build.py --go-completer
I installed the newest version of gcc previously when dealing with YCM to ensure I never get anymore Your C++ compiler does NOT fully support C++17.
type of errors.
Issue Prelude
Please complete these steps and check these boxes (by putting an
x
inside the brackets) before filing your issue:vim --version
.:YcmDebugInfo
.:YcmToggleLogs
command.install.py
(orcmake
/make
/ninja
) including its invocationThank you for adhering to this process! It ensures your issue is resolved quickly and that neither your nor our time is needlessly wasted.
Issue Details
ycm only golang not working
What did you do?
What did you expect to happen? not working
What actually happened? i want like python
Diagnostic data
Output of
vim --version
Output of
YcmDebugInfo
Contents of YCM, ycmd and completion engine logfiles
OS version, distribution, etc.