Comments (8)
For leptonica, a simple way to make your "headless" build is to edit only environ.h and use the static makefile, as described in the README.html.
from leptonica.
I plan to adjust cmake configuration, so you can choose which dependencies should be compiled.
from leptonica.
At the moment you can disable only webp
(with -DLIBWEBP_SUPPORT=OFF) and openjpeg
(-DOPENJPEG_SUPPORT=OFF).
Just for notice: jpeg
is (optional) dependency for tiff
, so error could come also from this source especially if you are making static build.
from leptonica.
I eventually managed to disable everything by editing the source code, especially environ.h
and the Makefile (to get rid of all mentions of libjpeg, etc.). The resulting library was about 4MB for leptonica and 3MB for tesseract. It would be great if the Makefile could be edited so that it's easier to create a "headless" build.
from leptonica.
@DanBloomberg Yeah I found it, but I'm just suggesting making those environ.h
flags configurable from the Makefile, so that it's easier to enable / disable without using sed (when using automated scripts / CI, etc.).
from leptonica.
@zdenop I also had to modify cmake/Configure.cmake
and prog/makefile.static
to completely disable linking to libpng, libtiff, libjpeg and libz: https://github.com/fschutt/tesseract-static-rs/blob/e5fffdf9fc1f5592d304ceab1237f8051535994b/build.rs#L123-L199
from leptonica.
As you demonstrate, in addition to editing environ.h, you also need to modify the ALL_LIBS variable in prog/makefile.static.
Nice use of rust!
from leptonica.
please try with current master:
cmake -Bbuild -DBUILD_PROG=OFF -DSW_BUILD=OFF -DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB=OFF -DENABLE_PNG=OFF -DENABLE_GIF=OFF -DENABLE_JPEG=OFF -DENABLE_TIFF=OFF -DENABLE_WEBP=OFF -DENABLE_OPENJPEG=OFF
from leptonica.
Related Issues (20)
- 1.84.0 fails to build in FreeBSD 14.0 due missing reference to libm using CMake HOT 24
- CMake build in 1.84.0 adds include to non-existant path
- 1.84.1: compile time warnings HOT 3
- pixWriteJp2k: unexpected strong color artifacts on featureless image HOT 7
- pixOrientDetect with .bmp file HOT 6
- Logic error in pixcmapIsValid() HOT 5
- Regression: file not found on MacOS when opening /tmp file HOT 2
- Identifying and removing asterisks HOT 8
- pixDeskewGeneral(...) failing to detect a 45 degree skew? HOT 2
- Application crashing while disposing Pix.Create object HOT 5
- get minarea-rotated box of a skew area HOT 2
- pixRead() can't read png images HOT 5
- Crash when access Pix colormap on debug HOT 6
- Installing leptonica on Windows failed with reason prompt 'SW' not found HOT 2
- Errors building Leptonica for use with Tesseract HOT 2
- getImpliedFileFormat / pixWriteImpliedFormat and PNM issues HOT 2
- pixOrientCorrect/pixOrientDetect issue with PBM HOT 4
- Cross-Compiling Leptonica for Windows on Arch Linux HOT 9
- Avoid taking address of packed member HOT 1
- Ghostscript build fails on Solaris due Tesseract and/or Leptonica HOT 4
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 leptonica.