Code Monkey home page Code Monkey logo

img4tool's People

Contributors

0x9fff00 avatar encounter avatar esresearchdepartment avatar fr3ns1s avatar malt3 avatar nikias avatar s0uthwest avatar stek29 avatar tihmstar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

img4tool's Issues

Problems with new manifests

iPhone 8, 8 plus and X models now have new buildidentities for AudioCodec and NFC firmwares. img4tool fails to find a digest for SE, UpdatePayload buildidentity. Verification for all new models will fail for this reason and shsh2 files are deemed invalid by img4tool.
Since iOS 11.2, iPhone 7 and 8 models have a single buildmanifest. img4tool reads the buildmanifest and finds the iPhone 8's SE, UpdatePayload key. This causes img4tool to mark iPhone 7's shsh2 files as invalid, although SE, UpdatePayload isn't actually present in builidentities for iPhone 7.
I think reading the buildidentities based on the input model will be nice.

Can't Compile img4tool

MacBookPro:~ User$ cd Downloads/img4tool-master/
MacBookPro:img4tool-master User$ ./autogen.sh
aclocal: warning: couldn't open directory 'm4': No such file or directory
fatal: Kein Git-Repository (oder irgendeines der Elternverzeichnisse): .git
configure.ac:8: error: AC_INIT should be called with package and version arguments
/usr/local/Cellar/automake/1.16.1_1/share/aclocal-1.16/init.m4:171: AM_INIT_AUTOMAKE is expanded from...
configure.ac:8: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
configure.ac:6: error: possibly undefined macro: AM_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:8: error: possibly undefined macro: AM_INIT_AUTOMAKE
configure.ac:10: error: possibly undefined macro: AC_CONFIG_MACRO_DIRS
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
configure.ac: error: no proper invocation of AM_INIT_AUTOMAKE was found.
configure.ac: You should verify that configure.ac invokes AM_INIT_AUTOMAKE,
configure.ac: that aclocal.m4 is present in the top-level directory,
configure.ac: and that aclocal.m4 was recently regenerated (using aclocal)
configure.ac:4: installing './config.guess'
configure.ac:4: installing './config.sub'
img4tool/Makefile.am:5: error: Libtool library used but 'LIBTOOL' is undefined
img4tool/Makefile.am:5: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
img4tool/Makefile.am:5: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
img4tool/Makefile.am:5: If 'LT_INIT' is in 'configure.ac', make sure
img4tool/Makefile.am:5: its definition is in aclocal's search path.
img4tool/Makefile.am: installing './depcomp'
/usr/local/Cellar/automake/1.16.1_1/share/automake-1.16/am/depend2.am: error: am__fastdepCC does not appear in AM_CONDITIONAL
/usr/local/Cellar/automake/1.16.1_1/share/automake-1.16/am/depend2.am: The usual way to define 'am__fastdepCC' is to add 'AC_PROG_CC'
/usr/local/Cellar/automake/1.16.1_1/share/automake-1.16/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again
/usr/local/Cellar/automake/1.16.1_1/share/automake-1.16/am/depend2.am: error: AMDEP does not appear in AM_CONDITIONAL
/usr/local/Cellar/automake/1.16.1_1/share/automake-1.16/am/depend2.am: The usual way to define 'AMDEP' is to add one of the compiler tests
/usr/local/Cellar/automake/1.16.1_1/share/automake-1.16/am/depend2.am: AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC, AC_PROG_OBJCXX,
/usr/local/Cellar/automake/1.16.1_1/share/automake-1.16/am/depend2.am: AM_PROG_AS, AM_PROG_GCJ, AM_PROG_UPC
/usr/local/Cellar/automake/1.16.1_1/share/automake-1.16/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again
/usr/local/Cellar/automake/1.16.1_1/share/automake-1.16/am/depend2.am: error: am__fastdepCXX does not appear in AM_CONDITIONAL
/usr/local/Cellar/automake/1.16.1_1/share/automake-1.16/am/depend2.am: The usual way to define 'am__fastdepCXX' is to add 'AC_PROG_CXX'
/usr/local/Cellar/automake/1.16.1_1/share/automake-1.16/am/depend2.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again
aclocal: warning: couldn't open directory 'm4': No such file or directory
fatal: Kein Git-Repository (oder irgendeines der Elternverzeichnisse): .git
configure.ac:8: error: AC_INIT should be called with package and version arguments
/usr/local/Cellar/automake/1.16.1_1/share/aclocal-1.16/init.m4:171: AM_INIT_AUTOMAKE is expanded from...
configure.ac:8: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1
autoreconf: aclocal failed with exit status: 1
configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."

Error when i verify an shsh

I have this error when i verify my shsh ( so also futurerestore doesn't work)
img4tool version: 0.197-aca6cf005c94caf135023263cbb5c61a0081804f
Compiled with plist: YES
[IMG4TOOL] checking buildidentity 0:
[IMG4TOOL] checking buildidentity matches board ... YES
[IMG4TOOL] checking buildidentity has all required hashes:
[IMG4TOOL] checking hash for "AOP" OK (untrusted)
[IMG4TOOL] checking hash for "Ap,SystemVolumeCanonicalMetadata"OK (found "msys" with matching hash)
[IMG4TOOL] checking hash for "AppleLogo" OK (found "logo" with matching hash)
[IMG4TOOL] checking hash for "AudioCodecFirmware" OK (untrusted)
[IMG4TOOL] checking hash for "BasebandFirmware" IGN (no digest in BuildManifest)
[IMG4TOOL] checking hash for "BatteryCharging0" OK (found "chg0" with matching hash)
[IMG4TOOL] checking hash for "BatteryCharging1" OK (found "chg1" with matching hash)
[IMG4TOOL] checking hash for "BatteryFull" OK (found "batF" with matching hash)
[IMG4TOOL] checking hash for "BatteryLow0" OK (found "bat0" with matching hash)
[IMG4TOOL] checking hash for "BatteryLow1" OK (found "bat1" with matching hash)
[IMG4TOOL] checking hash for "BatteryPlugin" OK (found "glyP" with matching hash)
[IMG4TOOL] checking hash for "DeviceTree" OK (found "dtre" with matching hash)
[IMG4TOOL] checking hash for "ISP" OK (found "ispf" with matching hash)
[IMG4TOOL] checking hash for "KernelCache" OK (found "krnl" with matching hash)
[IMG4TOOL] checking hash for "LLB" OK (found "illb" with matching hash)
[IMG4TOOL] checking hash for "Liquid" OK (found "liqd" with matching hash)
[IMG4TOOL] checking hash for "Multitouch" OK (untrusted)
[IMG4TOOL] checking hash for "OS" OK (found "rosi" with matching hash)
[IMG4TOOL] checking hash for "RecoveryMode" OK (found "recm" with matching hash)
[IMG4TOOL] checking hash for "RestoreDeviceTree" OK (found "rdtr" with matching hash)
[IMG4TOOL] checking hash for "RestoreKernelCache" OK (found "rkrn" with matching hash)
[IMG4TOOL] checking hash for "RestoreLogo" OK (found "rlgo" with matching hash)
[IMG4TOOL] checking hash for "RestoreRamDisk" OK (found "rdsk" with matching hash)
[IMG4TOOL] checking hash for "RestoreSEP" OK (found "rsep" with matching hash)
[IMG4TOOL] checking hash for "RestoreTrustCache" OK (found "rtsc" with matching hash)
[IMG4TOOL] checking hash for "SE,UpdatePayload" IGN (no digest in BuildManifest)
[IMG4TOOL] checking hash for "SEP" OK (found "sepi" with matching hash)
[IMG4TOOL] checking hash for "Savage,B0-Dev-Patch" IGN (hash not found in im4m, but ignoring since not explicitly enforced through "Trusted"="YES" tag)
[IMG4TOOL] checking hash for "Savage,B0-Dev-PatchVT" IGN (hash not found in im4m, but ignoring since not explicitly enforced through "Trusted"="YES" tag)
[IMG4TOOL] checking hash for "Savage,B0-Prod-Patch" IGN (hash not found in im4m, but ignoring since not explicitly enforced through "Trusted"="YES" tag)
[IMG4TOOL] checking hash for "Savage,B0-Prod-PatchVT" IGN (hash not found in im4m, but ignoring since not explicitly enforced through "Trusted"="YES" tag)
[IMG4TOOL] checking hash for "Savage,B2-Dev-Patch" IGN (hash not found in im4m, but ignoring since not explicitly enforced through "Trusted"="YES" tag)
[IMG4TOOL] checking hash for "Savage,B2-Dev-PatchVT" IGN (hash not found in im4m, but ignoring since not explicitly enforced through "Trusted"="YES" tag)
[IMG4TOOL] checking hash for "Savage,B2-Prod-Patch" IGN (hash not found in im4m, but ignoring since not explicitly enforced through "Trusted"="YES" tag)
[IMG4TOOL] checking hash for "Savage,B2-Prod-PatchVT" IGN (hash not found in im4m, but ignoring since not explicitly enforced through "Trusted"="YES" tag)
[IMG4TOOL] checking hash for "Savage,BA-Dev-Patch" IGN (hash not found in im4m, but ignoring since not explicitly enforced through "Trusted"="YES" tag)
[IMG4TOOL] checking hash for "Savage,BA-Prod-Patch" IGN (hash not found in im4m, but ignoring since not explicitly enforced through "Trusted"="YES" tag)
[IMG4TOOL] checking hash for "StaticTrustCache" OK (found "trst" with matching hash)
[IMG4TOOL] checking hash for "SystemVolume" OK (found "isys" with matching hash)
[IMG4TOOL] checking hash for "ftap" IGN (no digest in BuildManifest)
[IMG4TOOL] checking hash for "ftsp" IGN (no digest in BuildManifest)
[IMG4TOOL] checking hash for "iBEC" OK (found "ibec" with matching hash)
[IMG4TOOL] checking hash for "iBSS" OK (found "ibss" with matching hash)
[IMG4TOOL] checking hash for "iBoot" OK (found "ibot" with matching hash)
[IMG4TOOL] checking hash for "rfta" IGN (no digest in BuildManifest)
[IMG4TOOL] checking hash for "rfts" IGN (no digest in BuildManifest)
dyld: lazy symbol binding failed: Symbol not found: _EVP_MD_CTX_create
Referenced from: /usr/local/lib/libimg4tool.0.dylib
Expected in: flat namespace

dyld: Symbol not found: _EVP_MD_CTX_create
Referenced from: /usr/local/lib/libimg4tool.0.dylib
Expected in: flat namespace

zsh: abort img4tool -v BuildManifest3.plist -s 111.shsh2

img4tool has an exception when trying to extract keybag on some images

img4tool -a 17A577/iPhone_5.5_P3/Firmware/all_flash/iBoot.d21.RELEASE.im4p
img4tool version: 0.162-d514ce57f4a104aebe4ba8c20cd7c45f33cf3a68
IM4P: ---------
type: ibot
desc: iBoot-5540.0.117.3
size: 0x000fba90

KBAG
num: 1
e7cb1d847ae406db6bacbbe9a42c6d23
d972f1afd223f10133a787d8d3b6b74e8813c22401f4d0ee6e83c2771ba41c3e
num: 2
72156937d055431352fdf05da10b401c
2b830aeb615befde802e36fd106fd1de8fff0960e0caaee74d4d8c617de9621c

img4tool: failed with exception:
[exception]:
what=[printIM4P] unexpected element at SEQUENCE index 5
code=22937612
line=350
file=img4tool.cpp
commit count=26:
commit sha =4c96389db50eeb7411f6e4c62eb073ef401ca6bd:

The issue comes probably from the DER parsing:

iOS13 openssl asn1parse -inform der -in 17A577/iPhone_5.5_P3/Firmware/all_flash/iBoot.d21.RELEASE.im4p -dump -dlimit 30
0:d=0 hl=5 l=1030965 cons: SEQUENCE
5:d=1 hl=2 l= 4 prim: IA5STRING :IM4P
11:d=1 hl=2 l= 4 prim: IA5STRING :ibot
17:d=1 hl=2 l= 18 prim: IA5STRING :iBoot-5540.0.117.3
37:d=1 hl=5 l=1030800 prim: OCTET STRING
0000 - 12 cc 9d 3f 6a 8d 42 06-93 c2 3b e5 a7 d9 41 84 ...?j.B...;...A.
0010 - 5e 95 74 18 34 a5 dd eb-ed 22 4b 39 7e b5 ^.t.4...."K9~.
1030842:d=1 hl=2 l= 116 prim: OCTET STRING
0000 - 30 72 30 37 02 01 01 04-10 e7 cb 1d 84 7a e4 06 0r07.........z..
0010 - db 6b ac bb e9 a4 2c 6d-23 04 20 d9 72 f1 .k....,m#. .r.
1030960:d=1 hl=2 l= 8 cons: SEQUENCE
1030962:d=2 hl=2 l= 1 prim: INTEGER :01
1030965:d=2 hl=2 l= 3 prim: INTEGER :15DE00


when i tried to use the kbag that was printed here(kbag1) - i wasn't able to decrypt the iboot on iPhone7+

had the same issue in iPhone X 13.2.1 (17A861) - and there the decryption did work.
so not sure if the kbag is correct or not.

LLB.d11.RELEASE.im4p.zip

iBoot.d11.RELEASE.im4p.zip

Error at compile

img4tool.cpp: In function ‘void tihmstar::img4tool::printIMG4(const void*, size_t, bool, bool)’:
img4tool.cpp:312:30: ### error: ‘reverse’ is not a member of ‘std’
std::reverse(octetString.begin(), octetString.end());
^~~~~~~

libgeneral related error while compiling

I have checked out the required submodule and successfully ran the autogen.sh without any error.
but after i start to make it with command ''make'' or ''sudo make'', both gives be following error:

make all-recursive
make[1]: Entering directory '/home/mahin/img4tool'
Making all in img4tool
make[2]: Entering directory '/home/mahin/img4tool/img4tool'
Makefile:535: ../external/libgeneral/libgeneral/.deps/libimg4tool_la-exception.Plo: No such file or directory
make[2]: *** No rule to make target '../external/libgeneral/libgeneral/.deps/libimg4tool_la-exception.Plo'. Stop.
make[2]: Leaving directory '/home/mahin/img4tool/img4tool'
Makefile:478: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/mahin/img4tool'
Makefile:385: recipe for target 'all' failed
make: *** [all] Error 2

img4tool can't get KBAGs on Windows

failure on printing the KBAG on boot files:
when you execute img4tool -a iBoot.d10.RELEASE.im4p to get a KBAG, it ends in failure, same for sep too.

Note the image is of an older version but the latest version has the same problem

printkbagerror_img4tool

Can not compile img4 tool

After cloning and adding submodules in git, When I try to run autogen I get the following:

Ahmeds-MacBook-Air:img4tool ahmed$ cd img4tool/

Ahmeds-MacBook-Air:img4tool ahmed$ ./autogen.sh 

./autogen.sh: line 3: aclocal: command not found

./autogen.sh: line 4: autoconf: command not found

./autogen.sh: line 5: autoheader: command not found

./autogen.sh: line 6: automake: command not found

./autogen.sh: line 7: autoreconf: command not found

./autogen.sh: line 8: ./configure: No such file or directory```

the lattest commitment can not be built

Hi!

Until the last commitment I could build any img4tool version with autotools (basically autogen.sh, make, make isntall). However, when I try to build the latest version it comes up with the following error related to linked libraries (which seems to have something to do with the new lzss library):

gcc -I/path/include -I/path//include -g -O2 -std=c11 -o img4tool img4tool-img4tool.o img4tool-img4.o -L/path/lib -L/path/lib /path/lib/libplist.dylib -lcrypto
Undefined symbols for architecture x86_64:
"_tryLZSS", referenced from:
_extractFileFromIM4P in img4tool-img4.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [img4tool] Error 1

Thank you beforehand. I hope to hear from you soon.

By the way: I am using mac os sierra 10.12.6. Please ask if you need any further information.

Error at compile time!

Error at compile time!

make all-recursive
make[1]: Entering directory '/home/tersup/Downloads/img4tool'
Making all in img4tool
make[2]: Entering directory '/home/tersup/Downloads/img4tool/img4tool'
g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -I/usr/local/include -g -O2 -std=c++11 -MT img4tool-main.o -MD -MP -MF .deps/img4tool-main.Tpo -c -o img4tool-main.o test -f 'main.cpp' || echo './'main.cpp
main.cpp: In function ‘int main_r(int, const char**)’:
main.cpp:384:12: error: ‘reverse’ is not a member of ‘std’
384 | std::reverse(octetString.begin(), octetString.end());
| ^~~~~~~
make[2]: *** [Makefile:609: img4tool-main.o] Error 1
make[2]: Leaving directory '/home/tersup/Downloads/img4tool/img4tool'
make[1]: *** [Makefile:481: all-recursive] Error 1
make[1]: Leaving directory '/home/tersup/Downloads/img4tool'
make: *** [Makefile:388: all] Error 2

config.log

No rules for make and make install

Screen Shot 2019-11-23 at 4 15 40 PM

After running ./autogen.sh I try to make but it says that there's no rule to do so. Am I missing something in the Makefile.am file?

img4tool master ✗ 6h3m ◒ ➜ ls LICENSE autom4te.cache configure include Makefile.am compile configure.ac install-sh Makefile.in config.guess depcomp libimg4tool.pc.in README.md config.h.in img4 ltmain.sh aclocal.m4 config.log img4tool m4 autogen.sh config.sub img4tool.xcodeproj missing img4tool master ✗ 6h3m ◒ ➜ make make: *** No targets specified and no makefile found. Stop. img4tool master ✗ 6h3m ◒ ⍉ ➜ sudo make install Password: make: *** No rule to make target install'. Stop.`

fatal Error when issuing MAKE command

./autogen.sh commmand runs smoothly but when I run the MAKE command thisnisnthe only error i get:

Making all in img4tool
g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/Cellar/libplist/2.0.0_1/include -g -O2 -std=c++11 -MT img4tool-main.o -MD -MP -MF .deps/img4tool-main.Tpo -c -o img4tool-main.o test -f 'main.cpp' || echo './'main.cpp
main.cpp:16:10: fatal error: 'img4tool/libgeneral/macros.h' file not found
#include <img4tool/libgeneral/macros.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [img4tool-main.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Need a little assistance!

Compilation fails with many functions undeclared and with unknown type names.

Hey there tihmstar, i got some compilation issues that need a look-over:

When i attempt to compile with gcc, i get multiple errors like this:
main.cpp:330:33: error: 'getIM4PFromIMG4' was not declared in this scope 330 | auto im4p = getIM4PFromIMG4(file); | ^~~~~~~~~~~~~~~

and with clang:
In file included from main.cpp:18: ./img4tool.hpp:1:1: error: cannot use dot operator on a type ../include/img4tool/img4tool.hpp ^ main.cpp:25:27: error: expected namespace name using namespace tihmstar::img4tool; ~~~~~~~~~~^
main.cpp:353:35: error: use of undeclared identifier 'getEmptyIM4PContainer' ASN1DERElement im4p = getEmptyIM4PContainer(im4pType, im4pDesc); ^
main.cpp:398:21: error: unknown type name 'ASN1DERElement' ASN1DERElement bncn = getBNCNFromIM4R(im4r); ^

i did attempt trying to use #define _GNU_SOURCE but no luck.

Here is my Setup:
Host: Windows 7 (x86_64)
Target: Windows (x86_64-w64-mingw32)
Toolchain: MSYS2
Compiler(s): GNU Compiler Collection 10.2.0, Clang 10.0.1.

parameters passed to autogen:
./autogen.sh --host=x86_64-w64-mingw32 --enable-static --disable-shared --prefix=/usr/local

parameters passed to make:
make LDFLAGS="-Wl,--allow-multiple-definition,-static,-lpthread"
spoiler alert, i also tried just running "make" with the same result.

Full console logs: GCC: make-error_20200925-0720.txt, Clang: make-error_20200925-0730.txt

img4tool doesn't properly handle the kernel when converting back to im4p from raw

img4tool version: 0.162-d514ce57f4a104aebe4ba8c20cd7c45f33cf3a68

I run these two im4tool commands.
~/Downloads/img4tool -c kern.im4p -t rkrn -d KernelCacheBuilder-1469.260.15 kern.patched
~/Downloads/img4tool -c kern.img4 -s blob.shsh2 -p kern.im4p
And then boot the kern img4.
(Yes it boots fine for a compressed kernel)
(I have a DEVELOPMENT iBEC so it prints the error)

iRecovery> bootx
USB command: "bootx"
Attempting to validate kernelcache @ 0x800000000
Unable to validate kernelcache payload
error booting kernelcache -4
iRecovery>

In theory it should work but it doesn't. I'm not entirely sure what's causing this. The iBEC does have uncompressed kernel support. It fails on the validating macho probably. But it should be valid since 0x0 of kern.patched = bswap(0xFEEDFACF).

How does it work? Can't build

Hi, I'm a complete noob in MacOS and xcode. Building using xcode is not working because it cannot find img4tool.hpp in main.cpp. Building it in the folder using ./autogen.sh gives me this:
Anthonys-iMac:img4tool anthony$ ./autogen.sh
./autogen.sh: line 3: aclocal: command not found
./autogen.sh: line 4: autoconf: command not found
./autogen.sh: line 5: autoheader: command not found
./autogen.sh: line 6: automake: command not found
./autogen.sh: line 7: autoreconf: command not found
./autogen.sh: line 8: ./configure: No such file or directory
Anthonys-iMac:img4tool anthony$
and even using a premade binary gives me this error:
Anthonys-iMac:Desktop anthony$ ./img4tool
dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
Referenced from: /Users/anthony/Desktop/./img4tool
Reason: image not found
Abort trap: 6
Anthonys-iMac:Desktop anthony$
As I said I am really noob and don't know what I'm doing wrong here. I have a Hackintosh with MacOS Mojave 10.14.6 installed.

Error when compile img4tool

Hi guys, please help me out. I'm trying to compile img4tool. I don't know how to install it dependences, so when I make I have error, please check it out

make all-recursive
make[1]: Entering directory '/home/admin1/Downloads/img4tool-master'
Making all in img4tool
make[2]: Entering directory '/home/admin1/Downloads/img4tool-master/img4tool'
gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -g -O2 -std=c11 -D IMG4TOOL_VERSION_COMMIT_COUNT="" -D IMG4TOOL_VERSION_COMMIT_SHA="" -MT img4tool-img4tool.o -MD -MP -MF .deps/img4tool-img4tool.Tpo -c -o img4tool-img4tool.o test -f 'img4tool.c' || echo './'img4tool.c
img4tool.c: In function ‘im4mFormShshFile’:
img4tool.c:41:5: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(buf, fSize, 1, f);
^
img4tool.c: In function ‘readFromFile’:
img4tool.c:78:14: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
if (ret) fread(ret, size, 1, f);
^
img4tool.c: In function ‘readPlistFromFile’:
img4tool.c:95:5: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(buf, size, 1, f);
^
img4tool.c: In function ‘main’:
img4tool.c:362:18: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
if (buf) fread(buf, size, 1, f);
^
img4tool.c:406:18: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
if (buf) fread(buf, size, 1, im4m);
^
mv -f .deps/img4tool-img4tool.Tpo .deps/img4tool-img4tool.Po
gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -g -O2 -std=c11 -D IMG4TOOL_VERSION_COMMIT_COUNT="" -D IMG4TOOL_VERSION_COMMIT_SHA="" -MT img4tool-img4.o -MD -MP -MF .deps/img4tool-img4.Tpo -c -o img4tool-img4.o test -f 'img4.c' || echo './'img4.c
img4.c: In function ‘asn1ElementAtIndexWithCounter’:
img4.c:93:2: warning: #warning TODO add lenght and range checks [-Wcpp]
#warning TODO add lenght and range checks
^
img4.c: In function ‘asn1PrintValue’:
img4.c:752:43: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=]
if (sizeof(uint64_t) == 8) printf("%llu",pnum);
^
img4.c: At top level:
img4.c:1012:97: warning: anonymous struct declared inside parameter list
_cb(char elemNameStr[4], char *dgstData, size_t dgstDataLen, struct {plist_t rt
^
img4.c:1012:97: warning: its scope is only this definition or declaration, which is probably not what you want
img4.c: In function ‘verifyIMG4’:
img4.c:1254:2: warning: #warning TODO verify certificate chain [-Wcpp]
#warning TODO verify certificate chain
^
mv -f .deps/img4tool-img4.Tpo .deps/img4tool-img4.Po
gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -g -O2 -std=c11 -D IMG4TOOL_VERSION_COMMIT_COUNT="" -D IMG4TOOL_VERSION_COMMIT_SHA="" -MT img4tool-lzssdec.o -MD -MP -MF .deps/img4tool-lzssdec.Tpo -c -o img4tool-lzssdec.o test -f 'lzssdec.c' || echo './'lzssdec.c
lzssdec.c:35:21: error: unknown type name ‘u_int8_t’
int decompress_lzss(u_int8_t *dst, u_int8_t *src, u_int32_t srclen){
^
lzssdec.c:35:36: error: unknown type name ‘u_int8_t’
int decompress_lzss(u_int8_t *dst, u_int8_t *src, u_int32_t srclen){
^
lzssdec.c:35:51: error: unknown type name ‘u_int32_t’
int decompress_lzss(u_int8_t *dst, u_int8_t *src, u_int32_t srclen){
^
lzssdec.c: In function ‘tryLZSS’:
lzssdec.c:89:28: warning: implicit declaration of function ‘ntohl’ [-Wimplicit-function-declaration]
char decomp = malloc (ntohl(compHeader->uncompressedSize));
^
lzssdec.c:91:18: warning: implicit declaration of function ‘memmem’ [-Wimplicit-function-declaration]
char feed = memmem(compressed+64, 1024, sig, sizeof(sig));
^
lzssdec.c:91:18: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
lzssdec.c:97:14: warning: implicit declaration of function ‘decompress_lzss’ [-Wimplicit-function-declaration]
int rc = decompress_lzss((void
)decomp, (void
)feed, ntohl(compHeader->comp
^
Makefile:517: recipe for target 'img4tool-lzssdec.o' failed
make[2]: *** [img4tool-lzssdec.o] Error 1
make[2]: Leaving directory '/home/admin1/Downloads/img4tool-master/img4tool'
Makefile:397: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/admin1/Downloads/img4tool-master'
Makefile:329: recipe for target 'all' failed
make: *** [all] Error 2

This is the part when I use ./autogen.sh

libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
libtoolize: You should add the contents of the following files to 'aclocal.m4':
libtoolize: '/usr/share/aclocal/libtool.m4'
libtoolize: '/usr/share/aclocal/ltoptions.m4'
libtoolize: '/usr/share/aclocal/ltsugar.m4'
libtoolize: '/usr/share/aclocal/ltversion.m4'
libtoolize: '/usr/share/aclocal/lt~obsolete.m4'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
aclocal: warning: couldn't open directory 'm4': No such file or directory
configure.ac:10: installing './compile'
configure.ac:11: installing './config.guess'
configure.ac:11: installing './config.sub'
configure.ac:3: installing './install-sh'
configure.ac:3: installing './missing'
img4tool/Makefile.am: installing './depcomp'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libcrypto... yes
checking for compression_decode_buffer in -lcompression... no
checking for lzfse_decode_buffer in -llzfse... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for size_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for error_at_line... yes
checking for memmove... yes
checking for memset... yes
checking for libplist... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating img4tool/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Thanks for reading and sorry for bad english. I'm new to linux btw.

mg4tool: error while loading shared libraries: libimg4tool.so.0: cannot open shared object file: No such file or directory

im getting the error. My whole log:

anwender@Astaghfirullah:~/Downloads/img4tool/img4tool$ sudo ./autogen.sh
configure.ac:4: warning: The macro `AC_CANONICAL_SYSTEM' is obsolete.
configure.ac:4: You should run autoupdate.
./lib/autoconf/general.m4:2081: AC_CANONICAL_SYSTEM is expanded from...
configure.ac:4: the top level
configure.ac:6: warning: The macro `AM_PROG_LIBTOOL' is obsolete.
configure.ac:6: You should run autoupdate.
m4/libtool.m4:100: AM_PROG_LIBTOOL is expanded from...
configure.ac:6: the top level
configure.ac:4: warning: The macro `AC_CANONICAL_SYSTEM' is obsolete.
configure.ac:4: You should run autoupdate.
./lib/autoconf/general.m4:2081: AC_CANONICAL_SYSTEM is expanded from...
configure.ac:4: the top level
configure.ac:6: warning: The macro `AM_PROG_LIBTOOL' is obsolete.
configure.ac:6: You should run autoupdate.
m4/libtool.m4:100: AM_PROG_LIBTOOL is expanded from...
configure.ac:6: the top level
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... no
checking for mawk... mawk
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking dependency style of g++... gcc3
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking whether we need platform-specific build settings... checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for openssl >= 0.9.8... yes
checking for libplist-2.0 >= 2.3.0... yes
checking for libgeneral >= 39... yes
checking for arpa/inet.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for winsock.h... no
checking for compression_decode_buffer in -lcompression... no
checking for lzfse_decode_buffer in -llzfse... yes
checking for _Bool... yes
checking for stdbool.h that conforms to C99... yes
checking for size_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for memmem... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating libimg4tool.pc
config.status: creating include/img4tool/img4tool.hpp
config.status: creating img4tool/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing libtool commands
config.status: executing depfiles commands

Configuration for img4tool-199:
-------------------------------------------

  install prefix ..........: /usr/local
  with plist ..............: yes
  with bvx2 ...............: yes
  crypto backend ..........: openssl
  compiler ................: gcc

  Now type 'make' to build img4tool-199,
  and then 'make install' for installation.

anwender@Astaghfirullah:~/Downloads/img4tool/img4tool$ sudo make
make  all-recursive
make[1]: Entering directory '/home/anwender/Downloads/img4tool/img4tool'
Making all in img4tool
make[2]: Entering directory '/home/anwender/Downloads/img4tool/img4tool/img4tool'
g++ -DHAVE_CONFIG_H -I. -I..    -I../include/img4tool -I../include -I../include/img4tool -I../include  -I/usr/local/include  -I/usr/local/include  -g -O2 -std=c++11 -MT img4tool-main.o -MD -MP -MF .deps/img4tool-main.Tpo -c -o img4tool-main.o `test -f 'main.cpp' || echo './'`main.cpp
main.cpp: In function ‘char* readFromFile(const char*, size_t*)’:
main.cpp:74:19: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   74 |     if (ret) fread(ret, size, 1, f);
      |              ~~~~~^~~~~~~~~~~~~~~~~
mv -f .deps/img4tool-main.Tpo .deps/img4tool-main.Po
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..    -I../include/img4tool -I../include -I../include/img4tool -I../include  -I/usr/local/include  -I/usr/local/include  -g -O2 -std=c++11 -MT libimg4tool_la-img4tool.lo -MD -MP -MF .deps/libimg4tool_la-img4tool.Tpo -c -o libimg4tool_la-img4tool.lo `test -f 'img4tool.cpp' || echo './'`img4tool.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I../include/img4tool -I../include -I../include/img4tool -I../include -I/usr/local/include -I/usr/local/include -g -O2 -std=c++11 -MT libimg4tool_la-img4tool.lo -MD -MP -MF .deps/libimg4tool_la-img4tool.Tpo -c img4tool.cpp  -fPIC -DPIC -o .libs/libimg4tool_la-img4tool.o
img4tool.cpp:40:2: warning: #warning TODO adjust this for HAVE_COMMCRYPTO [-Wcpp]
   40 | #warning TODO adjust this for HAVE_COMMCRYPTO
      |  ^~~~~~~
img4tool.cpp:603:58: warning: multi-character character constant [-Wmultichar]
  603 | RElement bnch = genPrivTagForNumberWithPayload('BNCN',bnch_seq);
      |                                                ^~~~~~

img4tool.cpp:621:28: warning: multi-character character constant [-Wmultichar]
  621 |             if (privTag == 'bnch'){
      |                            ^~~~~~
img4tool.cpp:1003:22: warning: multi-character character constant [-Wmultichar]
 1003 |                 case 'TSGD': //DGST
      |                      ^~~~~~
img4tool.cpp:1031:51: warning: multi-character character constant [-Wmultichar]
 1031 |         ASN1DERElement bnch = getValFromIM4M(im4m,'BNCH');
      |                                                   ^~~~~~
img4tool.cpp:1426:22: warning: multi-character character constant [-Wmultichar]
 1426 |                 case 'DROB': //BORD
      |                      ^~~~~~
img4tool.cpp:1430:22: warning: multi-character character constant [-Wmultichar]
 1430 |                 case 'PIHC': //CHIP
      |                      ^~~~~~
img4tool.cpp:1434:22: warning: multi-character character constant [-Wmultichar]
 1434 |                 case 'MODS': //SDOM
      |                      ^~~~~~
img4tool.cpp:1546:30: warning: multi-character character constant [-Wmultichar]
 1546 |                         case 'TSGD': //DGST
      |                              ^~~~~~
img4tool.cpp: In function ‘void tihmstar::img4tool::printKBAG(const void*, size_t)’:
img4tool.cpp:99:37: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
   99 |                     printf("num: %llu\n",elem.getIntegerValue());
      |                                  ~~~^    ~~~~~~~~~~~~~~~~~~~~~~
      |                                     |                        |
      |                                     long long unsigned int   uint64_t {aka long unsigned int}
      |                                  %lu
img4tool.cpp: In function ‘void tihmstar::img4tool::printIMG4(const void*, size_t, bool, bool)’:
img4tool.cpp:354:42: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
  354 |                     printf("size: 0x%08llx\n",(uint64_t)sequence.size());
      |                                     ~~~~~^    ~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                          |    |
      |                                          |    uint64_t {aka long unsigned int}
      |                                          long long unsigned int
      |                                     %08lx
img4tool.cpp: In function ‘void tihmstar::img4tool::printIM4P(const void*, size_t)’:
img4tool.cpp:463:63: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
  463 |              printf("Uncompressed size: 0x%08llx\n",sizeTag.getIntegerValue());
      |                                           ~~~~~^    ~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                |                           |
      |                                                long long unsigned int      uint64_t {aka long unsigned int}
      |                                           %08lx
img4tool.cpp: In function ‘void tihmstar::img4tool::printIM4M(const void*, size_t, bool)’:
img4tool.cpp:495:41: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Wformat=]
  495 |                     printf("Version: %llu\n",tag.getIntegerValue());
      |                                      ~~~^    ~~~~~~~~~~~~~~~~~~~~~
      |                                         |                       |
      |                                         long long unsigned int  uint64_t {aka long unsigned int}
      |                                      %lu
In file included from img4tool.cpp:15:
img4tool.cpp: In function ‘tihmstar::img4tool::ASN1DERElement tihmstar::img4tool::decryptPayload(const tihmstar::img4tool::ASN1DERElement&, const char*, const char*)’:
img4tool.cpp:953:35: warning: ‘int AES_set_decrypt_key(const unsigned char*, int, AES_KEY*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  953 |     retassure(!AES_set_decrypt_key(key, sizeof(key)*8, &decKey), "Failed to set decryption key");
      |                ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from img4tool.cpp:37:
/usr/include/openssl/aes.h:54:5: note: declared here
   54 | int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
      |     ^~~~~~~~~~~~~~~~~~~
img4tool.cpp:954:20: warning: ‘void AES_cbc_encrypt(const unsigned char*, unsigned char*, size_t, const AES_KEY*, unsigned char*, int)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  954 |     AES_cbc_encrypt((const unsigned char*)decPayload.payload(), (unsigned char*)decPayload.payload(), decPayload.payloadSize(), &decKey, iv, AES_DECRYPT);
      |     ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from img4tool.cpp:37:
/usr/include/openssl/aes.h:66:6: note: declared here
   66 | void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
      |      ^~~~~~~~~~~~~~~
img4tool.cpp: In function ‘bool tihmstar::img4tool::isGeneratorValidForIM4M(const tihmstar::img4tool::ASN1DERElement&, std::string)’:
img4tool.cpp:1034:43: warning: format ‘%llx’ expects argument of type ‘long long unsigned int*’, but argument 3 has type ‘uint64_t*’ {aka ‘long unsigned int*’} [-Wformat=]
 1034 |         sscanf(generator.c_str(), "0x%16llx", &gen);
      |                                      ~~~~~^   ~~~~
      |                                           |   |
      |                                           |   uint64_t* {aka long unsigned int*}
      |                                           long long unsigned int*
      |                                      %16lx
img4tool.cpp: In function ‘bool tihmstar::img4tool::doesIM4MBoardMatchBuildIdentity(const tihmstar::img4tool::ASN1DERElement&, plist_t)’:
img4tool.cpp:1444:39: warning: format ‘%llx’ expects argument of type ‘long long unsigned int*’, but argument 3 has type ‘uint64_t*’ {aka ‘long unsigned int*’} [-Wformat=]
 1444 |                 sscanf(pstrval, "0x%llx",&val);
      |                                    ~~~^  ~~~~
      |                                       |  |
      |                                       |  uint64_t* {aka long unsigned int*}
      |                                       long long unsigned int*
      |                                    %lx
img4tool.cpp:1446:37: warning: format ‘%lld’ expects argument of type ‘long long int*’, but argument 3 has type ‘uint64_t*’ {aka ‘long unsigned int*’} [-Wformat=]
 1446 |                 sscanf(pstrval, "%lld",&val);
      |                                  ~~~^  ~~~~
      |                                     |  |
      |                                     |  uint64_t* {aka long unsigned int*}
      |                                     long long int*
      |                                  %ld
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I../include/img4tool -I../include -I../include/img4tool -I../include -I/usr/local/include -I/usr/local/include -g -O2 -std=c++11 -MT libimg4tool_la-img4tool.lo -MD -MP -MF .deps/libimg4tool_la-img4tool.Tpo -c img4tool.cpp -o libimg4tool_la-img4tool.o >/dev/null 2>&1
mv -f .deps/libimg4tool_la-img4tool.Tpo .deps/libimg4tool_la-img4tool.Plo
/bin/bash ../libtool  --tag=CXX   --mode=link g++ -I../include/img4tool -I../include -I../include/img4tool -I../include  -I/usr/local/include  -I/usr/local/include  -g -O2 -std=c++11 -L/usr/local/lib -lplist-2.0 -lssl -lcrypto -L/usr/local/lib -lgeneral -no-undefined -lpthread  -o libimg4tool.la -rpath /usr/local/lib libimg4tool_la-ASN1DERElement.lo libimg4tool_la-lzssdec.lo libimg4tool_la-img4tool.lo  -llzfse 
libtool: link: rm -fr  .libs/libimg4tool.a .libs/libimg4tool.la .libs/libimg4tool.lai .libs/libimg4tool.so .libs/libimg4tool.so.0 .libs/libimg4tool.so.0.0.0
libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/11/crtbeginS.o  .libs/libimg4tool_la-ASN1DERElement.o .libs/libimg4tool_la-lzssdec.o .libs/libimg4tool_la-img4tool.o   -L/usr/local/lib /usr/local/lib/libplist-2.0.so -lssl -lcrypto /usr/local/lib/libgeneral.so -lpthread -llzfse -L/usr/lib/gcc/x86_64-linux-gnu/11 -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/11/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/11/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/crtn.o  -g -O2   -pthread -Wl,-soname -Wl,libimg4tool.so.0 -o .libs/libimg4tool.so.0.0.0
libtool: link: (cd ".libs" && rm -f "libimg4tool.so.0" && ln -s "libimg4tool.so.0.0.0" "libimg4tool.so.0")
libtool: link: (cd ".libs" && rm -f "libimg4tool.so" && ln -s "libimg4tool.so.0.0.0" "libimg4tool.so")
libtool: link: ar cr .libs/libimg4tool.a  libimg4tool_la-ASN1DERElement.o libimg4tool_la-lzssdec.o libimg4tool_la-img4tool.o
libtool: link: ranlib .libs/libimg4tool.a
libtool: link: ( cd ".libs" && rm -f "libimg4tool.la" && ln -s "../libimg4tool.la" "libimg4tool.la" )
/bin/bash ../libtool  --tag=CXX   --mode=link g++ -I../include/img4tool -I../include -I../include/img4tool -I../include  -I/usr/local/include  -I/usr/local/include  -g -O2 -std=c++11 -L/usr/local/lib -lplist-2.0 -lssl -lcrypto -L/usr/local/lib -lgeneral -no-undefined -lpthread  -o img4tool img4tool-main.o libimg4tool.la -llzfse 
libtool: link: g++ -I../include/img4tool -I../include -I../include/img4tool -I../include -I/usr/local/include -I/usr/local/include -g -O2 -std=c++11 -o .libs/img4tool img4tool-main.o  -L/usr/local/lib /usr/local/lib/libplist-2.0.so -lssl -lcrypto /usr/local/lib/libgeneral.so -lpthread ./.libs/libimg4tool.so -llzfse -pthread
make[2]: Leaving directory '/home/anwender/Downloads/img4tool/img4tool/img4tool'
Making all in include
make[2]: Entering directory '/home/anwender/Downloads/img4tool/img4tool/include'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/anwender/Downloads/img4tool/img4tool/include'
make[2]: Entering directory '/home/anwender/Downloads/img4tool/img4tool'
make[2]: Leaving directory '/home/anwender/Downloads/img4tool/img4tool'
make[1]: Leaving directory '/home/anwender/Downloads/img4tool/img4tool'
anwender@Astaghfirullah:~/Downloads/img4tool/img4tool$ sudo make install
Making install in img4tool
make[1]: Entering directory '/home/anwender/Downloads/img4tool/img4tool/img4tool'
make[2]: Entering directory '/home/anwender/Downloads/img4tool/img4tool/img4tool'
 /usr/bin/mkdir -p '/usr/local/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libimg4tool.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libimg4tool.so.0.0.0 /usr/local/lib/libimg4tool.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libimg4tool.so.0.0.0 libimg4tool.so.0 || { rm -f libimg4tool.so.0 && ln -s libimg4tool.so.0.0.0 libimg4tool.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libimg4tool.so.0.0.0 libimg4tool.so || { rm -f libimg4tool.so && ln -s libimg4tool.so.0.0.0 libimg4tool.so; }; })
libtool: install: /usr/bin/install -c .libs/libimg4tool.lai /usr/local/lib/libimg4tool.la
libtool: install: /usr/bin/install -c .libs/libimg4tool.a /usr/local/lib/libimg4tool.a
libtool: install: chmod 644 /usr/local/lib/libimg4tool.a
libtool: install: ranlib /usr/local/lib/libimg4tool.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /usr/bin/mkdir -p '/usr/local/bin'
  /bin/bash ../libtool   --mode=install /usr/bin/install -c img4tool '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/img4tool /usr/local/bin/img4tool
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/anwender/Downloads/img4tool/img4tool/img4tool'
make[1]: Leaving directory '/home/anwender/Downloads/img4tool/img4tool/img4tool'
Making install in include
make[1]: Entering directory '/home/anwender/Downloads/img4tool/img4tool/include'
make[2]: Entering directory '/home/anwender/Downloads/img4tool/img4tool/include'
make[2]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/usr/local/include'
 /usr/bin/mkdir -p '/usr/local/include/img4tool'
 /usr/bin/install -c -m 644  img4tool/img4tool.hpp img4tool/ASN1DERElement.hpp '/usr/local/include/img4tool'
make[2]: Leaving directory '/home/anwender/Downloads/img4tool/img4tool/include'
make[1]: Leaving directory '/home/anwender/Downloads/img4tool/img4tool/include'
make[1]: Entering directory '/home/anwender/Downloads/img4tool/img4tool'
make[2]: Entering directory '/home/anwender/Downloads/img4tool/img4tool'
make[2]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 libimg4tool.pc '/usr/local/lib/pkgconfig'
make[2]: Leaving directory '/home/anwender/Downloads/img4tool/img4tool'
make[1]: Leaving directory '/home/anwender/Downloads/img4tool/img4tool'
anwender@Astaghfirullah:~/Downloads/img4tool/img4tool$ cd ..
anwender@Astaghfirullah:~/Downloads/img4tool$ img4tool
img4tool: error while loading shared libraries: libimg4tool.so.0: cannot open shared object file: No such file or directory
anwender@Astaghfirullah:~/Downloads/img4tool$ 

--convert unavailable, libplist is installed but img4tool not compiling with plist

Any ideas on how to fix this? After ./autogen.sh img4tool recognizes plist, but make compiles without it.

andrew@andrew-MacBookPro:~$ git clone https://github.com/tihmstar/img4tool

Cloning into 'img4tool'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 1005 (delta 0), reused 1 (delta 0), pack-reused 1002
Receiving objects: 100% (1005/1005), 259.30 KiB | 1.71 MiB/s, done.
Resolving deltas: 100% (555/555), done.

andrew@andrew-MacBookPro:~$ cd img4tool/

andrew@andrew-MacBookPro:~/img4tool$ ./autogen.sh

aclocal: warning: couldn't open directory 'm4': No such file or directory
configure.ac:6: installing './compile'
configure.ac:4: installing './config.guess'
configure.ac:4: installing './config.sub'
configure.ac:8: installing './install-sh'
configure.ac:6: error: required file './ltmain.sh' not found
configure.ac:8: installing './missing'
img4tool/Makefile.am: installing './depcomp'
aclocal: warning: couldn't open directory 'm4': No such file or directory
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /home/linuxbrew/.linuxbrew/bin/ld
checking if the linker (/home/linuxbrew/.linuxbrew/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /home/linuxbrew/.linuxbrew/bin/nm -B
checking the name lister (/home/linuxbrew/.linuxbrew/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /home/linuxbrew/.linuxbrew/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... no
checking for mawk... mawk
checking command to parse /home/linuxbrew/.linuxbrew/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64
checking if the linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking dependency style of g++... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking whether we need platform-specific build settings... checking for pkg-config... /home/linuxbrew/.linuxbrew/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for openssl >= 0.9.8... yes
checking for libplist-2.0 >= 2.2.0... yes
checking for libgeneral >= 32... no
configure: error: Package requirements (libgeneral >= 32) were not met:

No package 'libgeneral' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables libgeneral_CFLAGS
and libgeneral_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

andrew@andrew-MacBookPro:~/img4tool$ export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"

andrew@andrew-MacBookPro:~/img4tool$ ./autogen.sh

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /home/linuxbrew/.linuxbrew/bin/ld
checking if the linker (/home/linuxbrew/.linuxbrew/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /home/linuxbrew/.linuxbrew/bin/nm -B
checking the name lister (/home/linuxbrew/.linuxbrew/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /home/linuxbrew/.linuxbrew/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... no
checking for mawk... mawk
checking command to parse /home/linuxbrew/.linuxbrew/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64
checking if the linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking dependency style of g++... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking whether we need platform-specific build settings... checking for pkg-config... /home/linuxbrew/.linuxbrew/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for openssl >= 0.9.8... yes
checking for libplist-2.0 >= 2.2.0... yes
checking for libgeneral >= 32... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for compression_decode_buffer in -lcompression... no
checking for lzfse_decode_buffer in -llzfse... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for size_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for memmem... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating libimg4tool.pc
config.status: creating include/img4tool/img4tool.hpp
config.status: creating img4tool/Makefile
config.status: creating config.h
config.status: executing libtool commands
config.status: executing depfiles commands

Configuration for img4tool-193:
-------------------------------------------

  install prefix ..........: /usr/local
  have plist ..............: yes
  crypto backend ..........: openssl
  compiler ................: gcc

  Now type 'make' to build img4tool-193,
  and then 'make install' for installation.

andrew@andrew-MacBookPro:~/img4tool$ make

(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/andrew/img4tool/missing autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/bash ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make  all-recursive
make[1]: Entering directory '/home/andrew/img4tool'
Making all in img4tool
make[2]: Entering directory '/home/andrew/img4tool/img4tool'
g++ -DHAVE_CONFIG_H -I. -I..    -I../include -I../include/img4tool  -I/usr/local/include -I/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/include -I/usr/local/include  -g -O2 -std=c++11 -MT img4tool-main.o -MD -MP -MF .deps/img4tool-main.Tpo -c -o img4tool-main.o `test -f 'main.cpp' || echo './'`main.cpp
mv -f .deps/img4tool-main.Tpo .deps/img4tool-main.Po
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..    -I../include -I../include/img4tool  -I/usr/local/include -I/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/include -I/usr/local/include  -g -O2 -std=c++11 -MT libimg4tool_la-ASN1DERElement.lo -MD -MP -MF .deps/libimg4tool_la-ASN1DERElement.Tpo -c -o libimg4tool_la-ASN1DERElement.lo `test -f 'ASN1DERElement.cpp' || echo './'`ASN1DERElement.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -I/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/include -I/usr/local/include -g -O2 -std=c++11 -MT libimg4tool_la-ASN1DERElement.lo -MD -MP -MF .deps/libimg4tool_la-ASN1DERElement.Tpo -c ASN1DERElement.cpp  -fPIC -DPIC -o .libs/libimg4tool_la-ASN1DERElement.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -I/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/include -I/usr/local/include -g -O2 -std=c++11 -MT libimg4tool_la-ASN1DERElement.lo -MD -MP -MF .deps/libimg4tool_la-ASN1DERElement.Tpo -c ASN1DERElement.cpp -o libimg4tool_la-ASN1DERElement.o >/dev/null 2>&1
mv -f .deps/libimg4tool_la-ASN1DERElement.Tpo .deps/libimg4tool_la-ASN1DERElement.Plo
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -I../include -I../include/img4tool  -I/usr/local/include -I/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/include -I/usr/local/include -g -O2 -std=c11 -MT libimg4tool_la-lzssdec.lo -MD -MP -MF .deps/libimg4tool_la-lzssdec.Tpo -c -o libimg4tool_la-lzssdec.lo `test -f 'lzssdec.c' || echo './'`lzssdec.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -I/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/include -I/usr/local/include -g -O2 -std=c11 -MT libimg4tool_la-lzssdec.lo -MD -MP -MF .deps/libimg4tool_la-lzssdec.Tpo -c lzssdec.c  -fPIC -DPIC -o .libs/libimg4tool_la-lzssdec.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -I/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/include -I/usr/local/include -g -O2 -std=c11 -MT libimg4tool_la-lzssdec.lo -MD -MP -MF .deps/libimg4tool_la-lzssdec.Tpo -c lzssdec.c -o libimg4tool_la-lzssdec.o >/dev/null 2>&1
mv -f .deps/libimg4tool_la-lzssdec.Tpo .deps/libimg4tool_la-lzssdec.Plo
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..    -I../include -I../include/img4tool  -I/usr/local/include -I/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/include -I/usr/local/include  -g -O2 -std=c++11 -MT libimg4tool_la-img4tool.lo -MD -MP -MF .deps/libimg4tool_la-img4tool.Tpo -c -o libimg4tool_la-img4tool.lo `test -f 'img4tool.cpp' || echo './'`img4tool.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -I/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/include -I/usr/local/include -g -O2 -std=c++11 -MT libimg4tool_la-img4tool.lo -MD -MP -MF .deps/libimg4tool_la-img4tool.Tpo -c img4tool.cpp  -fPIC -DPIC -o .libs/libimg4tool_la-img4tool.o
img4tool.cpp:37:2: warning: #warning TODO adjust this for HAVE_COMMCRYPTO [-Wcpp]
 #warning TODO adjust this for HAVE_COMMCRYPTO
  ^
img4tool.cpp:777:22: warning: multi-character character constant [-Wmultichar]
                 case 'TSGD': //DGST
                      ^
img4tool.cpp:805:51: warning: multi-character character constant [-Wmultichar]
         ASN1DERElement bnch = getValFromIM4M(im4m,'BNCH');
                                                   ^
img4tool.cpp:1003:40: warning: multi-character character constant [-Wmultichar]
         assure(ptagVal == htonl('BNCN'));
                                        ^
img4tool.cpp:1004:77: warning: multi-character character constant [-Wmultichar]
         assure(*(uint32_t*)ptag[0].getStringValue().c_str() == htonl('BNCN'));
                                                                             ^
img4tool.cpp:1123:22: warning: multi-character character constant [-Wmultichar]
                 case 'DROB': //BORD
                      ^
img4tool.cpp:1127:22: warning: multi-character character constant [-Wmultichar]
                 case 'PIHC': //CHIP
                      ^
img4tool.cpp:1131:22: warning: multi-character character constant [-Wmultichar]
                 case 'MODS': //SDOM
                      ^
img4tool.cpp:1243:30: warning: multi-character character constant [-Wmultichar]
                         case 'TSGD': //DGST
                              ^
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -I/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/include -I/usr/local/include -g -O2 -std=c++11 -MT libimg4tool_la-img4tool.lo -MD -MP -MF .deps/libimg4tool_la-img4tool.Tpo -c img4tool.cpp -o libimg4tool_la-img4tool.o >/dev/null 2>&1
mv -f .deps/libimg4tool_la-img4tool.Tpo .deps/libimg4tool_la-img4tool.Plo
/bin/bash ../libtool  --tag=CXX   --mode=link g++ -I../include -I../include/img4tool  -I/usr/local/include -I/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/include -I/usr/local/include  -g -O2 -std=c++11 -L/usr/local/lib -lplist-2.0 -L/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/lib -lssl -lcrypto -L/usr/local/lib -lgeneral  -o libimg4tool.la -rpath /usr/local/lib libimg4tool_la-ASN1DERElement.lo libimg4tool_la-lzssdec.lo libimg4tool_la-img4tool.lo  -llzfse 
libtool: link: g++  -fPIC -DPIC -shared -nostdlib /lib/x86_64-linux-gnu/crti.o /home/linuxbrew/.linuxbrew/Cellar/gcc/5.5.0_7/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/crtbeginS.o  .libs/libimg4tool_la-ASN1DERElement.o .libs/libimg4tool_la-lzssdec.o .libs/libimg4tool_la-img4tool.o   -L/usr/local/lib /usr/local/lib/libplist-2.0.so -lpthread -L/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/lib -lssl -lcrypto /usr/local/lib/libgeneral.so -llzfse -L/home/linuxbrew/.linuxbrew/Cellar/gcc/5.5.0_7/lib/gcc/x86_64-unknown-linux-gnu/5.5.0 -L/home/linuxbrew/.linuxbrew/Cellar/gcc/5.5.0_7/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/../../.. -L/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -lstdc++ -lm -lc -lgcc_s /home/linuxbrew/.linuxbrew/Cellar/gcc/5.5.0_7/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/crtendS.o /lib/x86_64-linux-gnu/crtn.o  -g -O2   -pthread -Wl,-soname -Wl,libimg4tool.so.0 -o .libs/libimg4tool.so.0.0.0
libtool: link: (cd ".libs" && rm -f "libimg4tool.so.0" && ln -s "libimg4tool.so.0.0.0" "libimg4tool.so.0")
libtool: link: (cd ".libs" && rm -f "libimg4tool.so" && ln -s "libimg4tool.so.0.0.0" "libimg4tool.so")
libtool: link: ar cru .libs/libimg4tool.a  libimg4tool_la-ASN1DERElement.o libimg4tool_la-lzssdec.o libimg4tool_la-img4tool.o
ar: `u' modifier ignored since `D' is the default (see `U')
libtool: link: ranlib .libs/libimg4tool.a
libtool: link: ( cd ".libs" && rm -f "libimg4tool.la" && ln -s "../libimg4tool.la" "libimg4tool.la" )
/bin/bash ../libtool  --tag=CXX   --mode=link g++ -I../include -I../include/img4tool  -I/usr/local/include -I/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/include -I/usr/local/include  -g -O2 -std=c++11 -L/usr/local/lib -lplist-2.0 -L/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/lib -lssl -lcrypto -L/usr/local/lib -lgeneral  -o img4tool img4tool-main.o libimg4tool.la -llzfse 
libtool: link: g++ -I../include -I../include/img4tool -I/usr/local/include -I/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/include -I/usr/local/include -g -O2 -std=c++11 -o .libs/img4tool img4tool-main.o  -L/usr/local/lib -L/home/linuxbrew/.linuxbrew/Cellar/[email protected]/1.1.1g/lib ./.libs/libimg4tool.so /usr/local/lib/libplist-2.0.so -lm -lpthread -lssl -lcrypto /usr/local/lib/libgeneral.so -llzfse -pthread
make[2]: Leaving directory '/home/andrew/img4tool/img4tool'
Making all in include
make[2]: Entering directory '/home/andrew/img4tool/include'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/andrew/img4tool/include'
make[2]: Entering directory '/home/andrew/img4tool'
make[2]: Leaving directory '/home/andrew/img4tool'
make[1]: Leaving directory '/home/andrew/img4tool'

andrew@andrew-MacBookPro:~/img4tool$ sudo make install

[sudo] password for andrew: 

Making install in img4tool
make[1]: Entering directory '/home/andrew/img4tool/img4tool'
make[2]: Entering directory '/home/andrew/img4tool/img4tool'
 /usr/bin/mkdir -p '/usr/local/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libimg4tool.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libimg4tool.so.0.0.0 /usr/local/lib/libimg4tool.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libimg4tool.so.0.0.0 libimg4tool.so.0 || { rm -f libimg4tool.so.0 && ln -s libimg4tool.so.0.0.0 libimg4tool.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libimg4tool.so.0.0.0 libimg4tool.so || { rm -f libimg4tool.so && ln -s libimg4tool.so.0.0.0 libimg4tool.so; }; })
libtool: install: /usr/bin/install -c .libs/libimg4tool.lai /usr/local/lib/libimg4tool.la
libtool: install: /usr/bin/install -c .libs/libimg4tool.a /usr/local/lib/libimg4tool.a
libtool: install: chmod 644 /usr/local/lib/libimg4tool.a
libtool: install: ranlib /usr/local/lib/libimg4tool.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /usr/bin/mkdir -p '/usr/local/bin'
  /bin/bash ../libtool   --mode=install /usr/bin/install -c img4tool '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/img4tool /usr/local/bin/img4tool
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/andrew/img4tool/img4tool'
make[1]: Leaving directory '/home/andrew/img4tool/img4tool'
Making install in include
make[1]: Entering directory '/home/andrew/img4tool/include'
make[2]: Entering directory '/home/andrew/img4tool/include'
make[2]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/usr/local/include'
 /usr/bin/mkdir -p '/usr/local/include/img4tool'
 /usr/bin/install -c -m 644  img4tool/img4tool.hpp img4tool/ASN1DERElement.hpp '/usr/local/include/img4tool'
make[2]: Leaving directory '/home/andrew/img4tool/include'
make[1]: Leaving directory '/home/andrew/img4tool/include'
make[1]: Entering directory '/home/andrew/img4tool'
make[2]: Entering directory '/home/andrew/img4tool'
make[2]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 libimg4tool.pc '/usr/local/lib/pkgconfig'
make[2]: Leaving directory '/home/andrew/img4tool'
make[1]: Leaving directory '/home/andrew/img4tool'
andrew@andrew-MacBookPro:~/img4tool$ img4tool

img4tool version: 0.182-22a2671082a9232c180e1856dfce04eea9681315
Compiled with plist: NO
Usage: img4tool [OPTIONS] FILE
Parses img4, im4p, im4m files

  -h, --help			prints usage information
  -a, --print-all		print everything from im4m
  -i, --im4p-only		print only im4p
  -e, --extract			extracts im4m/im4p payload
UNAVAILABLE:   -s, --shsh	<PATH>		Filepath for shsh (for reading/writing im4m)
  -m, --im4m	<PATH>		Filepath for im4m (depending on -e being set)
  -p, --im4p	<PATH>		Filepath for im4p (depending on -e being set)
  -c, --create	<PATH>		creates an img4 with the specified im4m, im4p or creates im4p with raw file (last argument)
  -o, --outfile			output path for extracting im4p payload (-e) or renaming im4p (-n)
  -t, --type			set type for creating IM4P files from raw
  -d, --desc			set desc for creating IM4P files from raw
  -n, --rename-payload NAME	rename im4p payload (NAME must be exactly 4 bytes)
UNAVAILABLE:   -v, --verify BUILDMANIFEST	verify img4, im4m
      --iv			IV  for decrypting payload when extracting (requires -e and -o)
      --key			Key for decrypting payload when extracting (requires -e and -o)
UNAVAILABLE:       --convert			convert IM4M file to .shsh (use with -s)

autogen.sh doesn't recognize libplist installed

Libplist is installed with macports, brew and via build, but autogen.sh is not finding it
Configuration for img4tool-182:

install prefix ..........: /usr/local
have plist ..............: no
crypto backend ..........: CommCrypto
compiler ................: gcc

Now type 'make' to build img4tool-182,
and then 'make install' for installation.

Failed to find matching buildidentity

When trying to verify apticket it says:

IM4M validation failed with error:
[exception]:
what=Failed to find matching buildidentity
code=63373324
line=967
file=img4tool.cpp
commit count=152
APTicket is invalid!

APTicket was saved with tsschecker commit 288
and the latest commit of img4tool from @s0uthwest says that apticket is valid

Configure can't find libgeneral

andrew@andrew-MacBookPro:~$ cd libgeneral/
andrew@andrew-MacBookPro:~/libgeneral$ make distclean
Making distclean in libgeneral
make[1]: Entering directory '/home/andrew/libgeneral/libgeneral'
test -z "libgeneral.la" || rm -f libgeneral.la
rm -f ./so_locations
rm -rf .libs _libs
rm -f *.o
rm -f *.lo
rm -f *.tab.c
test -z "" || rm -f 
test . = "." || test -z "" || rm -f 
rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
rm -f ./.deps/libgeneral_la-exception.Plo
rm -f Makefile
make[1]: Leaving directory '/home/andrew/libgeneral/libgeneral'
Making distclean in include
make[1]: Entering directory '/home/andrew/libgeneral/include'
rm -rf .libs _libs
rm -f *.lo
test -z "" || rm -f 
test . = "." || test -z "" || rm -f 
rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
rm -f Makefile
make[1]: Leaving directory '/home/andrew/libgeneral/include'
make[1]: Entering directory '/home/andrew/libgeneral'
rm -rf .libs _libs
rm -f *.lo
test -z "libgeneral.pc" || rm -f libgeneral.pc
test . = "." || test -z "" || rm -f 
rm -f config.h stamp-h1
rm -f libtool config.lt
rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
rm -f cscope.out cscope.in.out cscope.po.out cscope.files
make[1]: Leaving directory '/home/andrew/libgeneral'
rm -f config.status config.cache config.log configure.lineno config.status.lineno
rm -f Makefile
andrew@andrew-MacBookPro:~/libgeneral$ ./autogen.sh
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /home/linuxbrew/.linuxbrew/bin/ld
checking if the linker (/home/linuxbrew/.linuxbrew/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /home/linuxbrew/.linuxbrew/bin/nm -B
checking the name lister (/home/linuxbrew/.linuxbrew/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /home/linuxbrew/.linuxbrew/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... no
checking for mawk... mawk
checking command to parse /home/linuxbrew/.linuxbrew/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64
checking if the linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking dependency style of g++... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating libgeneral.pc
config.status: creating libgeneral/Makefile
config.status: creating config.h
config.status: executing libtool commands
config.status: executing depfiles commands
 
Configuration for libgeneral-32:
-------------------------------------------
 
  install prefix ..........: /usr/local
  compiler ................: gcc
 
  Now type 'make' to build libgeneral-32,
  and then 'make install' for installation.
 
andrew@andrew-MacBookPro:~/libgeneral$ make
make  all-recursive
make[1]: Entering directory '/home/andrew/libgeneral'
Making all in libgeneral
make[2]: Entering directory '/home/andrew/libgeneral/libgeneral'
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..    -I../include   -g -O2 -std=c++11 -MT libgeneral_la-exception.lo -MD -MP -MF .deps/libgeneral_la-exception.Tpo -c -o libgeneral_la-exception.lo `test -f 'exception.cpp' || echo './'`exception.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -std=c++11 -MT libgeneral_la-exception.lo -MD -MP -MF .deps/libgeneral_la-exception.Tpo -c exception.cpp  -fPIC -DPIC -o .libs/libgeneral_la-exception.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I../include -g -O2 -std=c++11 -MT libgeneral_la-exception.lo -MD -MP -MF .deps/libgeneral_la-exception.Tpo -c exception.cpp -o libgeneral_la-exception.o >/dev/null 2>&1
mv -f .deps/libgeneral_la-exception.Tpo .deps/libgeneral_la-exception.Plo
/bin/bash ../libtool  --tag=CXX   --mode=link g++ -I../include   -g -O2 -std=c++11   -o libgeneral.la -rpath /usr/local/lib libgeneral_la-exception.lo  
libtool: link: g++  -fPIC -DPIC -shared -nostdlib /lib/x86_64-linux-gnu/crti.o /home/linuxbrew/.linuxbrew/Cellar/gcc/5.5.0_7/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/crtbeginS.o  .libs/libgeneral_la-exception.o   -L/home/linuxbrew/.linuxbrew/Cellar/gcc/5.5.0_7/lib/gcc/x86_64-unknown-linux-gnu/5.5.0 -L/home/linuxbrew/.linuxbrew/Cellar/gcc/5.5.0_7/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/../../.. -L/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -lstdc++ -lm -lc -lgcc_s /home/linuxbrew/.linuxbrew/Cellar/gcc/5.5.0_7/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/crtendS.o /lib/x86_64-linux-gnu/crtn.o  -g -O2   -Wl,-soname -Wl,libgeneral.so.0 -o .libs/libgeneral.so.0.0.0
libtool: link: (cd ".libs" && rm -f "libgeneral.so.0" && ln -s "libgeneral.so.0.0.0" "libgeneral.so.0")
libtool: link: (cd ".libs" && rm -f "libgeneral.so" && ln -s "libgeneral.so.0.0.0" "libgeneral.so")
libtool: link: ar cru .libs/libgeneral.a  libgeneral_la-exception.o
ar: `u' modifier ignored since `D' is the default (see `U')
libtool: link: ranlib .libs/libgeneral.a
libtool: link: ( cd ".libs" && rm -f "libgeneral.la" && ln -s "../libgeneral.la" "libgeneral.la" )
make[2]: Leaving directory '/home/andrew/libgeneral/libgeneral'
Making all in include
make[2]: Entering directory '/home/andrew/libgeneral/include'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/andrew/libgeneral/include'
make[2]: Entering directory '/home/andrew/libgeneral'
make[2]: Leaving directory '/home/andrew/libgeneral'
make[1]: Leaving directory '/home/andrew/libgeneral'
andrew@andrew-MacBookPro:~/libgeneral$ sudo make install
[sudo] password for andrew: 
Making install in libgeneral
make[1]: Entering directory '/home/andrew/libgeneral/libgeneral'
make[2]: Entering directory '/home/andrew/libgeneral/libgeneral'
 /usr/bin/mkdir -p '/usr/local/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libgeneral.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libgeneral.so.0.0.0 /usr/local/lib/libgeneral.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f libgeneral.so.0.0.0 libgeneral.so.0 || { rm -f libgeneral.so.0 && ln -s libgeneral.so.0.0.0 libgeneral.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libgeneral.so.0.0.0 libgeneral.so || { rm -f libgeneral.so && ln -s libgeneral.so.0.0.0 libgeneral.so; }; })
libtool: install: /usr/bin/install -c .libs/libgeneral.lai /usr/local/lib/libgeneral.la
libtool: install: /usr/bin/install -c .libs/libgeneral.a /usr/local/lib/libgeneral.a
libtool: install: chmod 644 /usr/local/lib/libgeneral.a
libtool: install: ranlib /usr/local/lib/libgeneral.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib
 
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'
 
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/andrew/libgeneral/libgeneral'
make[1]: Leaving directory '/home/andrew/libgeneral/libgeneral'
Making install in include
make[1]: Entering directory '/home/andrew/libgeneral/include'
make[2]: Entering directory '/home/andrew/libgeneral/include'
make[2]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/usr/local/include'
 /usr/bin/mkdir -p '/usr/local/include/libgeneral'
 /usr/bin/install -c -m 644  libgeneral/macros.h libgeneral/exception.hpp '/usr/local/include/libgeneral'
make[2]: Leaving directory '/home/andrew/libgeneral/include'
make[1]: Leaving directory '/home/andrew/libgeneral/include'
make[1]: Entering directory '/home/andrew/libgeneral'
make[2]: Entering directory '/home/andrew/libgeneral'
make[2]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 libgeneral.pc '/usr/local/lib/pkgconfig'
make[2]: Leaving directory '/home/andrew/libgeneral'
make[1]: Leaving directory '/home/andrew/libgeneral'
andrew@andrew-MacBookPro:~/libgeneral$ cd
andrew@andrew-MacBookPro:~$ cd img4tool/
andrew@andrew-MacBookPro:~/img4tool$ ./autogen.sh
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /home/linuxbrew/.linuxbrew/bin/ld
checking if the linker (/home/linuxbrew/.linuxbrew/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /home/linuxbrew/.linuxbrew/bin/nm -B
checking the name lister (/home/linuxbrew/.linuxbrew/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /home/linuxbrew/.linuxbrew/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... no
checking for mawk... mawk
checking command to parse /home/linuxbrew/.linuxbrew/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64
checking if the linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/home/linuxbrew/.linuxbrew/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking dependency style of g++... gcc3
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking whether we need platform-specific build settings... checking for pkg-config... /home/linuxbrew/.linuxbrew/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for openssl >= 0.9.8... yes
checking for libplist-2.0 >= 2.2.0... yes
checking for libgeneral >= 32... no
configure: error: Package requirements (libgeneral >= 32) were not met:
 
No package 'libgeneral' found
 
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
 
Alternatively, you may set the environment variables libgeneral_CFLAGS
and libgeneral_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

libgeneral compiles successfully as far as I can tell, but pkg-config can't find it for some reason.

./configure: line 16573: syntax error near unexpected token `openssl,'

I am trying to run autogen.sh but keep running into the same error:

checking whether we need platform-specific build settings... ./configure: line 16573: syntax error near unexpected token `openssl,'
./configure: line 16573: `PKG_CHECK_MODULES(openssl, $OPENSSL_REQUIRES_STR, have_openssl=yes, have_openssl=no)

I have OpenSSL installed via brew. I've tried deleting and recloning the git and everything I can think of, but no luck. Please get back to me soon and let me know if I'm doing something wrong.

edit: On macOS High Sierra 10.13.4

Help

Unable tocompile img4tool with cygwin

fails to "make" Mojave

I receive:

Undefined symbols for architecture x86_64:
"_EVP_MD_CTX_create", referenced from:
_verify_signature in img4tool-img4.o
"_EVP_MD_CTX_destroy", referenced from:
_verify_signature in img4tool-img4.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Error at compile, recompile with -fPIC?

lsy@debian:~/ReRa1n/rerain-deps/img4tool$ make
make all-recursive
make[1]: Entering directory '/home/lsy/ReRa1n/rerain-deps/img4tool'
Making all in img4tool
make[2]: Entering directory '/home/lsy/ReRa1n/rerain-deps/img4tool/img4tool'
/bin/bash ../libtool --tag=CXX --mode=link g++ -I../include -I../include/img4tool -I/usr/local/include -I/usr/local/include -g -O2 -std=c++11 -L/usr/local/lib -lplist -lssl -lcrypto -L/usr/local/lib -lgeneral -o libimg4tool.la -rpath /usr/local/lib libimg4tool_la-ASN1DERElement.lo libimg4tool_la-lzssdec.lo libimg4tool_la-img4tool.lo -llzfse
libtool: link: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/6/crtbeginS.o .libs/libimg4tool_la-ASN1DERElement.o .libs/libimg4tool_la-lzssdec.o .libs/libimg4tool_la-img4tool.o -L/usr/local/lib /usr/local/lib/libplist.so -lssl -lcrypto /usr/local/lib/libgeneral.so -llzfse -L/usr/lib/gcc/x86_64-linux-gnu/6 -L/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/6/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/6/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/crtn.o -g -O2 -pthread -Wl,-soname -Wl,libimg4tool.so.0 -o .libs/libimg4tool.so.0.0.0
/usr/bin/ld: /usr/local/lib/liblzfse.a(liblzfse_master.o): relocation R_X86_64_PC32 against symbol `lzfse_encode_scratch_size' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile:463: recipe for target 'libimg4tool.la' failed
make[2]: *** [libimg4tool.la] Error 1
make[2]: Leaving directory '/home/lsy/ReRa1n/rerain-deps/img4tool/img4tool'
Makefile:481: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/lsy/ReRa1n/rerain-deps/img4tool'
Makefile:388: recipe for target 'all' failed
make: *** [all] Error 2

Error compiling on arm64

Ubuntu 18.04 arm64
The problem is most likely with my setup but i don't know what to try now, if you have any idea of what could be the problem or how to fix it, I would really appreciate it.
(Sorry for my bad English)

user@switch:~/Documents/sour/ios/img4tool$ make
make all-recursive
make[1]: Entering directory '/home/user/Documents/sour/ios/img4tool'
Making all in img4tool
make[2]: Entering directory '/home/user/Documents/sour/ios/img4tool/img4tool'
/bin/bash ../libtool --tag=CXX --mode=link g++ -I../include -I../include/img4tool -I/usr/local/include -g -O2 -std=c++11 -lssl -lcrypto -L/usr/local/lib -lgeneral -o img4tool img4tool-main.o libimg4tool.la -llzfse
libtool: link: g++ -I../include -I../include/img4tool -I/usr/local/include -g -O2 -std=c++11 -o .libs/img4tool img4tool-main.o -lssl -lcrypto -L/usr/local/lib /usr/local/lib/libgeneral.so ./.libs/libimg4tool.so -llzfse
/usr/local/lib/libgeneral.so: undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
Makefile:515: recipe for target 'img4tool' failed
make[2]: *** [img4tool] Error 1
make[2]: Leaving directory '/home/user/Documents/sour/ios/img4tool/img4tool'
Makefile:481: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/user/Documents/sour/ios/img4tool'
Makefile:388: recipe for target 'all' failed
make: *** [all] Error 2

Full output

user@switch:~/Documents/sour/ios/img4tool$ make

(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/user/Documents/sour/ios/img4tool/missing autoheader)

rm -f stamp-h1

touch config.h.in

cd . && /bin/bash ./config.status config.h

config.status: creating config.h

config.status: config.h is unchanged

make all-recursive

make[1]: Entering directory '/home/user/Documents/sour/ios/img4tool'

Making all in img4tool

make[2]: Entering directory '/home/user/Documents/sour/ios/img4tool/img4tool'

/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -g -O2 -std=c++11 -MT libimg4tool_la-ASN1DERElement.lo -MD -MP -MF .deps/libimg4tool_la-ASN1DERElement.Tpo -c -o libimg4tool_la-ASN1DERElement.lo `test -f 'ASN1DERElement.cpp' || echo './'`ASN1DERElement.cpp

libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -g -O2 -std=c++11 -MT libimg4tool_la-ASN1DERElement.lo -MD -MP -MF .deps/libimg4tool_la-ASN1DERElement.Tpo -c ASN1DERElement.cpp -fPIC -DPIC -o .libs/libimg4tool_la-ASN1DERElement.o

ASN1DERElement.cpp: In member function 'void tihmstar::img4tool::ASN1DERElement::print() const':

ASN1DERElement.cpp:224:44: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 2 has type 'uint64_t {aka long unsigned int}' [-Wformat=]

printf("%llu",getIntegerValue());

~~~~~~~~~~~~~~~~~^

libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -g -O2 -std=c++11 -MT libimg4tool_la-ASN1DERElement.lo -MD -MP -MF .deps/libimg4tool_la-ASN1DERElement.Tpo -c ASN1DERElement.cpp -o libimg4tool_la-ASN1DERElement.o >/dev/null 2>&1

mv -f .deps/libimg4tool_la-ASN1DERElement.Tpo .deps/libimg4tool_la-ASN1DERElement.Plo

/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -g -O2 -std=c11 -MT libimg4tool_la-lzssdec.lo -MD -MP -MF .deps/libimg4tool_la-lzssdec.Tpo -c -o libimg4tool_la-lzssdec.lo `test -f 'lzssdec.c' || echo './'`lzssdec.c

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -g -O2 -std=c11 -MT libimg4tool_la-lzssdec.lo -MD -MP -MF .deps/libimg4tool_la-lzssdec.Tpo -c lzssdec.c -fPIC -DPIC -o .libs/libimg4tool_la-lzssdec.o

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -g -O2 -std=c11 -MT libimg4tool_la-lzssdec.lo -MD -MP -MF .deps/libimg4tool_la-lzssdec.Tpo -c lzssdec.c -o libimg4tool_la-lzssdec.o >/dev/null 2>&1

mv -f .deps/libimg4tool_la-lzssdec.Tpo .deps/libimg4tool_la-lzssdec.Plo

/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -g -O2 -std=c++11 -MT libimg4tool_la-img4tool.lo -MD -MP -MF .deps/libimg4tool_la-img4tool.Tpo -c -o libimg4tool_la-img4tool.lo `test -f 'img4tool.cpp' || echo './'`img4tool.cpp

libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -g -O2 -std=c++11 -MT libimg4tool_la-img4tool.lo -MD -MP -MF .deps/libimg4tool_la-img4tool.Tpo -c img4tool.cpp -fPIC -DPIC -o .libs/libimg4tool_la-img4tool.o

img4tool.cpp:37:2: warning: #warning TODO adjust this for HAVE_COMMCRYPTO [-Wcpp]

#warning TODO adjust this for HAVE_COMMCRYPTO

^~~~~~~

img4tool.cpp:778:22: warning: multi-character character constant [-Wmultichar]

case 'TSGD': //DGST

^~~~~~

img4tool.cpp:806:51: warning: multi-character character constant [-Wmultichar]

ASN1DERElement bnch = getValFromIM4M(im4m,'BNCH');

^~~~~~

img4tool.cpp:1004:40: warning: multi-character character constant [-Wmultichar]

assure(ptagVal == htonl('BNCN'));

^

img4tool.cpp:1005:77: warning: multi-character character constant [-Wmultichar]

assure(*(uint32_t*)ptag[0].getStringValue().c_str() == htonl('BNCN'));

^

img4tool.cpp: In function 'void tihmstar::img4tool::printKBAG(const void*, size_t)':

img4tool.cpp:93:64: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 2 has type 'uint64_t {aka long unsigned int}' [-Wformat=]

printf("num: %llu\n",elem.getIntegerValue());

~~~~~~~~~~~~~~~~~~~~~~^

img4tool.cpp: In function 'void tihmstar::img4tool::printIM4P(const void*, size_t)':

img4tool.cpp:396:89: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 2 has type 'uint64_t {aka long unsigned int}' [-Wformat=]

printf("Uncompressed size: 0x%08llx\n",sizeTag.getIntegerValue());

~~~~~~~~~~~~~~~~~~~~~~~~~^

img4tool.cpp: In function 'void tihmstar::img4tool::printIM4M(const void*, size_t, bool)':

img4tool.cpp:427:67: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 2 has type 'uint64_t {aka long unsigned int}' [-Wformat=]

printf("Version: %llu\n",tag.getIntegerValue());

~~~~~~~~~~~~~~~~~~~~~^

img4tool.cpp: In function 'bool tihmstar::img4tool::isGeneratorValidForIM4M(const tihmstar::img4tool::ASN1DERElement&, std::__cxx11::string)':

img4tool.cpp:809:51: warning: format '%llx' expects argument of type 'long long unsigned int*', but argument 3 has type 'uint64_t* {aka long unsigned int*}' [-Wformat=]

sscanf(generator.c_str(), "0x%16llx", &gen);

~~~~^

libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -g -O2 -std=c++11 -MT libimg4tool_la-img4tool.lo -MD -MP -MF .deps/libimg4tool_la-img4tool.Tpo -c img4tool.cpp -o libimg4tool_la-img4tool.o >/dev/null 2>&1

mv -f .deps/libimg4tool_la-img4tool.Tpo .deps/libimg4tool_la-img4tool.Plo

/bin/bash ../libtool --tag=CXX --mode=link g++ -I../include -I../include/img4tool -I/usr/local/include -g -O2 -std=c++11 -lssl -lcrypto -L/usr/local/lib -lgeneral -o libimg4tool.la -rpath /usr/local/lib libimg4tool_la-ASN1DERElement.lo libimg4tool_la-lzssdec.lo libimg4tool_la-img4tool.lo -llzfse

libtool: link: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/aarch64-linux-gnu/7/../../../aarch64-linux-gnu/crti.o /usr/lib/gcc/aarch64-linux-gnu/7/crtbeginS.o .libs/libimg4tool_la-ASN1DERElement.o .libs/libimg4tool_la-lzssdec.o .libs/libimg4tool_la-img4tool.o -lssl -lcrypto -L/usr/local/lib /usr/local/lib/libgeneral.so -llzfse -L/usr/lib/gcc/aarch64-linux-gnu/7 -L/usr/lib/gcc/aarch64-linux-gnu/7/../../../aarch64-linux-gnu -L/usr/lib/gcc/aarch64-linux-gnu/7/../../../../lib -L/lib/aarch64-linux-gnu -L/lib/../lib -L/usr/lib/aarch64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/aarch64-linux-gnu/7/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/aarch64-linux-gnu/7/crtendS.o /usr/lib/gcc/aarch64-linux-gnu/7/../../../aarch64-linux-gnu/crtn.o -g -O2 -Wl,-soname -Wl,libimg4tool.so.0 -o .libs/libimg4tool.so.0.0.0

libtool: link: (cd ".libs" && rm -f "libimg4tool.so.0" && ln -s "libimg4tool.so.0.0.0" "libimg4tool.so.0")

libtool: link: (cd ".libs" && rm -f "libimg4tool.so" && ln -s "libimg4tool.so.0.0.0" "libimg4tool.so")

libtool: link: ar cru .libs/libimg4tool.a libimg4tool_la-ASN1DERElement.o libimg4tool_la-lzssdec.o libimg4tool_la-img4tool.o

ar: `u' modifier ignored since `D' is the default (see `U')

libtool: link: ranlib .libs/libimg4tool.a

libtool: link: ( cd ".libs" && rm -f "libimg4tool.la" && ln -s "../libimg4tool.la" "libimg4tool.la" )

g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I../include/img4tool -I/usr/local/include -g -O2 -std=c++11 -MT img4tool-main.o -MD -MP -MF .deps/img4tool-main.Tpo -c -o img4tool-main.o `test -f 'main.cpp' || echo './'`main.cpp

main.cpp: In function 'char* readFromFile(const char*, size_t*)':

main.cpp:69:19: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Wunused-result]

if (ret) fread(ret, size, 1, f);

~~~~~^~~~~~~~~~~~~~~~~

mv -f .deps/img4tool-main.Tpo .deps/img4tool-main.Po

/bin/bash ../libtool --tag=CXX --mode=link g++ -I../include -I../include/img4tool -I/usr/local/include -g -O2 -std=c++11 -lssl -lcrypto -L/usr/local/lib -lgeneral -o img4tool img4tool-main.o libimg4tool.la -llzfse

libtool: link: g++ -I../include -I../include/img4tool -I/usr/local/include -g -O2 -std=c++11 -o .libs/img4tool img4tool-main.o -lssl -lcrypto -L/usr/local/lib /usr/local/lib/libgeneral.so ./.libs/libimg4tool.so -llzfse

/usr/local/lib/libgeneral.so: undefined reference to `pthread_create'

collect2: error: ld returned 1 exit status

Makefile:515: recipe for target 'img4tool' failed

make[2]: *** [img4tool] Error 1

make[2]: Leaving directory '/home/user/Documents/sour/ios/img4tool/img4tool'

Makefile:481: recipe for target 'all-recursive' failed

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory '/home/user/Documents/sour/ios/img4tool'

Makefile:388: recipe for target 'all' failed

make: *** [all] Error 2

Compress bvx2

The ability to uncompress bvx2 was implemented in a commit about a month ago but the ability to re-compress them has not been implemented. Is this necessary?

Please build for more usable versions of OS X

I'm on 10.13 but the download only works with 10.15. Please lower the deployment target so it runs on earlier versions. Also having trouble finding libgeneral to build it myself

Mac OS High Sierra

is there a fix I can do for this? 10.13

dyld: Symbol not found: ____chkstk_darwin
Referenced from: /Users//Downloads/PyBoot-master/./resources/bin/img4tool (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libSystem.B.dylib
in /Users/
*/Downloads/PyBoot-master/./resources/bin/img4tool

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.