Bug 1631 - ./configure errors on missing headers are misleading on Linux
Summary: ./configure errors on missing headers are misleading on Linux
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: 5.2p1
Hardware: ix86 Linux
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-07 01:13 AEST by Chris Pepper
Modified: 2009-10-06 15:02 AEDT (History)
1 user (show)

See Also:


Attachments
Check for header presence for zlib and openssl before checking llibraries. (1.23 KB, patch)
2009-08-07 13:41 AEST, Darren Tucker
no flags Details | Diff
Short blurb telling RHEL-based users that they need -devel RPMs (517 bytes, patch)
2009-08-29 01:03 AEST, Chris Pepper
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Pepper 2009-08-07 01:13:56 AEST
On Linux, OpenSSH's configure script complains that zlib and libcrypto are missing even when they are installed -- what it actually needs are the corresponding -devel RPMs.

Since the problem is absence of the headers, and they're in different RPMs on Linux, please improve the errors to mention 'headers' -- -devel RPMs are too specific unless you wanted to special-case the relevant Linux flavors.

[root@si-node openssh]# autoreconf
[root@si-node openssh]# ./configure && make

...

checking for deflate in -lz... no
configure: error: *** zlib missing - please install first or check config.log ***
[root@si-node openssh]# rpm -qa|grep zlib
zlib-1.2.3-3
[root@si-node openssh]# rpm -ql zlib
/usr/lib/libz.so.1
/usr/lib/libz.so.1.2.3
/usr/share/doc/zlib-1.2.3
/usr/share/doc/zlib-1.2.3/README
[root@si-node openssh]# uname -a
Linux si-node.mskcc.org 2.6.18-128.2.1.el5 #1 SMP Tue Jul 14 06:39:56 EDT 2009 i686 i686 i386 GNU/Linux
[root@si-node openssh]# cat /etc/redhat-release 
CentOS release 5.3 (Final)

I installed zlib-devel-1.2.3-3.i386.rpm, then got past zlib to a similar error about openssl:

configure: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***
[root@si-node openssh]# rpm -qa|grep crypto

The fix was to install openssl-devel-0.9.8e-7.el5.i386.rpm.

This was in HEAD from today.
Comment 1 Darren Tucker 2009-08-07 13:41:35 AEST
Created attachment 1666 [details]
Check for header presence for zlib and openssl before checking llibraries.

Actually the problem is not that the headers are missing since the test just does a test link against libz looking for "deflate".

The problem is that the .so link to the shared library is missing:

$ rpm -qf /usr/lib/libz.so
zlib-devel-1.2.3-18.fc9.i386

so as far as your linker is concerned, zlib *is* missing since nothing using -lz is going to work.

There's already a header check which we could maybe move to before the library check.  I'm opposed to including distro-specific advice in the configure errors.
Comment 2 Darren Tucker 2009-08-28 18:06:59 AEST
I've committed the change that checks for the headers first, which may help:

$ ./configure
[...]
checking whether getpgrp requires zero arguments... yes
checking openssl/opensslv.h usability... no
checking openssl/opensslv.h presence... no
checking for openssl/opensslv.h... no
configure: error: *** OpenSSL headers missing - please install first or check config.log ***

If you'd like to write some text to put in README.platform I'd be happy to add it.
Comment 3 Chris Pepper 2009-08-29 01:03:34 AEST
Created attachment 1682 [details]
Short blurb telling RHEL-based users that they need -devel RPMs
Comment 4 Chris Pepper 2009-08-29 01:04:23 AEST
Here's a suggestion, thanks!

Linux
-----

Some Linux distributions (including Red Hat/Fedora/CentOS) include headers and library links in the -devel RPMs rather than the main binary RPMs. If you get an error about headers, or complaining about a missing prerequisite that you know is installed, make sure the -devel RPMs are installed too.
Comment 5 Darren Tucker 2009-08-29 09:15:46 AEST
Thanks, I've committed the text with a few modifications.
Comment 6 Damien Miller 2009-10-06 15:02:35 AEDT
Mass move of RESOLVED bugs to CLOSED now that 5.3 is out.