Bug 153228

Summary: opensslconf.h uses include "", even though it's a system header
Product: [Fedora] Fedora Reporter: James Antill <james.antill>
Component: openssl097aAssignee: Tomas Mraz <tmraz>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-04 15:31:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Antill 2005-04-03 17:41:08 UTC
Description of problem:

 If you compile an openssl using application (for MD5/SHA1) using just
pkg-config to get the CFLAGS you get...

In file included from /usr/include/openssl/e_os2.h:56,
                 from /usr/include/openssl/sha.h:62,
                 from ../../examples/ex_perf_sgopenssl.c:34:
/usr/include/openssl/opensslconf.h:13:30: opensslconf-i386.h: No such file or
directory

 This is because pkg-config --cflags doesn't produce -I/usr/include/openssl as
an option. Adding this to the .pc file makes everything work.

Version-Release number of selected component (if applicable):
openssl-devel-0.9.7a-40

How reproducible:
 Always

Steps to Reproduce:
1. Compile application

Additional Info:
vstr-1.0.14 (see freshmeat) shows this problem.

Comment 1 Tomas Mraz 2005-04-04 08:24:34 UTC
No, this wouldn't be right. Normally everything works as it should, because the
opensslconf-i386.h is included by #include "opensslconf-i386.h" from
opensslconf.h which lies in the same directory. You can try that by simple
compiling any test.c which has #include <openssl/sha.h> without any -I options
to gcc.

Is it possible that you have -I- option on the gcc command line?


Comment 2 James Antill 2005-04-04 14:57:01 UTC
 Yes, you are corrrect, on both counts.
 For some reason, I just saw the error message and didn't check how I was
including the header.
 So can we get the file opensslconf.h changed from...

#if defined(__i386__)
#include "opensslconf-i386.h"
#elif defined(__ia64__)
#include "opensslconf-ia64.h"

...to...

#if defined(__i386__)
#include <opensslconf-i386.h>
#elif defined(__ia64__)
#include <opensslconf-ia64.h>


Comment 3 Tomas Mraz 2005-04-04 15:31:22 UTC
No, this would mean exactly that the #includes wouldn't work.

It would work if it was changed to #include <openssl/opensslconf-i386.h> however
I don't want to change it as the current situation works well and I'm not sure
if some other obscure cases wouldn't break.


Comment 4 James Antill 2005-04-04 16:01:45 UTC
"""It would work if it was changed to #include <openssl/opensslconf-i386.h>
however I don't want to change it as the current situation works well and I'm
not sure if some other obscure cases wouldn't break."""

 By "works well" I assume you meant "doesn't work at all", if you use -I-. I
can't see what could possibly break ... but I guess I'm forced to work around it
if you refuse to fix it.