Comments (2)
It is not clear to me what you are asking.
If you are looking for cross-compilation builds it is best to use xgo as documented here.
If you are looking to create your own Docker image to build cgofuse based projects then you need to install the prerequisites and then build as documented here.
from cgofuse.
To explain better -- I'm using the current Docker file
FROM golang:alpine AS builder
ENV GOBIN $GOPATH/bin
RUN apk update
RUN apk add fuse-dev gcc libc-dev fuse
# Set necessary environmet variables needed for our image
ENV GO111MODULE=auto \
CGO_ENABLED=0 \
GOOS=linux \
GOARCH=amd64
RUN mkdir -p /go/src/github.com/tomcat-bit/cgofuse
WORKDIR /go/src/github.com/tomcat-bit/cgofuse
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN go build -a -o /fuser ./examples/passthrough
FROM alpine:latest
RUN apk update
RUN apk add fuse
COPY --from=builder /fuser /
I get
/go/pkg/mod/github.com/billziss-gh/[email protected]/fuse/host.go:30:8: undefined: c_struct_fuse
/go/pkg/mod/github.com/billziss-gh/[email protected]/fuse/host.go:64:38: undefined: c_fuse_statvfs_t
/go/pkg/mod/github.com/billziss-gh/[email protected]/fuse/host.go:79:33: undefined: c_fuse_stat_t
/go/pkg/mod/github.com/billziss-gh/[email protected]/fuse/host.go:98:56: undefined: c_fuse_timespec_t
/go/pkg/mod/github.com/billziss-gh/[email protected]/fuse/host.go:103:28: undefined: c_int
/go/pkg/mod/github.com/billziss-gh/[email protected]/fuse/host.go:114:25: undefined: c_char
/go/pkg/mod/github.com/billziss-gh/[email protected]/fuse/host.go:114:40: undefined: c_fuse_stat_t
/go/pkg/mod/github.com/billziss-gh/[email protected]/fuse/host.go:114:62: undefined: c_int
/go/pkg/mod/github.com/billziss-gh/[email protected]/fuse/host.go:124:26: undefined: c_char
/go/pkg/mod/github.com/billziss-gh/[email protected]/fuse/host.go:124:55: undefined: c_size_t
It seems like using Go mod doesn't work with building with fuse. Further, using dep
as described in andersjohansenange@a08ea76 works fine. When it works, I'll probably make a pull request on how to build a Docker image when Go modules is enabled.
from cgofuse.
Related Issues (20)
- Virtio-FS disk not showing after upgrade to 1.9 from 1.9B2. HOT 1
- On macOS, under load, files appearing twice or disappearing when running `ls`, unless `readdir` is sorted HOT 14
- Occasional crash under Windows - use after free? HOT 9
- . HOT 1
- Write method not called HOT 1
- Enable LOCK feature HOT 2
- How to increase buffer size? (max_pages and libfuse3) HOT 1
- Mount and Unmount Result
- Mixup of O_EXCL and O_TRUNC constant values CGO vs non CGO HOT 13
- warning: "FUSE_USE_VERSION" redefined HOT 1
- possible to call cheat engine with cgofuse HOT 1
- Support ARM architecture on Linux
- Incorrect writes from fuse HOT 12
- Need to know when the fuse service is ready HOT 4
- Please provide a way to retrieve information about the fuse implementation
- memfs example problems
- Golang Windows Passthrough version HOT 1
- command line options for Memfs HOT 8
- How can I not let it download video/image files automatically? HOT 3
- Mirrorfs? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cgofuse.