zlib, harsh compiler warnings and configure test

I'm trying to compile zlib from the command line, and I'm getting this message when using -Wall -Wextra -Wconversion (full cross-compile script is below):

Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).

Here's the configure test that's generating the line:

cat > $test.c << EOF
int foo() { return 0; }
EOF
echo "Checking for obsessive-compulsive compiler options..." >> configure.log
if try $CC -c $CFLAGS $test.c; then
  :
else
  echo "Compiler error reporting is too harsh for $0 (perhaps remove -Werror)." | tee -a configure.log
  leave 1
fi

Its not clear to me what exactly is being judged too harsh (especially since -Werror is not present). I also don't quite understand what the sample program used in the test is doing, so its not clear to me what the criteria is for judging the compiler warnings "too harsh".

What is zlib complaining is too harsh?


#! /bin/sh

export PATH="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH"

export CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
export CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
export LD=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
export AR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar
export RANLIB=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib

export CFLAGS="-Wall -Wextra -Wconversion --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdks""
export CXXFLAGS="-Wall -Wextra -Wconversion --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk""

I had the exact same problem on a newly built machine, and I found the cause was that I didn't actually have the appropriate GNU C compilers installed (reference). Therefore it's complaining that the compiler is too harsh simply because there is no compiler.

Try running:

sudo apt-get install build-essential

and then try running your ./configure again.

EMBOSS Administrator's Guide: Bioinformatics Software Management, I had the exact same problem on a newly built machine, and I found the cause was that I didn't actually have the appropriate GNU C compilers installed  On HP-UX 11, zlib-1.2.11 was picking gcc over cc (HP C Compiler) from PATH and was feeding CFLAGS = -z +DD64 -mt to linker ld. After fixing the PATH zlib-1.2.11 picked cc, compilation & linking succeeded and produced shared zlib-1.2.11.

mine was failing because it tried to use cc (non existent) instead of gcc

ChangeLog, Compiler error reporting is too harsh for ./configure (perhaps remove -Werror ). Here's the configure test that's generating the line: cat >  That's weird, I'll have to look into this! As a quickfix you could temporarily modify the port.sh script so it executes ./configure inside the port working directory.

My problem was: cc1: error while loading shared libraries: libimf.so: cannot open shared object file: No such file or directory

Search for details in configure.log.

zlib/configure at master · madler/zlib · GitHub, warnings (-Wall option on gcc compiler) strict warnings (gcc compiler only) for --with-auth=AUTHTYPE --with-thread=TYPE mprobe memory allocation test save png/gd/zlib installation defaults to /usr to disable pngdriver usage completely XMKMF Use these variables to override the choices made by '​configure' or to  Hi, Have any come across this. When I compile cmor with the --with-zlib option I get configure: WARNING: unrecognized options: --with-zlib and when I do make install I get cp -pr include/.h cmor_us

marian-dev/ChangeLog at master · marian-nmt/marian-dev · GitHub, configure for more compiler warnings - Reject a window size of 256 bytes if not library permissions in Makefile.in [Weigelt] - Avoid warnings in configure tests that more strict on incomplete code sets in inflate_table() and increase ENOUGH  Contribute to jtkukunas/zlib development by creating an account on GitHub. Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

ChangeLog file for zlib Changes in 1.2.11 (15 Jan 2017), To impose specific compiler or flags or install directory, use for example: test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log. else echo "​Compiler error reporting is too harsh for $0 (perhaps remove -Werror). echo " WARNING: vsnprintf() not found, falling back to vsprintf(). zlib" | tee -a configure.​log. zlib, harsh compiler warnings and configure test Here's the configure test that's generating the line: is for judging the compiler warnings "too harsh". What

zlib, HP-UX Compiler error reporting is too harsh for ./configure , Fix bug that accepted invalid zlib header when windowBits is zero. - Fix gzseek() configure for more compiler warnings Fix bug in test/minigzip.c for configure --solo Be more strict on incomplete code sets in inflate_table() and increase. Configure. To install zlib-ng system-wide using the configure script: make install Contributing. Zlib-ng is a young project, and we aim to be open to contributions, and we would be delighted to receive pull requests on github. Just remember that any code you submit must be your own and it must be zlib licensed.

Comments
  • Please provide the contents of configure.log.
  • "The compiler is too harsh simply because there is no compiler" omg rofl I came here for the exact same reason - thanks for clarifying... and death to all those who write these kind of error messages, ha.
  • > Therefore it's complaining that the compiler is too harsh simply because there is no compiler. This may be true in the case of a missing compiler, but it also manifests when there is actually a compiler, apparently for other reasons