Attempting to upgrade libwww (actually tetex) saw error in HTSSL.c build: couldn't find ssl.h. Based on the research below, it appears that the stratego package creates /usr/include/ssl, and the openssl package puts its stuff in /usr/include/openssl, but the libwww package finds /usr/include/ssl first so it generates -I for that directory instead and therefore fails to find ssl.h. Reproducible: Always Steps to Reproduce: 1. emerge -u openssl 2. emerge -u stratego 3. emerge -u libwww # emerge -up tetex These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild N ] net-libs/libwww-5.4.0-r1 [ebuild U ] app-text/tetex-2.0.2-r1 [1.0.7-r12] # emerge -u tetex >>> emerge (1 of 2) net-libs/libwww-5.4.0-r1 to / ... checking whether we include extension methods.... no checking whether we can find OpenSSL... yes checking whether to use internal signal handlers... no ... make[5]: Entering directory `/var/tmp/portage/libwww-5.4.0-r1/work/w3c-libwww-5. 4.0/Library/src/SSL' ... gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -I/usr/local/include -I../../.. /modules/md5 -I../../../modules/expat/xmlparse -I../../../Library/src -I/usr/include/ssl -march=pentium3 -O3 -pipe -mfpmath=sse -mmmx -msse -Wall -c HTSSL.c -fPIC -DPIC -o .libs/HTSSL.lo HTSSLReader.c:27:17: ssl.h: No such file or directory HTSSL.c:32:17: ssl.h: No such file or directory ... # emerge search openssl ... * dev-libs/openssl Latest version available: 0.9.6k Latest version installed: 0.9.6k Size of downloaded files: 2,132 kB Homepage: http://www.openssl.org/ Description: Toolkit for SSL v2/v3 and TLS v1 ... # find /usr/include -name ssl.h /usr/include/openssl/ssl.h # qpkg -f /usr/include/openssl/ssl.h dev-libs/openssl * # qpkg -f /usr/include/ssl dev-lang/stratego * # emerge search stratego ... * dev-lang/stratego Latest version available: 0.8.1 Latest version installed: 0.8.1 Size of downloaded files: 3,033 kB Homepage: http://www.stratego-language.org/ Description: Stratego term-rewriting language ... # ls /usr/include/ssl annotations.h dir.h io.h ssl-string.h stratego-lib.h term.h cgi.h exec.h number.h ssl-time.h tables.h # ls /usr/include/openssl/ asn1.h crypto.h hmac.h opensslv.h rsa.h tmdiff.h asn1_mac.h des.h idea.h pem.h safestack.h txt_db.h bio.h dh.h lhash.h pem2.h sha.h x509.h blowfish.h dsa.h md2.h pkcs12.h ssl.h x509_vfy.h bn.h dso.h md4.h pkcs7.h ssl2.h x509v3.h buffer.h e_os.h md5.h rand.h ssl23.h cast.h e_os2.h mdc2.h rc2.h ssl3.h comp.h ebcdic.h obj_mac.h rc4.h stack.h conf.h err.h objects.h rc5.h symhacks.h conf_api.h evp.h opensslconf.h ripemd.h tls1.h # ===== WORKAROUNDS =============================================== 1. Remove the stratego ebuild 2. Based on the contents of libwww's configure.in: ... dnl find the ssl include dir (empirical) if test -d '/usr/local/ssl/include'; then sslinc="-I/usr/local/ssl/include" elif test -d '/usr/local/openssl/include'; then sslinc="-I/usr/local/openssl/include" elif test -d '/usr/local/include/openssl'; then sslinc="-I/usr/local/include/openssl" elif test -d '/usr/include/ssl'; then sslinc="-I/usr/include/ssl" elif test -d '/usr/include/openssl'; then sslinc="-I/usr/include/openssl" else sslinc="" fi ... Create a link from /usr/local/include/openssl to /usr/include/openssl. 3. Change the order in the above configure.in to check for the /usr/include/openssl directory before the /usr/include/ssl directory. 4. Replace the contents of libwww's configure.in (original above) to the following to be more explicit: ... for ssldir in /usr/local/ssl/include \ /usr/local/openssl/include \ /usr/include/ssl \ /usr/include/openssl ; do if test -d $ssldir -a -f $ssldir/ssl.h; then sslinc="-I$ssldir" fi done ... Option #4 above is suggested as the fix for this bug.
*** Bug 30109 has been marked as a duplicate of this bug. ***
I took the solution #4 and committed (it actually solved the bug). Your comment is very informative and helped me a lot. Thanks for reporting.