Comments (3)
Seems you are trying to use both vendor and extlib? Remove vendor, it will not copy all necessary files. If you want to pass additional LDFLAGS/CFLAGS that is done by using CGO_CFLAGS and CGO_LDFLAGS. You can search issues to see how it is done in Dockefile if you want to use an external library.
from go-fitz.
Btw. you can use an external library, that is why there is a tag for that, not sure how you understood that the bundled library is the only way.
$ go mod init example
$ go mod tidy
$ go build -tags extlib
$ ldd ./example
linux-vdso.so.1 (0x00007ffd181c8000)
libmupdf.so.1.19.0 => /usr/lib64/libmupdf.so.1.19.0 (0x00007f65b7835000)
libm.so.6 => /lib64/libm.so.6 (0x00007f65b7760000)
libc.so.6 => /lib64/libc.so.6 (0x00007f65b7563000)
libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f65b749b000)
libgumbo.so.1 => /usr/lib64/libgumbo.so.1 (0x00007f65b743c000)
libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007f65b7343000)
libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00007f65b72af000)
libz.so.1 => /lib64/libz.so.1 (0x00007f65b7295000)
libjbig2dec.so.0 => /usr/lib64/libjbig2dec.so.0 (0x00007f65b7275000)
libopenjp2.so.7 => /usr/lib64/libopenjp2.so.7 (0x00007f65b7216000)
/lib64/ld-linux-x86-64.so.2 (0x00007f65ba692000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f65b7203000)
libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007f65b71cc000)
libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007f65b71a4000)
libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f65b706d000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f65b6ff6000)
Did you install static only library? In that case also add static
tag, i.e. tags 'extlib static'
.
from go-fitz.
Right, so brew installs only static libraries, this is from Catalina VM but probably the same on your OS.
% brew ls --verbose mupdf | grep lib
/usr/local/Cellar/mupdf/1.19.1/lib/libmupdf.a
/usr/local/Cellar/mupdf/1.19.1/lib/libmupdf-third.a
% ls -1
example.go
go.mod
go.sum
test.pdf
% go build -o example-embed
% go build -tags 'extlib static' -o example
% otool -L example-embed
example-embed:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
% otool -L example
example:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
% ./example
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
- Out of Memory issues with frequent requests 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.