Quickstart Target examples - fcorbelli/zpaqfranz GitHub Wiki
TARGET EXAMPLES
Windows 64 (g++ 7.3.0)
g++ -O3 zpaqfranz.cpp -o zpaqfranz
Windows 64 (g++ 10.3.0) MSYS2
g++ -O3 zpaqfranz.cpp -o zpaqfranz -pthread -static
Windows 64 (g++, Hardware Blake3 implementation)
In this case, of course, linking the .S file is mandatory
g++ -O3 -DHWBLAKE3 blake3_windows_gnu.S zpaqfranz.cpp -o zpaqfranz -pthread -static
Windows 64 (g++, Hardware Blake3 implementation PLUS HW SHA1)
g++ -O3 -DHWBLAKE3 -DHWSHA1 blake3_windows_gnu.s zpaqfranz.cpp sha1ugo.obj -o zpaqfranzhw -pthread -static
Windows 64 (g++, Hardware Blake3 implementation PLUS HW SHA1/2)
g++ -O3 -DHWBLAKE3 -DHWSHA2 blake3_windows_gnu.s zpaqfranz.cpp -o zpaqfranzhw -pthread -static
Windows 64 (g++, Hardware Blake3 implementation PLUS HW SHA1/2 with GUI)
g++ -O3 -DGUI -DHWBLAKE3 -DHWSHA2 blake3_windows_gnu.s zpaqfranz.cpp -o zpaqfranzhw -pthread -static -s
Windows 32 (g++ 7.3.0 64 bit)
c:\mingw32\bin\g++ -m32 -O3 zpaqfranz.cpp -o zpaqfranz32 -pthread -static
Windows 64 (g++ 7.3.0), WITH cloud paq
g++ -O3 -DSERVER zpaqfranz.cpp -o zpaqfranz -lwsock32 -lws2_32
FreeBSD (11.x) gcc 7
gcc7 -O3 -Dunix zpaqfranz.cpp -lstdc++ -pthread -o zpaqfranz -static -lm
FreeBSD (12.1) gcc 9.3.0
g++ -O3 -Dunix zpaqfranz.cpp -pthread -o zpaqfranz -static-libstdc++ -static-libgcc
FreeBSD (11.4) gcc 10.2.0
g++ -O3 -Dunix zpaqfranz.cpp -pthread -o zpaqfranz -static-libstdc++ -static-libgcc -Wno-stringop-overflow
FreeBSD (11.3) clang 6.0.0
clang++ -Dunix zpaqfranz.cpp -pthread -o zpaqfranz -static
OpenBSD 6.6 clang++ 8.0.1
OpenBSD 7.1 clang++ 13.0.0
clang++ -Dunix -O3 zpaqfranz.cpp -o zpaqfranz -pthread -static
Arch Linux
I strongly advise against using zpaqfranz on this Linux distro(s). There is a bizarre policy on compiling executables. Obviously no one forbids it (runs fine), but just don't ask for help.
Debian Linux (10/11) gcc 8.3.0
ubuntu 21.04 desktop-amd64 gcc 10.3.0
manjaro 21.07 gcc 11.1.0
g++ -O3 -Dunix zpaqfranz.cpp -pthread -o zpaqfranz -static
QNAP NAS TS-431P3 (Annapurna AL314) gcc 7.4.0
g++ -Dunix zpaqfranz.cpp -pthread -o zpaqfranz -Wno-psabi
Fedora 34 gcc 11.2.1
Typically you will need some library (out of a fresh Fedora box) sudo dnf install glibc-static libstdc++-static -y; Then you can compile, via Makefile or "by hand" (do not forget... sudo!)
CentoOS
Please note: "Red Hat discourages the use of static linking for security reasons. Use static linking only when necessary, especially against libraries provided by Red Hat. " Therefore a -static linking is often a nightmare on CentOS => change the Makefile
g++ -O3 -Dunix zpaqfranz.cpp -pthread -o zpaqfranz
Solaris 11.4 gcc 7.3.0
OmniOS r151042 gcc 7.5.0
Beware: -DSOLARIS and some different linking options
g++ -O3 -DSOLARIS zpaqfranz.cpp -o zpaqfranz -pthread -static-libgcc -lkstat
MacOS 11.0 gcc (clang) 12.0.5, INTEL
MacOS 12.6 gcc (clang) 13.1.6, INTEL
Please note: No -static here "Apple does not support statically linked binaries on Mac OS X. (...) Rather, we strive to ensure binary compatibility in each dynamically linked system library and framework (AHAHAHAHAHAH, note by me) Warning: Shipping a statically linked binary entails a significant compatibility risk. We strongly recommend that you not do this..." Short version: Apple does not like -static g++ -Dunix -O3 zpaqfranz.cpp -o zpaqfranz -pthread If you want to enable all kind of warnings, turn on c++11. Apple, by default, does NOT like "long long", at all. As I have explained several times, I had to make compromises, such as the C++17 warnings
g++ -Dunix -O3 zpaqfranz.cpp -o zpaqfranz -pthread -std=c++11 -Wall -Wpedantic
Mac PowerPC with gcc4.x
Look at -DBIG (for BIG ENDIAN) and -DANCIENT (old-compiler)
g++ -O3 -DBIG -DANCIENT -Dunix -DNOJIT zpaqfranz.cpp -o zpaqfranz -pthread
Apple Macintosh (M1/M2)
DO NOT FORGET THE -DNOJIT!!!!!
g++ -Dunix -O3 -DNOJIT zpaqfranz.cpp -o zpaqfranz -pthread
ESXi (gcc 3.4.6)
Note: not fully developed ( extract() with minimum RAM need to be implemented )
g++ -O3 -DESX zpaqfranz.cpp -o zpaqfranz6 -pthread -static -s
sparc64 (not tested)
try -DALIGNMALLOC (+ other switches)
Haiku R1/beta4, 64 bit (gcc 11.2.0), hrev56721
g++ -O3 -Dunix zpaqfranz.cpp -o zpaqfranz -pthread -static