Description:
If operating system has outdated version of zlib or does not have it at all cmake finishes fine, but make will fail with failure like here:
[ 56%] Building C object storage/innobase/CMakeFiles/innobase.dir/page/page0zip.c.o
/home/ssmirnov/sparc01/src/mysql-5.5/storage/innobase/page/page0zip.c: In function `page_zip_empty_size':
/home/ssmirnov/sparc01/src/mysql-5.5/storage/innobase/page/page0zip.c:148: warning: implicit declaration of function `compressBound'
/home/ssmirnov/sparc01/src/mysql-5.5/storage/innobase/page/page0zip.c: In function `page_zip_decompress':
/home/ssmirnov/sparc01/src/mysql-5.5/storage/innobase/page/page0zip.c:2968: error: `Z_BLOCK' undeclared (first use in this function)
/home/ssmirnov/sparc01/src/mysql-5.5/storage/innobase/page/page0zip.c:2968: error: (Each undeclared identifier is reported only once
/home/ssmirnov/sparc01/src/mysql-5.5/storage/innobase/page/page0zip.c:2968: error: for each function it appears in.)
*** Error code 1
The following command caused the error:
cd /home/ssmirnov/sparc01/src/mysql-5.5/storage/innobase && /usr/sfw/bin/gcc -DHAVE_RWLOCK_T -DHAVE_CONFIG_H -DUNIV_SOLARIS -DHAVE_IB_SOLARIS_ATOMICS=1 -DHAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=1 -DSIZEOF_PTHREAD_T=4 -mcpu=v9 -Wall -O2 -g -DDBUG_OFF -I/home/ssmirnov/sparc01/src/mysql-5.5/include -I/home/ssmirnov/sparc01/src/mysql-5.5/storage/innobase/include -I/home/ssmirnov/sparc01/src/mysql-5.5/storage/innobase/handler -I/home/ssmirnov/sparc01/src/mysql-5.5/sql -I/home/ssmirnov/sparc01/src/mysql-5.5/regex -o CMakeFiles/innobase.dir/page/page0zip.c.o -c /home/ssmirnov/sparc01/src/mysql-5.5/storage/innobase/page/page0zip.c
make: Fatal error: Command failed for target `storage/innobase/CMakeFiles/innobase.dir/page/page0zip.c.o'
Current working directory /home/ssmirnov/sparc01/src/mysql-5.5
*** Error code 1
The following command caused the error:
make -f storage/innobase/CMakeFiles/innobase.dir/build.make storage/innobase/CMakeFiles/innobase.dir/build
make: Fatal error: Command failed for target `storage/innobase/CMakeFiles/innobase.dir/all'
Current working directory /home/ssmirnov/sparc01/src/mysql-5.5
*** Error code 1
The following command caused the error:
make -f CMakeFiles/Makefile2 all
make: Fatal error: Command failed for target `all
Workaround: specify option -DWITH_ZLIB=bundled
How to repeat:
See description
Suggested fix:
Let cmake raise error