Comments (6)
@ivanmartos @asish-tom-fin See https://stackoverflow.com/questions/5245444/cross-compiler-for-linux-on-mac-os-x/14145566 and https://blog.filippo.io/easy-windows-and-linux-cross-compilers-for-macos/.
from go-fitz.
Hello,
You cannot just cross compile with simple GOOS=linux GOARCH=amd64 go build for example, library uses https://golang.org/cmd/cgo/, so you need to have compiler and toolchain for arch you want to build for. Also, enable CGO_ENABLED=1.
For example I have on my Linux system mingw toolchain in /usr/x86_64-w64-mingw32 and x86_64-w64-mingw32-gcc in PATH, so I can just CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build to cross compile for Windows.
Not sure how you can do that on macOS. Library uses precompiled mupdf libraries, but they still need to be linked at the end with the appropriate toolchain.
from go-fitz.
Thank you very much. I will try it
from go-fitz.
@czh0318 how did you pls manage to fix it?
from go-fitz.
Thank you very much. I will try it
@czh0318 czh0318
Hi, are you able to cross-compile it in mac?
from go-fitz.
I used https://github.com/tpoechtrager/osxcross in Linux to build macOS binary, not exactly for this project, but it should be the same. I know I saw Linux binary toolchain for MacOS on github recently, but with a quick search, I didn't found it.
from go-fitz.
Related Issues (20)
- getting crash for some pdf format HOT 1
- start program HOT 2
- undefined: fitz.New HOT 3
- fitz is not importing correctly HOT 2
- centos alpine build faild HOT 5
- Linux platform, when PDF is invalid
- Error when convert PDF to Image HOT 3
- outline.page.page undefined (type _Ctype_int has no field or method page) compiler (MissingFieldOrMethod) HOT 6
- libmupdf_linux_amd64.a error HOT 8
- Implement Text Extraction in PyMuPdf Fitz Layout Mode HOT 4
- how to build mupdf static library in window platform HOT 10
- cannot find builtin CJK font HOT 1
- doc.HTML() can it support <table> <tr> <td>? HOT 1
- linux compilation error HOT 3
- linux ubuntu build fail HOT 5
- Makes discord/lilliput segfault HOT 2
- fitz is empty HOT 2
- How to build docker with this package?
- GCC 12.2 Support HOT 10
- Is it possible to add PDF splitting and merging functions? HOT 1
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 go-fitz.