Giter Site home page Giter Site logo

Comments (3)

billziss-gh avatar billziss-gh commented on May 18, 2024

@AlbinoGeek you wrote in the GOX thread:

I am building from Windows 10 (Host) via Docker CE , Hyper-V (MobyOS)

This is generally equiv. to a typical Docker environment, except the Moby part (Windows-specific Hyper-V virtual machine that hosts the Docker Machine you speak with from your Windows client. Otherwise, all docker commands execute 100% as expected on any other platform.)

e.g.: If cgofuse built inside "just any" CentOS 7 or Ubuntu VM, it would work here too. Exception: If it requires gcc or libfuse to be available on the Docker HOST -- this would be MobyOS in my situation, which is much harder to accomplish. However, you can access libfuse locally, as it's installed in the Docker CONTAINER.

Cgofuse will not build without a C compilation environment that also includes FUSE for the intended platform. This is because cgofuse uses cgo.

Can you use the xgo-cgofuse docker image in the Docker for Windows environment? If the answer is no, you will unfortunately have to recreate the cross-compilation environment. This is non-trivial, but possible.

The xgo-cgofuse docker image acts as a cross-compilation host. It includes cross-compilers and tools for all supported platforms (Windows, macOS, Linux). It also includes FUSE for the supported platforms. Note that you do not need cross-compilation tools or FUSE on the Docker host for this to work.

from cgofuse.

AlbinoGeek avatar AlbinoGeek commented on May 18, 2024

Using your image is what produces the above error, telling me that my code must be available via aboslute path. The docker host is MobyOS (a flavor of Linux) if you have Docker installed on Windows, it uses Hyper-V to host the MobyOS virtual machine.

As I said in my opening post, this is from following the README instructions

C:\WINDOWS\system32> docker pull billziss/xgo-cgofuse
Using default tag: latest
latest: Pulling from billziss/xgo-cgofuse
Digest: sha256:c15a00fc837f2ea009038dc2cfb37cb7b0d8938d318bf3b9698f2928a6e4780b
Status: Image is up to date for billziss/xgo-cgofuse:latest

C:\WINDOWS\system32> go get -u github.com/karalabe/xgo

C:\WINDOWS\system32> cd /c/tools/go/src/protected/memfs

C:\tools\go\src\protected\memfs> xgo --image=billziss/xgo-cgofuse --targets=linux/386,linux/amd64,windows/386,windows/amd64 .
Checking docker installation...
Client:
 Version:       18.03.0-ce
 API version:   1.37
 Go version:    go1.9.4
 Git commit:    0520e24
 Built: Wed Mar 21 23:06:28 2018
 OS/Arch:       windows/amd64
 Experimental:  false
 Orchestrator:  swarm

Server:
 Engine:
  Version:      18.03.0-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.4
  Git commit:   0520e24
  Built:        Wed Mar 21 23:14:32 2018
  OS/Arch:      linux/amd64
  Experimental: true

Checking for required docker image billziss/xgo-cgofuse... found.
Cross compiling protected/memfs...
Building locally protected/memfs...
go: GOPATH entry is relative; must be absolute path: "\\ext-go\\1".
For more details see: 'go help gopath'
Compiling for linux/386...
go: GOPATH entry is relative; must be absolute path: "\\ext-go\\1".
For more details see: 'go help gopath'
2018/04/14 17:30:19 Failed to cross compile package: exit status 2
`` 

from cgofuse.

AlbinoGeek avatar AlbinoGeek commented on May 18, 2024

The issue here does not appear to be related to cgo or the availability of compilers, but that the xgo image was not written to handle local paths. I had found a few issues created in the past about this issue, but they did not help me to solve my issue (trying to use a local completed path, or even hosting a local HTTPd and fake DNS server to force it to be an absolute path, still results in a similar error.)

from cgofuse.

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.