update README
This commit is contained in:
parent
32c0898b55
commit
6fa1b7cbf5
104
README.md
104
README.md
@ -1,7 +1,7 @@
|
|||||||
# libvips : an image processing library
|
# libvips : an image processing library
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/libvips/libvips.svg?branch=master)](https://travis-ci.org/libvips/libvips)
|
[![Build Status](https://travis-ci.org/libvips/libvips.svg?branch=master)](https://travis-ci.org/libvips/libvips)
|
||||||
[![OSS-fuzz Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/libvips.png)](https://oss-fuzz-build-logs.storage.googleapis.com/index.html)
|
[![OSS-fuzz Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/libvips.png)](https://oss-fuzz.com/coverage-report/job/libfuzzer_asan_libvips/latest)
|
||||||
[![Coverity Status](https://scan.coverity.com/projects/6503/badge.svg)](https://scan.coverity.com/projects/jcupitt-libvips)
|
[![Coverity Status](https://scan.coverity.com/projects/6503/badge.svg)](https://scan.coverity.com/projects/jcupitt-libvips)
|
||||||
|
|
||||||
libvips is a [demand-driven, horizontally
|
libvips is a [demand-driven, horizontally
|
||||||
@ -64,7 +64,7 @@ We keep pre-baked tarballs in
|
|||||||
|
|
||||||
Untar, then in the libvips directory you should just be able to do:
|
Untar, then in the libvips directory you should just be able to do:
|
||||||
|
|
||||||
$ ./configure
|
./configure
|
||||||
|
|
||||||
Check the summary at the end of `configure` carefully. libvips must have
|
Check the summary at the end of `configure` carefully. libvips must have
|
||||||
`build-essential`, `pkg-config`, `glib2.0-dev`, `libexpat1-dev`.
|
`build-essential`, `pkg-config`, `glib2.0-dev`, `libexpat1-dev`.
|
||||||
@ -76,104 +76,98 @@ of the things that libvips can be configured to use.
|
|||||||
|
|
||||||
Once `configure` is looking OK, compile and install with the usual:
|
Once `configure` is looking OK, compile and install with the usual:
|
||||||
|
|
||||||
$ make
|
make
|
||||||
$ sudo make install
|
sudo make install
|
||||||
|
|
||||||
By default this will install files to `/usr/local`.
|
By default this will install files to `/usr/local`.
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
|
|
||||||
Do a basic test of your build with:
|
Run the test suite with:
|
||||||
|
|
||||||
$ make check
|
make check
|
||||||
|
|
||||||
Run the libvips test suite with:
|
|
||||||
|
|
||||||
$ pytest
|
|
||||||
|
|
||||||
Run a specific test with:
|
Run a specific test with:
|
||||||
|
|
||||||
$ pytest test/test-suite/test_foreign.py -k test_tiff
|
pytest --verbose
|
||||||
|
pytest test/test-suite/test_foreign.py -k test_tiff
|
||||||
|
|
||||||
# Building libvips from git
|
# Building libvips from git
|
||||||
|
|
||||||
Clone the latest sources with:
|
Clone the latest sources with:
|
||||||
|
|
||||||
$ git clone git://github.com/libvips/libvips.git
|
git clone git://github.com/libvips/libvips.git
|
||||||
|
|
||||||
Building from git needs more packages -- you'll need at least `gtk-doc`
|
Building from git needs more packages -- you'll need at least `gtk-doc`
|
||||||
and `gobject-introspection`, see the dependencies section below. For example:
|
and `gobject-introspection`, see the dependencies section below. For example:
|
||||||
|
|
||||||
$ brew install gtk-doc
|
brew install gtk-doc
|
||||||
|
|
||||||
Then build the build system with:
|
Then build the build system with:
|
||||||
|
|
||||||
$ ./autogen.sh
|
./autogen.sh --prefix=/home/john/vips
|
||||||
|
|
||||||
Debug build:
|
Debug build:
|
||||||
|
|
||||||
$ CFLAGS="-g -Wall" CXXFLAGS="-g -Wall" \
|
CFLAGS="-g -Wall" CXXFLAGS="-g -Wall" \
|
||||||
./configure --prefix=/home/john/vips --enable-debug
|
./configure --prefix=/home/john/vips --enable-debug
|
||||||
$ make
|
make
|
||||||
$ make install
|
make install
|
||||||
|
|
||||||
Leak check:
|
Leak check. Use the suppressions file `supp/valgrind.supp`.
|
||||||
|
|
||||||
$ export G_DEBUG=gc-friendly
|
export G_DEBUG=gc-friendly
|
||||||
$ valgrind --suppressions=libvips.supp \
|
valgrind --suppressions=vips-x.y.z/supp/valgrind.supp \
|
||||||
--leak-check=yes \
|
--leak-check=yes \
|
||||||
vips ... > vips-vg.log 2>&1
|
vips ... > vips-vg.log 2>&1
|
||||||
|
|
||||||
Memory error debug:
|
Memory error debug:
|
||||||
|
|
||||||
$ valgrind --vgdb=yes --vgdb-error=0 vips ...
|
valgrind --vgdb=yes --vgdb-error=0 vips ...
|
||||||
|
|
||||||
valgrind threading check:
|
valgrind threading check:
|
||||||
|
|
||||||
$ valgrind --tool=helgrind vips ... > vips-vg.log 2>&1
|
valgrind --tool=helgrind vips ... > vips-vg.log 2>&1
|
||||||
|
|
||||||
Clang build:
|
Clang build:
|
||||||
|
|
||||||
$ CC=clang CXX=clang++ ./configure --prefix=/home/john/vips
|
CC=clang CXX=clang++ ./configure --prefix=/home/john/vips
|
||||||
|
|
||||||
Clang static analysis:
|
Clang static analysis:
|
||||||
|
|
||||||
$ scan-build ./configure --disable-introspection --disable-debug
|
scan-build ./configure --disable-introspection --disable-debug
|
||||||
$ scan-build -o scan -v make
|
scan-build -o scan -v make
|
||||||
$ scan-view scan/2013-11-22-2
|
scan-view scan/2013-11-22-2
|
||||||
|
|
||||||
Clang dynamic analysis:
|
Clang dynamic analysis:
|
||||||
|
|
||||||
$ FLAGS="-g -O1 -fno-omit-frame-pointer"
|
FLAGS="-g -O1 -fno-omit-frame-pointer"
|
||||||
$ CC=clang CXX=clang++ LD=clang \
|
CC=clang CXX=clang++ LD=clang \
|
||||||
CFLAGS="$FLAGS" CXXFLAGS="$FLAGS" LDFLAGS=-fsanitize=address \
|
CFLAGS="$FLAGS" CXXFLAGS="$FLAGS" LDFLAGS=-fsanitize=address \
|
||||||
./configure --prefix=/home/john/vips
|
./configure --prefix=/home/john/vips
|
||||||
|
|
||||||
$ FLAGS="-O1 -g -fsanitize=thread"
|
FLAGS="-O1 -g -fsanitize=thread"
|
||||||
$ FLAGS="$FLAGS -fPIC"
|
FLAGS="$FLAGS -fPIC"
|
||||||
$ FLAGS="$FLAGS -fno-omit-frame-pointer -fno-optimize-sibling-calls"
|
FLAGS="$FLAGS -fno-omit-frame-pointer -fno-optimize-sibling-calls"
|
||||||
$ CC=clang CXX=clang++ LD=clang \
|
CC=clang CXX=clang++ LD=clang \
|
||||||
CFLAGS="$FLAGS" CXXFLAGS="$FLAGS" \
|
CFLAGS="$FLAGS" CXXFLAGS="$FLAGS" \
|
||||||
LDFLAGS="-fsanitize=thread -fPIC" \
|
LDFLAGS="-fsanitize=thread -fPIC" \
|
||||||
./configure --prefix=/home/john/vips \
|
./configure --prefix=/home/john/vips \
|
||||||
--without-magick \
|
--without-magick \
|
||||||
--disable-introspection
|
--disable-introspection
|
||||||
$ G_DEBUG=gc-friendly vips copy ~/pics/k2.jpg x.jpg >& log
|
G_DEBUG=gc-friendly vips copy ~/pics/k2.jpg x.jpg >& log
|
||||||
|
|
||||||
Build with the GCC auto-vectorizer and diagnostics (or just -O3):
|
Build with the GCC auto-vectorizer and diagnostics (or just -O3):
|
||||||
|
|
||||||
$ FLAGS="-O2 -march=native -ffast-math"
|
FLAGS="-O2 -march=native -ffast-math"
|
||||||
$ FLAGS="$FLAGS -ftree-vectorize -fdump-tree-vect-details"
|
FLAGS="$FLAGS -ftree-vectorize -fdump-tree-vect-details"
|
||||||
$ CFLAGS="$FLAGS" CXXFLAGS="$FLAGS" \
|
CFLAGS="$FLAGS" CXXFLAGS="$FLAGS" \
|
||||||
./configure --prefix=/home/john/vips
|
./configure --prefix=/home/john/vips
|
||||||
|
|
||||||
Static analysis with:
|
|
||||||
|
|
||||||
$ cppcheck --force --enable=style . &> cppcheck.log
|
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
||||||
libvips has to have `glib2.0-dev`. Other dependencies are optional, see below.
|
libvips has to have `glib2.0-dev` and `libexpat1-dev`. Other dependencies
|
||||||
|
are optional, see below.
|
||||||
|
|
||||||
# Optional dependencies
|
# Optional dependencies
|
||||||
|
|
||||||
@ -182,18 +176,14 @@ libraries automatically. See `./configure --help` for a set of flags to
|
|||||||
control library detection. Packages are generally found with `pkg-config`,
|
control library detection. Packages are generally found with `pkg-config`,
|
||||||
so make sure that is working.
|
so make sure that is working.
|
||||||
|
|
||||||
libtiff, giflib and libjpeg do not usually use `pkg-config` so libvips looks for
|
Libraries like giflib and nifti do not use `pkg-config` so libvips will also
|
||||||
them in the default path and in `$prefix`. If you have installed your own
|
look for them in the default path and in `$prefix`. If you have installed
|
||||||
versions of these libraries in a different location, libvips will not see
|
your own versions of these libraries in a different location, libvips will
|
||||||
them. Use switches to libvips configure like:
|
not see them. Use switches to libvips configure like:
|
||||||
|
|
||||||
./configure --prefix=/Users/john/vips \
|
./configure --prefix=/Users/john/vips \
|
||||||
--with-giflib-includes=/opt/local/include \
|
--with-giflib-includes=/opt/local/include \
|
||||||
--with-giflib-libraries=/opt/local/lib \
|
--with-giflib-libraries=/opt/local/lib
|
||||||
--with-tiff-includes=/opt/local/include \
|
|
||||||
--with-tiff-libraries=/opt/local/lib \
|
|
||||||
--with-jpeg-includes=/opt/local/include \
|
|
||||||
--with-jpeg-libraries=/opt/local/lib
|
|
||||||
|
|
||||||
or perhaps:
|
or perhaps:
|
||||||
|
|
||||||
@ -201,8 +191,6 @@ or perhaps:
|
|||||||
CXXFLAGS="-g -Wall -I/opt/local/include -L/opt/local/lib" \
|
CXXFLAGS="-g -Wall -I/opt/local/include -L/opt/local/lib" \
|
||||||
./configure --prefix=/Users/john/vips
|
./configure --prefix=/Users/john/vips
|
||||||
|
|
||||||
to get libvips to see your builds.
|
|
||||||
|
|
||||||
### libjpeg
|
### libjpeg
|
||||||
|
|
||||||
The IJG JPEG library. Use the `-turbo` version if you can.
|
The IJG JPEG library. Use the `-turbo` version if you can.
|
||||||
|
Loading…
Reference in New Issue
Block a user