Skip to content

error: go get github.com/arduino/arduino-create-agent #219

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

Closed
ghost opened this issue Apr 11, 2018 · 12 comments
Closed

error: go get github.com/arduino/arduino-create-agent #219

ghost opened this issue Apr 11, 2018 · 12 comments

Comments

@ghost
Copy link

ghost commented Apr 11, 2018

go build github.com/arduino/arduino-create-agent/vendor/go.bug.st/serial.v1/enumerator: invalid flag in #cgo LDFLAGS: -fconstant-cfstrings
@facchinm
Copy link
Member

Hi @focalhot ,
which OS / golang version are you targeting?

@facchinm facchinm added the status: waiting for information More information must be provided before work can proceed label Apr 11, 2018
@ghost
Copy link
Author

ghost commented Apr 11, 2018

@facchinm

go version go1.10.1 darwin/amd64
macOS 10.13.3

@facchinm facchinm removed the status: waiting for information More information must be provided before work can proceed label Apr 11, 2018
@facchinm
Copy link
Member

Can you try exporting

export MACOSX_DEPLOYMENT_TARGET=10.9
export CGO_ENABLED=1

in the same shell before building?
It looks like that flag is supported by latest clang so maybe it's a go toolchain bug.
We are currently building with 1.8.3 (using osxcross for OSX build)

@ghost
Copy link
Author

ghost commented Apr 11, 2018

@facchinm It still does not work well.Same error.

@glowflame
Copy link

Any updates here? I'm having the same error:

go version go1.10.2 darwin/amd64
MacOS 10.13.2

@murilopolese
Copy link
Contributor

I'm also getting an issue running go get github.com/arduino/arduino-create-agent both on my Ubuntu 18.04 and on a Docker container, both running go 1.8.7:

$ go version
go version go1.8.7 linux/amd64
$ go get github.com/arduino/arduino-create-agent
package math/bits: unrecognized import path "math/bits" (import path does not begin with hostname)

$ docker run -i -t golang:1.8.7 bash
root@ea8e1acf1b11:/go# go version
go version go1.8.7 linux/amd64
root@36835224d745:/go# go get github.com/arduino/arduino-create-agent
package math/bits: unrecognized import path "math/bits" (import path does not begin with hostname)

Any idea what it could be? This is the very first time I'm running Go so sorry if it's too much of a rookie mistake...

@facchinm
Copy link
Member

I think latest master branch needs golang 1.10+ . @rsora can you confirm?

@rsora
Copy link
Contributor

rsora commented Nov 28, 2018

Confirmed, with dependencies managed with dep tool

My apologies for the lack of details in the README, I'll update the build instructions asap!

@murilopolese
Copy link
Contributor

Upgrading to 1.10.5 did passed the initial problem but still getting:

$ go get github.com/arduino/arduino-create-agent
# pkg-config --cflags gtk+-3.0 appindicator3-0.1
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found
Package appindicator3-0.1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `appindicator3-0.1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'appindicator3-0.1' found
pkg-config: exit status 1

$ sudo apt install libappindicator3-1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libappindicator3-1 is already the newest version (12.10.1+18.04.20180322.1-0ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ sudo apt install libgtk-3-0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libgtk-3-0 is already the newest version (3.22.30-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I, and certainly more people on the community, would really appreciate if the build instructions were a bit richer... I'm willing to contribute writing documentation, debugging those issues and in any other way you think it's possible.

But I'm new to Go and since I am not able to "go get" the project, I'm a bit lost on where to start haha What would you suggest me to do? :)

@facchinm
Copy link
Member

facchinm commented Dec 4, 2018

Hi @murilopolese , sorry for the lack of documentation. The problem is that every OS has different prerequisites due to the tray icon being OS specific.
Linux in particular requires libappindicator which has two (three) different names 🙂
The problem you are encountering can be solved by installing -dev packages, which provide all the needed headers to compile stuff against the library.

@murilopolese
Copy link
Contributor

Thanks big time! I managed to build! ❤️ I made a small PR with updating the docs about the go version and dev packages as a way to say thanks!

All the best!

@gvarisco
Copy link
Contributor

Thanks @murilopolese for your contribution. I'll go ahead and mark this ticket as 'closed' while we work on merging #273

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

No branches or pull requests

5 participants