Can't build PIGZ on FreeBSD 9.1

wattie

Verified User
Joined
May 31, 2008
Messages
1,206
Location
Bulgaria
root@srv:/usr/local/directadmin/custombuild # ./build pigz
Downloading zlib-1.2.8.tar.gz...
/usr/local/directadmin/custombuild/zlib-1.2.8.100% of 557 kB 285 kBps
MD5 Checksum on zlib-1.2.8.tar.gz passed.
Checking for gcc...
Checking for shared library support...
Building shared library libz.so.1.2.8 with gcc.
Checking for off64_t... No.
Checking for fseeko... Yes.
Checking for strerror... Yes.
Checking for unistd.h... Yes.
Checking for stdarg.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
Checking for vsnprintf() in stdio.h... Yes.
Checking for return value of vsnprintf()... Yes.
Checking for attribute(visibility) support... Yes.
Trying to make libz...
gcc -O3 -DHAVE_HIDDEN -I. -c -o example.o test/example.c
gcc -O3 -DHAVE_HIDDEN -I. -c -o minigzip.o test/minigzip.c
gcc -O3 -DHAVE_HIDDEN -c adler32.c
gcc -O3 -DHAVE_HIDDEN -c crc32.c
gcc -O3 -DHAVE_HIDDEN -c deflate.c
gcc -O3 -fPIC -DHAVE_HIDDEN -DPIC -c -o objs/adler32.o adler32.c
gcc -O3 -fPIC -DHAVE_HIDDEN -DPIC -c -o objs/crc32.o crc32.c
gcc -O3 -fPIC -DHAVE_HIDDEN -DPIC -c -o objs/deflate.o deflate.c
gcc -O3 -DHAVE_HIDDEN -c infback.c
gcc -O3 -fPIC -DHAVE_HIDDEN -DPIC -c -o objs/infback.o infback.c
gcc -O3 -DHAVE_HIDDEN -c inffast.c
gcc -O3 -fPIC -DHAVE_HIDDEN -DPIC -c -o objs/inffast.o inffast.c
gcc -O3 -DHAVE_HIDDEN -c inflate.c
gcc -O3 -fPIC -DHAVE_HIDDEN -DPIC -c -o objs/inflate.o inflate.c
gcc -O3 -DHAVE_HIDDEN -c inftrees.c
gcc -O3 -fPIC -DHAVE_HIDDEN -DPIC -c -o objs/inftrees.o inftrees.c
gcc -O3 -DHAVE_HIDDEN -c trees.c
gcc -O3 -fPIC -DHAVE_HIDDEN -DPIC -c -o objs/trees.o trees.c
gcc -O3 -DHAVE_HIDDEN -c zutil.c
gcc -O3 -fPIC -DHAVE_HIDDEN -DPIC -c -o objs/zutil.o zutil.c
gcc -O3 -DHAVE_HIDDEN -c compress.c
gcc -O3 -fPIC -DHAVE_HIDDEN -DPIC -c -o objs/compress.o compress.c
gcc -O3 -DHAVE_HIDDEN -c uncompr.c
gcc -O3 -DHAVE_HIDDEN -c gzclose.c
gcc -O3 -fPIC -DHAVE_HIDDEN -DPIC -c -o objs/uncompr.o uncompr.c
gcc -O3 -fPIC -DHAVE_HIDDEN -DPIC -c -o objs/gzclose.o gzclose.c
gcc -O3 -DHAVE_HIDDEN -c gzlib.c
gcc -O3 -fPIC -DHAVE_HIDDEN -DPIC -c -o objs/gzlib.o gzlib.c
gcc -O3 -DHAVE_HIDDEN -c gzread.c
gcc -O3 -DHAVE_HIDDEN -c gzwrite.c
gcc -O3 -fPIC -DHAVE_HIDDEN -DPIC -c -o objs/gzwrite.o gzwrite.c
gcc -O3 -fPIC -DHAVE_HIDDEN -DPIC -c -o objs/gzread.o gzread.c
ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
gcc -O3 -DHAVE_HIDDEN -o example example.o -L. libz.a
gcc -O3 -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a
gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -O3 -fPIC -DHAVE_HIDDEN -o libz.so.1.2.8 adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo -lc
rm -f libz.so libz.so.1
ln -s libz.so.1.2.8 libz.so
ln -s libz.so.1.2.8 libz.so.1
gcc -O3 -DHAVE_HIDDEN -o examplesh example.o -L. libz.so.1.2.8
gcc -O3 -DHAVE_HIDDEN -o minigzipsh minigzip.o -L. libz.so.1.2.8
cp libz.a /usr/local/lib_da/lib
chmod 644 /usr/local/lib_da/lib/libz.a
cp libz.so.1.2.8 /usr/local/lib_da/lib
chmod 755 /usr/local/lib_da/lib/libz.so.1.2.8
cp zlib.3 /usr/local/lib_da/share/man/man3
chmod 644 /usr/local/lib_da/share/man/man3/zlib.3
cp zlib.pc /usr/local/lib_da/lib/pkgconfig
chmod 644 /usr/local/lib_da/lib/pkgconfig/zlib.pc
cp zlib.h zconf.h /usr/local/lib_da/include
chmod 644 /usr/local/lib_da/include/zlib.h /usr/local/lib_da/include/zconf.h
Downloading pigz-2.3.1.tar.gz...
/usr/local/directadmin/custombuild/pigz-2.3.1.100% of 84 kB 129 kBps
MD5 Checksum on pigz-2.3.1.tar.gz passed.
Found /usr/local/directadmin/custombuild/pigz-2.3.1.tar.gz
Extracting /usr/local/directadmin/custombuild/pigz-2.3.1.tar.gz...
Installing pigz-2.3.1...
Trying to make pigz-2.3.1...
cc -I/usr/local/lib_da/include/ -c pigz.c
cc -I/usr/local/lib_da/include/ -c yarn.c
cc -I/usr/local/lib_da/include/ -c zopfli/blocksplitter.c
cc -I/usr/local/lib_da/include/ -c zopfli/lz77.c
cc -I/usr/local/lib_da/include/ -c zopfli/deflate.c
cc -I/usr/local/lib_da/include/ -c zopfli/cache.c
cc -I/usr/local/lib_da/include/ -c zopfli/hash.c
cc -I/usr/local/lib_da/include/ -c zopfli/tree.c
cc -I/usr/local/lib_da/include/ -c zopfli/util.c
cc -I/usr/local/lib_da/include/ -c zopfli/squeeze.c
cc -I/usr/local/lib_da/include/ -c zopfli/katajainen.c
cc -o pigz -lpthread /usr/local/lib_da/lib/libz.a -lm
/usr/lib/crt1.o: In function `_start':
crt1.c:(.text+0x8a): undefined reference to `main'
*** [pigz] Error code 1
1 error

*** The make has failed, would you like to try to make again? (y,n):
 
Would I be able to check & fix the issue on your server? :) (free of charge)
 
I have the similiar problem with actual pigz version (2.3.3):
Code:
root@server:/etc/nginx# /usr/local/directadmin/custombuild/build pigz
File already exists
MD5 Checksum on pigz-2.3.3.tar.gz passed.
Found /usr/local/directadmin/custombuild/pigz-2.3.3.tar.gz
Extracting /usr/local/directadmin/custombuild/pigz-2.3.3.tar.gz...
Installing pigz-2.3.3...
Trying to make pigz-2.3.3...
cc -I/usr/local/lib_da/include/   -c -o pigz.o pigz.c
cc -I/usr/local/lib_da/include/   -c -o yarn.o yarn.c
cc -I/usr/local/lib_da/include/   -c -o try.o try.c
cc -I/usr/local/lib_da/include/   -c -o zopfli/src/zopfli/deflate.o zopfli/src/zopfli/deflate.c
cc -I/usr/local/lib_da/include/   -c -o zopfli/src/zopfli/blocksplitter.o zopfli/src/zopfli/blocksplitter.c
cc -I/usr/local/lib_da/include/   -c -o zopfli/src/zopfli/tree.o zopfli/src/zopfli/tree.c
cc -I/usr/local/lib_da/include/   -c -o zopfli/src/zopfli/lz77.o zopfli/src/zopfli/lz77.c
cc -I/usr/local/lib_da/include/   -c -o zopfli/src/zopfli/cache.o zopfli/src/zopfli/cache.c
cc -I/usr/local/lib_da/include/   -c -o zopfli/src/zopfli/hash.o zopfli/src/zopfli/hash.c
cc -I/usr/local/lib_da/include/   -c -o zopfli/src/zopfli/util.o zopfli/src/zopfli/util.c
cc -I/usr/local/lib_da/include/   -c -o zopfli/src/zopfli/squeeze.o zopfli/src/zopfli/squeeze.c
cc -I/usr/local/lib_da/include/   -c -o zopfli/src/zopfli/katajainen.o zopfli/src/zopfli/katajainen.c
cc /usr/local/lib_da/lib/libz.a -o pigz pigz.o yarn.o try.o zopfli/src/zopfli/deflate.o zopfli/src/zopfli/blocksplitter.o zopfli/src/zopfli/tree.o zopfli/src/zopfli/lz77.o zopfli/src/zopfli/cache.o zopfli/src/zopfli/hash.o zopfli/src/zopfli/util.o zopfli/src/zopfli/squeeze.o zopfli/src/zopfli/katajainen.o -lpthread -lm
pigz.o: In function `deflate_engine':
pigz.c:(.text+0x18cc): undefined reference to `deflate'
pigz.o: In function `compress_thread':
pigz.c:(.text+0x1a2e): undefined reference to `deflateInit2_'
pigz.c:(.text+0x1b2f): undefined reference to `deflateReset'
pigz.c:(.text+0x1b4b): undefined reference to `deflateParams'
pigz.c:(.text+0x1be8): undefined reference to `deflateSetDictionary'
pigz.c:(.text+0x1ed6): undefined reference to `deflatePending'
pigz.c:(.text+0x1f2b): undefined reference to `deflatePrime'
pigz.c:(.text+0x1f66): undefined reference to `deflatePending'
pigz.c:(.text+0x23c5): undefined reference to `adler32'
pigz.c:(.text+0x23db): undefined reference to `crc32'
pigz.c:(.text+0x2404): undefined reference to `adler32'
pigz.c:(.text+0x241e): undefined reference to `crc32'
pigz.c:(.text+0x2462): undefined reference to `adler32'
pigz.c:(.text+0x247d): undefined reference to `crc32'
pigz.c:(.text+0x24f7): undefined reference to `deflateEnd'
pigz.o: In function `write_thread':
pigz.c:(.text+0x2691): undefined reference to `adler32'
pigz.c:(.text+0x26a7): undefined reference to `crc32'
pigz.o: In function `single_compress':
pigz.c:(.text+0x328b): undefined reference to `deflateEnd'
pigz.c:(.text+0x33e7): undefined reference to `deflateInit2_'
pigz.c:(.text+0x344b): undefined reference to `deflateReset'
pigz.c:(.text+0x3467): undefined reference to `deflateParams'
pigz.c:(.text+0x34d8): undefined reference to `adler32'
pigz.c:(.text+0x34ee): undefined reference to `crc32'
pigz.c:(.text+0x3823): undefined reference to `deflateReset'
pigz.c:(.text+0x3864): undefined reference to `adler32'
pigz.c:(.text+0x3889): undefined reference to `crc32'
pigz.c:(.text+0x38c3): undefined reference to `deflate'
pigz.c:(.text+0x39a2): undefined reference to `adler32'
pigz.c:(.text+0x39c7): undefined reference to `crc32'
pigz.c:(.text+0x3a13): undefined reference to `deflate'
pigz.c:(.text+0x3ab2): undefined reference to `deflatePending'
pigz.c:(.text+0x3af9): undefined reference to `deflate'
pigz.c:(.text+0x3bab): undefined reference to `deflatePrime'
pigz.c:(.text+0x3bef): undefined reference to `deflatePending'
pigz.c:(.text+0x3c32): undefined reference to `deflate'
pigz.c:(.text+0x3cf0): undefined reference to `deflate'
pigz.c:(.text+0x405c): undefined reference to `adler32'
pigz.c:(.text+0x407c): undefined reference to `crc32'
pigz.c:(.text+0x40d9): undefined reference to `adler32'
pigz.c:(.text+0x40fa): undefined reference to `crc32'
pigz.o: In function `get_header':
pigz.c:(.text+0x5e83): undefined reference to `crc32'
pigz.c:(.text+0x5ef6): undefined reference to `crc32'
pigz.c:(.text+0x5f8c): undefined reference to `crc32'
pigz.c:(.text+0x5fff): undefined reference to `crc32'
pigz.o:pigz.c:(.text+0x607d): more undefined references to `crc32' follow
pigz.o: In function `outb_check':
pigz.c:(.text+0x767b): undefined reference to `adler32'
pigz.c:(.text+0x7697): undefined reference to `crc32'
pigz.o: In function `outb':
pigz.c:(.text+0x7968): undefined reference to `adler32'
pigz.c:(.text+0x7983): undefined reference to `crc32'
pigz.o: In function `infchk':
pigz.c:(.text+0x79ef): undefined reference to `adler32'
pigz.c:(.text+0x7a05): undefined reference to `crc32'
pigz.c:(.text+0x7a48): undefined reference to `inflateBackInit_'
pigz.c:(.text+0x7ac8): undefined reference to `inflateBack'
pigz.c:(.text+0x7ada): undefined reference to `inflateBackEnd'
collect2: error: ld returned 1 exit status
make: *** [pigz] Error 1

*** The make has failed, would you like to try to make again? (y,n):

How to solve this problem?

Regards
 
Back
Top