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

Cross compiling doesn't work #112

Closed
haarts opened this issue Jan 16, 2015 · 11 comments
Closed

Cross compiling doesn't work #112

haarts opened this issue Jan 16, 2015 · 11 comments
Labels

Comments

@haarts
Copy link

haarts commented Jan 16, 2015

I'm using goxc to cross compile my project. Doing so now results in:

../../Sirupsen/logrus/text_formatter.go:28: undefined: IsTerminal
[goxc:xc] 2015/01/16 20:50:30 'go' returned error: exit status 2
[goxc:xc] 2015/01/16 20:50:30 Error: exit status 2
[goxc:xc] 2015/01/16 20:50:30 Have you run `goxc -t` for this platform (amd64p32,nacl)???

This error is repeated for every platform.

I'm using c6a969a and Go 1.4 on Ubuntu 14.04.
Running goxc in the examples/basic directory is enough to reproduce the problem. I have ran goxc -t of course and I know this worked previous to introducing logrus.

@sirupsen
Copy link
Owner

What are you cross compiling to?

@haarts
Copy link
Author

haarts commented Jan 21, 2015

All of them. :) Goxc compiles to the craziest platforms. But none of them succeed at the moment.

@sirupsen
Copy link
Owner

sirupsen commented Mar 9, 2015

Did you ever find a solution to this?

@haarts
Copy link
Author

haarts commented Mar 10, 2015

I have had some luck with:

$ goxc -bc="windows,linux,darwin"

This specifies 'build constraints'. And yielded binaries for the three platforms. I'm unsure why constraining the platforms works since an unconstrained builds builds for these platforms as well.

The bug seems more goxc related, this issue I'd close.

@sirupsen sirupsen added the bug label Mar 26, 2015
@labkode
Copy link

labkode commented Apr 7, 2015

The cross compilation only fails for these architectures.

[goxc:xc] 2015/04/07 21:32:25 Have you run `goxc -t` for this platform (386,netbsd)???
[goxc:xc] 2015/04/07 21:32:25 Have you run `goxc -t` for this platform (amd64,netbsd)???
[goxc:xc] 2015/04/07 21:32:25 Have you run `goxc -t` for this platform (arm,netbsd)???
[goxc:xc] 2015/04/07 21:32:25 Have you run `goxc -t` for this platform (386,dragonfly)???
[goxc:xc] 2015/04/07 21:32:25 Have you run `goxc -t` for this platform (amd64,dragonfly)???
[goxc:xc] 2015/04/07 21:32:25 Have you run `goxc -t` for this platform (386,plan9)???
[goxc:xc] 2015/04/07 21:32:25 Have you run `goxc -t` for this platform (amd64,solaris)???
[goxc:xc] 2015/04/07 21:32:26 Have you run `goxc -t` for this platform (amd64p32,nacl)???
[goxc:xc] 2015/04/07 21:32:26 Have you run `goxc -t` for this platform (386,nacl)???
[goxc:xc] 2015/04/07 21:32:26 Have you run `goxc -t` for this platform (arm,nacl)???

The error is always this:
../../Sirupsen/logrus/text_formatter.go:29: undefined: IsTerminal

@cgag
Copy link
Contributor

cgag commented Jun 22, 2015

I just ran into problems trying to compile for dragonfly, I think it's from terminal_notwindows only explicitly listing "// +build linux darwin freebsd openbsd". I think it might be possible to fix it just by adding the remaining OSes to this list.

https://github.com/Sirupsen/logrus/blob/master/terminal_notwindows.go

@sirupsen
Copy link
Owner

@cgag mind doing that? :)

@cgag
Copy link
Contributor

cgag commented Jun 24, 2015

I'll give it a shot at some point soon. If anyone else wants to do it, feel free to preempt me.

@cgag
Copy link
Contributor

cgag commented Jun 26, 2015

@sirupsen I added support for the other BSDs (dragonflybsd and netbsd): #203

I couldn't build the toolchain using gox for nacl, and plan9 says it doesn't support Termios or TIOCGETA.

@0xE0F
Copy link
Contributor

0xE0F commented Nov 4, 2015

@sirupsen I added support for the Solaris OS: #289

It also hasn't SYS_IOCTL, so terminal_notwindows.go was inapplicable.

@dgsb
Copy link
Collaborator

dgsb commented Sep 16, 2018

This issue has been pretty inactive since several years. If some cross-compiling issue accurs again, I suggest create a dedicated issue for the specific os/arch tuple.

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

No branches or pull requests

6 participants