| 1 |
Q: "make" reports "usage: git rev-list [OPTION] …" |
| 2 |
A: the Makefile uses version.mk to build a version information for the tool. |
| 3 |
In that case you should comment out the lines in version.mk and set |
| 4 |
REPO_REVISION manually |
| 5 |
|
| 6 |
Q: I did not have "peg" and my config_dsl.grammar.c has zero size and there are |
| 7 |
compile errors. |
| 8 |
A: remove that file and use "git checkout config_dsl.grammar.c" to restore it |
| 9 |
from repository. Try to avoid "make distclean", because it erases the file. |
| 10 |
|
| 11 |
Q: My C-compiler reports error-messages like "cc: error: unrecognized command |
| 12 |
line option '-fsanitize=undefined'" |
| 13 |
A: You use an older GCC variant. Try 'SANITIZE="" make' |
| 14 |
|
| 15 |
Q: How can I compile a windows version of your program? |
| 16 |
A: I have only tested creating Windows executables using the crosscompiler |
| 17 |
minGW under Debian Bullseye. You need the installed mingw-w64-x86-32 packages, |
| 18 |
also you need to download and extract libpcre2 (check https://www.pcre.org/) |
| 19 |
In libpcre2 (pcre2-10.40), call "./configure --host=i686-w64-mingw32 |
| 20 |
--disable-win32-io --disable-shared -enable-static" and "make -j 4". Change |
| 21 |
into checkit-tiff/build, call: |
| 22 |
"cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-mingw32.cmake ../src/ |
| 23 |
-DPCRE2_STATIC |
| 24 |
-DPCRE2_LIBRARY=~/Downloads/pcre2-10.40/.libs/ |
| 25 |
-DPCRE2_POSIX_LIBRARY=~/Downloads/pcre2-10.40/.libs/libpcre2-posix.a |
| 26 |
-DPCRE2_INCLUDE_DIR=~/Downloads/pcre2-10.40/src ../src/" and "make -j 4" |
| 27 |
A2: I have only tested creating Windows executables using the crosscompiler |
| 28 |
minGW under Debian Bullseye. You need the installed mingw-w64-x86-64 packages, |
| 29 |
also you need to download and extract libtiff and libpcre2. in |
| 30 |
libpcre2 (pcre2-10.4ß), call "./configure --host=x86_64-w64-mingw32 |
| 31 |
--disable-win32-io --disable-shared -enable-static" and "make -j 4". Change |
| 32 |
into checkit-tiff/build, call: |
| 33 |
"cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-mingw64.cmake ../src/ |
| 34 |
-DPCRE2_POSIX_LIBRARY=~/Downloads/pcre2-10.40/.libs/libpcre2-posix.a |
| 35 |
-DPCRE2_LIBRARY=~/Downloads/pcre2-10.40/.libs/libpcre2-8.a |
| 36 |
-DPCRE2_INCLUDE_DIR=~/Downloads/pcre2-10.40/src ../src/" and "make -j 4" |
| 37 |
|
| 38 |
Q: How to compile to Javascript? |
| 39 |
A: Use emscripten, do same steps as above but with "emconfigure |
| 40 |
./configure...". Compile checkit_tiff with ff. options: |
| 41 |
$> emcmake cmake |
| 42 |
-DCMAKE_C_COMPILER=$(which emcc) |
| 43 |
-DPCRE2_LIBRARY=~/Downloads/pcre2-10.40/.libs/libpcre2-8.a |
| 44 |
-DPCRE2_POSIX_LIBRARY=~/Downloads/pcre2-10.40/.libs/libpcre2-posix.a |
| 45 |
-DPCRE2_INCLUDE_DIR=~/Downloads/pcre2-10.40/ -DEMSCRIPTEN=1 ../src/ |
| 46 |
$> make -j 4 |
| 47 |
$> js --experimental-wasm-threads checkit_tiff.js -c ../tiffs_should_pass/minimal_valid.tiff ../example_configs/cit_tiff6_baseline_SLUB.cfg |
| 48 |
HINT: the Debian Bullseye package seems broken, try the upstream version instead! |
| 49 |
A: If you want to compile for a website, change cmake call to this: |
| 50 |
$> emcmake cmake |
| 51 |
-DCMAKE_C_COMPILER=$(which emcc) |
| 52 |
-DPCRE2_LIBRARY=~/Downloads/pcre2-10.40/.libs/libpcre2-8.a |
| 53 |
-DPCRE2_POSIX_LIBRARY=~/Downloads/pcre2-10.40/.libs/libpcre2-posix.a |
| 54 |
-DPCRE2_INCLUDE_DIR=~/Downloads/pcre2-10.4ß/ -DEMSCRIPTEN_WEB=1 ../src/ |
| 55 |
|
| 56 |
Q: How to compile for m68k? |
| 57 |
A: Use a m68k-compiler, you only need to set CMAKE_C_COMPILER to your compiler variant. The checkit_tiff was tested |
| 58 |
under big-endian successfully (without ICC proflib). Here the command line for my cross compiling project: |
| 59 |
$> cmake -DCMAKE_C_COMPILER=/usr/bin/m68k-linux-gnu-gcc |
| 60 |
-DCMAKE_C_FLAGS="-Og -g -std=c11 -Wall -pedantic" -DSTATIC=1 |
| 61 |
-DWITHOUT_ICC_PROFLIB=1 -DPCRE2_STATIC=1 -DPCRE2_LIBRARY=~/Downloads/pcre2-10.39/.libs/libpcre2-8.a |
| 62 |
-DPCRE2_POSIX_LIBRARY=~/Downloads/pcre2-10.39/.libs/libpcre2-posix.a -DPCRE2_INCLUDE_DIR=~/Downloads/pcre2-10.39/src/ ../src |
| 63 |
|
| 64 |
Q: Where are older TIFF specs? |
| 65 |
A: take a look to: |
| 66 |
TIFF 4: https://web.archive.org/web/20050323073243/http://palimpsest.stanford.edu/bytopic/imaging/std/tiff4.html |
| 67 |
TIFF 5: https://web.archive.org/web/20050323073243/http://palimpsest.stanford.edu/bytopic/imaging/std/tiff5.html |
| 68 |
|
| 69 |
Q: I am using cmake, but it fails with "CMake Error: your CXX compiler: |
| 70 |
"CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER |
| 71 |
to a valid compiler path or name". But your program is C only, why I need a |
| 72 |
C++compiler then? |
| 73 |
A: cmake uses C++-compiler for its checks. Sorry, you need a C++ then. |
| 74 |
|
| 75 |
Q: Your tool processes very slow, why? |
| 76 |
A: No, the tool is optimized for very fast processing. On a NVME-based SSD it |
| 77 |
processes 550 TIFF files (2,9GB) in less 0,8 seconds. We have tested it also |
| 78 |
on our NFS based filesystem with similar fast results. There is only one |
| 79 |
cornercase, if you have a broken TIFF with very large IFDs. Because |
| 80 |
checkit_tiff tries to find all errors in a given TIFF file it does not use |
| 81 |
early aborts than some other tools. |
| 82 |
You could also try the memory mapped I/O, which should be very fast on |
| 83 |
supported filesystems. |
| 84 |
|
| 85 |
Q: I have a fully destroyed TIFF because checkit_tiff reports IFD errors. Is |
| 86 |
there any chance to repair the file? |
| 87 |
A: You could give "fixit_tiff" a try: |
| 88 |
http://andreas-romeyke.de/software.html#_fixit_tiff |
| 89 |
This project comes with some helper tools to find lost IFDs and could |
| 90 |
fix some typical errors in broken TIFF files. |
| 91 |
|
| 92 |
Q: I have a checkit_tiff understanding problem. For my file I get the error |
| 93 |
message: "(EE) tag 34665 (EXIFDOffset) --> Tag should have a valid and |
| 94 |
correct type. Unexpected tag type; found: IFD (lineno: 72)". I checked this |
| 95 |
and dug through the TIFF using the hex editor and the specification and |
| 96 |
found no problem. Offset 05F9F3F2 contains the tag 0x8769 (Exif tag: 34665), |
| 97 |
the Type Value is 0x000d (13 according to specification: Offset to child |
| 98 |
IFDs. Each value is an offset (from the beginning of the TIFF file, as |
| 99 |
always) to a child IFD. Child images provide extra information for the |
| 100 |
parent image - such as a subsampled version of the parent image. TIFF data |
| 101 |
type is Long or 13, IFD. The IFD type is identical to LONG, except that it |
| 102 |
is only used to point to other valid IFDs), see Offset 05f9f3f4 05f9f3f5. |
| 103 |
In the offset range 05f9f310 - 05f9f3fD is the offset to the Exif tags. |
| 104 |
I can also find them at this offset (3 pieces). |
| 105 |
So I don't see any problem here? Can you please check this? |
| 106 |
A: The basis for ExifIFD is the EXIF specification, which contains clear |
| 107 |
instructions for TIFF files. There the tag type Long is specified. The tag |
| 108 |
330 (SubIFDs) is not comparable with tag 34665 (EXIF private directory), |
| 109 |
the former is used for multi-TiFFs. |
| 110 |
The current EXIF specification is 2.32 from 2019, it says under |
| 111 |
section 4.6.3 A: |
| 112 |
"Exif IFD is a set of tags for recording Exif-specific attribute |
| 113 |
information. It is pointed to by the offset from the TIFF header (Value |
| 114 |
Offset) indicated by an Exif private tag value. |
| 115 |
Exif IFD Pointer |
| 116 |
Tag = 34665 (8769.H) |
| 117 |
Type = LONG |
| 118 |
Count = 1 |
| 119 |
Default = None" |
| 120 |
|
| 121 |
Q: I got a "Unknown relocation type for got: 23" error if I compile checkit_tiff with tiny C compiler (tcc), why? |
| 122 |
A: You tried to statically link the program with glibc, which ist not supported by tcc. For a detailed explanation, |
| 123 |
check https://lists.gnu.org/archive/html/tinycc-devel/2020-06/msg00000.html |