Solaris 10 with GCC
bash-3.2# gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with: /sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
I fixed my build issue while writing this up.. Persons compiling with gcc under solaris 10 may find that running make does not find the deflate.o, blocksplitter.o, tree.o, and other files. The solution was to copy them from the main build directory to zopfli/
bash-3.2# make
gcc -O3 -Wall -Wextra -c zopfli/deflate.c
gcc -O3 -Wall -Wextra -c zopfli/blocksplitter.c
gcc -O3 -Wall -Wextra -c zopfli/tree.c
gcc -O3 -Wall -Wextra -c zopfli/lz77.c
gcc -O3 -Wall -Wextra -c zopfli/cache.c
gcc -O3 -Wall -Wextra -c zopfli/hash.c
gcc -O3 -Wall -Wextra -c zopfli/util.c
gcc -O3 -Wall -Wextra -c zopfli/squeeze.c
gcc -O3 -Wall -Wextra -c zopfli/katajainen.c
gcc -o pigz pigz.o yarn.o zopfli/deflate.o zopfli/blocksplitter.o zopfli/tree.o zopfli/lz77.o zopfli/cache.o zopfli/hash.o zopfli/util.o zopfli/squeeze.o zopfli/katajainen.o -lpthread -lz
gcc: zopfli/deflate.o: No such file or directory
gcc: zopfli/blocksplitter.o: No such file or directory
gcc: zopfli/tree.o: No such file or directory
gcc: zopfli/lz77.o: No such file or directory
gcc: zopfli/cache.o: No such file or directory
gcc: zopfli/hash.o: No such file or directory
gcc: zopfli/util.o: No such file or directory
gcc: zopfli/squeeze.o: No such file or directory
gcc: zopfli/katajainen.o: No such file or directory
*\ Error code 1
make: Fatal error: Command failed for target `pigz'
If I move the .o files from the root of the build to zopfli/
and re-attempt the build I get:
bash-3.2# cp .o zopfli/
bash-3.2# make
gcc -o pigz pigz.o yarn.o zopfli/deflate.o zopfli/blocksplitter.o zopfli/tree.o zopfli/lz77.o zopfli/cache.o zopfli/hash.o zopfli/util.o zopfli/squeeze.o zopfli/katajainen.o -lpthread -lz
Undefined first referenced
symbol in file
log zopfli/tree.o
ld: fatal: symbol referencing errors. No output written to pigz
collect2: ld returned 1 exit status
** Error code 1
make: Fatal error: Command failed for target `pigz'
From there it seems to just be the -LM error to fix.
changed:
$(CC) -o pigz $^ -lpthread -lz
to:
$(CC) -o pigz $^ -lpthread -lz -lm
Solaris 10 with GCC bash-3.2# gcc -v Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs Configured with: /sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared Thread model: posix gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
I fixed my build issue while writing this up.. Persons compiling with gcc under solaris 10 may find that running make does not find the deflate.o, blocksplitter.o, tree.o, and other files. The solution was to copy them from the main build directory to zopfli/
bash-3.2# make gcc -O3 -Wall -Wextra -c zopfli/deflate.c gcc -O3 -Wall -Wextra -c zopfli/blocksplitter.c gcc -O3 -Wall -Wextra -c zopfli/tree.c gcc -O3 -Wall -Wextra -c zopfli/lz77.c gcc -O3 -Wall -Wextra -c zopfli/cache.c gcc -O3 -Wall -Wextra -c zopfli/hash.c gcc -O3 -Wall -Wextra -c zopfli/util.c gcc -O3 -Wall -Wextra -c zopfli/squeeze.c gcc -O3 -Wall -Wextra -c zopfli/katajainen.c gcc -o pigz pigz.o yarn.o zopfli/deflate.o zopfli/blocksplitter.o zopfli/tree.o zopfli/lz77.o zopfli/cache.o zopfli/hash.o zopfli/util.o zopfli/squeeze.o zopfli/katajainen.o -lpthread -lz gcc: zopfli/deflate.o: No such file or directory gcc: zopfli/blocksplitter.o: No such file or directory gcc: zopfli/tree.o: No such file or directory gcc: zopfli/lz77.o: No such file or directory gcc: zopfli/cache.o: No such file or directory gcc: zopfli/hash.o: No such file or directory gcc: zopfli/util.o: No such file or directory gcc: zopfli/squeeze.o: No such file or directory gcc: zopfli/katajainen.o: No such file or directory *\ Error code 1 make: Fatal error: Command failed for target `pigz'
If I move the .o files from the root of the build to zopfli/ and re-attempt the build I get:
bash-3.2# cp .o zopfli/ bash-3.2# make gcc -o pigz pigz.o yarn.o zopfli/deflate.o zopfli/blocksplitter.o zopfli/tree.o zopfli/lz77.o zopfli/cache.o zopfli/hash.o zopfli/util.o zopfli/squeeze.o zopfli/katajainen.o -lpthread -lz Undefined first referenced symbol in file log zopfli/tree.o ld: fatal: symbol referencing errors. No output written to pigz collect2: ld returned 1 exit status ** Error code 1 make: Fatal error: Command failed for target `pigz'
From there it seems to just be the -LM error to fix. changed: $(CC) -o pigz $^ -lpthread -lz to: $(CC) -o pigz $^ -lpthread -lz -lm