Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install errors with readline library #9

Closed
jdowning opened this issue Oct 22, 2014 · 16 comments · Fixed by #10
Closed

Install errors with readline library #9

jdowning opened this issue Oct 22, 2014 · 16 comments · Fixed by #10

Comments

@jdowning
Copy link

Hello! I am new to golang so it's entirely possible this is my fault, but I cannot seem to install influxdb-cli using go get.

~GOPATH (master ✔) ᐅ go get github.com/Dieterbe/influx-cli                                           
# github.com/shavac/readline
37: error: use of undeclared identifier 'rl_resize_terminal'; did you mean 'rl_reset_terminal'?
37: error: use of undeclared identifier 'rl_catch_sigwinch'
37: error: use of undeclared identifier 'rl_completion_func_t'; did you mean 'rl_compentry_func_t'?
~GOPATH (master ✔) ᐅ go version                                                                      
go version go1.3.3 darwin/amd64

Any ideas?

@damm
Copy link
Contributor

damm commented Oct 23, 2014

I get the same thing and more with yosemite...

@jdowning
Copy link
Author

@damm @Dieterbe YES ...I, too, am using Yosemite OSX 10.10 ...hth

@Dieterbe
Copy link
Owner

ah yes, someone mentioned on irc that the readline library doesn't work on OSX.

@cnf said https://github.com/gobs/readline should be a drop in replacement, i.e. you should be able to just change the import without touching the other code, lemme know if that works

@damm
Copy link
Contributor

damm commented Oct 23, 2014

And there we go; simple swap and pull request attached.

@Dieterbe
Copy link
Owner

so it works fine? i'll try it out on linux later

@damm
Copy link
Contributor

damm commented Oct 23, 2014

Works perfectly; and yes we should test the different platforms you are trying to target here to just make sure they still work.

@Dieterbe
Copy link
Owner

actually gobs/readline/ is a fork of /sbinet/go-readline and has the last commit in aug 2010, whereas the sbinet version has a commit in nov 2013, so maybe we should use the sbinet version?
can you confirm if that works on osx?

@damm
Copy link
Contributor

damm commented Oct 23, 2014

Huh? https://github.com/gobs/readline last commit is August 23rd. Just for a whirl I did try sbinet and it failed.

lethe :: Dieterbe/influx-cli » go build .
# github.com/sbinet/go-readline/pkg/readline
37: error: use of undeclared identifier 'rl_completion_func_t'; did you mean 'rl_compentry_func_t'?

Which is actually handled in gobs/readline@2a2f8e3

P.S. I'm using XCode 6.1 on Yosemite if that helps at all. Yes gobs/readline really worked.

@hillar
Copy link

hillar commented Nov 18, 2014

root@grafana:/tmp# cat /etc/debian_version 
jessie/sid

root@grafana:/tmp# uname -a
Linux grafana 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

root@grafana:/tmp# CGO_ENABLED=0 go get -a -ldflags '-s' github.com/Dieterbe/influx-cli
go/src/github.com/Dieterbe/influx-cli/influx-cli.go:9:2: no buildable Go source files in /tmp/go/src/github.com/shavac/readline

root@grafana:/tmp# CGO_ENABLED=0 go get -a -ldflags '-s' github.com/shavac/readline
can't load package: package github.com/shavac/readline: no buildable Go source files in /tmp/go/src/github.com/shavac/readline

@agaviria
Copy link

The gobs/readline failed for me:

# github.com/Dieterbe/influx-cli
./influx-cli.go:6: import /Users/Alex/gocode/pkg/darwin_amd64/github.com/davecgh/go-spew/spew.a: object is [darwin amd64 go1.3.1 X:precisestack] expected [darwin amd64 go1.3.3 X:precisestack]

I'm on OSX 10.10.1 Yosemite and XCode 6.1.1

Here is my go env:

GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/Alex/gocode"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.3.3/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.3.3/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"

@cnf
Copy link

cnf commented Dec 16, 2014

[darwin amd64 go1.3.1 X:precisestack] expected [darwin amd64 go1.3.3 X:precisestack]

it seems to want go 1.3.3 instead of your go 1.3.1?

EDIT: you seem to have 1.3.3 :P so maybe it is the other way around, the library hasn't been updated for 1.3.3 yet?

@xo4n
Copy link

xo4n commented Dec 16, 2014

just for the record gobs/readline also worked for me with

OSX 10.10.1 Yosemite
Xcode 6.1.1
go version go1.4 darwin/amd64

go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/Xoan/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"

@agaviria
Copy link

Yes I concur, go1.4 darwin/amd64 does install without any issues on OSX 10.10.1 with XCode 6.1.1. There is one thing users should do if they are upgrading from 1.3 and that is resetting builds for the $GOPATH pkg directory.

The following should do the trick:

rm -rf $GOPATH/pkg

The new 1.4 compatible builds will compile when you go install a Go package:

go install $SOMEPKG 

@damm
Copy link
Contributor

damm commented Dec 17, 2014

wow I filed #10 back in october :(

@Dieterbe
Copy link
Owner

whoops, sorry, this slipped my mind. pr #10 works for me so i merged it, hopefully this will fix install issues for macOS users.

@jdowning
Copy link
Author

@Dieterbe works for me on 10.10 now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants