GithubHelp home page GithubHelp logo

Cross compiling doesn't work about logrus HOT 11 CLOSED

sirupsen avatar sirupsen commented on May 16, 2024
Cross compiling doesn't work

from logrus.

Comments (11)

sirupsen avatar sirupsen commented on May 16, 2024

What are you cross compiling to?

from logrus.

haarts avatar haarts commented on May 16, 2024

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

from logrus.

sirupsen avatar sirupsen commented on May 16, 2024

Did you ever find a solution to this?

from logrus.

haarts avatar haarts commented on May 16, 2024

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.

from logrus.

labkode avatar labkode commented on May 16, 2024

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

from logrus.

cgag avatar cgag commented on May 16, 2024

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

from logrus.

sirupsen avatar sirupsen commented on May 16, 2024

@cgag mind doing that? :)

from logrus.

cgag avatar cgag commented on May 16, 2024

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

from logrus.

cgag avatar cgag commented on May 16, 2024

@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.

from logrus.

0xE0F avatar 0xE0F commented on May 16, 2024

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

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

from logrus.

dgsb avatar dgsb commented on May 16, 2024

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.

from logrus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.