Hello!

I try to build htdig-3.1.6 on a Redhat system. I included a number of patches from htdig.org. One of those patches is ssl.12. With Redhat8 all works as expected.

During the build on Redhat9 I get this error:


c++ -c -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/htdig/conf/htdig.conf\" -DHAVE_SSL -I../htlib -I../htcommon -I../db/dist -I../include -I/include -Wno-deprecated -O2 -g -pipe -march=i386 -mcpu=i686 Configuration.cc
c++ -c -DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/usr/local/htdig/conf/htdig.conf\" -DHAVE_SSL -I../htlib -I../htcommon -I../db/dist -I../include -I/include -Wno-deprecated -O2 -g -pipe -march=i386 -mcpu=i686 Connection.cc
In file included from /usr/include/openssl/ssl.h:179,
from Connection.h:52,
from Connection.cc:11:
/usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory
In file included from /usr/include/openssl/ssl.h:179,
from Connection.h:52,
from Connection.cc:11:
/usr/include/openssl/kssl.h:132: 'krb5_enctype' is used as a type, but is not
defined as a type.
/usr/include/openssl/kssl.h:134: parse error before `*' token
/usr/include/openssl/kssl.h:147: parse error before `*' token
/usr/include/openssl/kssl.h:151: parse error before `*' token
/usr/include/openssl/kssl.h:153: parse error before `*' token
/usr/include/openssl/kssl.h:155: parse error before `*' token
/usr/include/openssl/kssl.h:157: parse error before `*' token
/usr/include/openssl/kssl.h:159: `krb5_context' was not declared in this scope
/usr/include/openssl/kssl.h:159: parse error before `,' token
/usr/include/openssl/kssl.h:160: `krb5_context' was not declared in this scope
/usr/include/openssl/kssl.h:160: parse error before `,' token
/usr/include/openssl/kssl.h:163: `krb5_timestamp' was not declared in this
scope
/usr/include/openssl/kssl.h:163: parse error before `,' token
/usr/include/openssl/kssl.h:165: parse error before `*' token
/usr/include/openssl/kssl.h:167: `krb5_enctype' was not declared in this scope
/usr/include/openssl/kssl.h:167: parse error before `,' token
make[1]: *** [Connection.o] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/htdig-3.1.6/htlib'
make: *** [all] Error 1



In Redhat9, Redhat added some krb5 dependencies in openssl. This results in errors with nearly all programs using openssl because kerberos resides in /usr/kerberos so that krb5.h is not found.


I found this code in the spec file of the redhat apache2 package and added it in the build-script (rpm spec file) to use pkg-config to solve the problem :

if pkg-config openssl ; then
        # configure -C barfs with trailing spaces in CFLAGS
        CFLAGS="$RPM_OPT_FLAGS `pkg-config --cflags openssl | sed 's/ *$//'`"
        AP_LIBS="$AP_LIBS `pkg-config --libs openssl`"
else
        CFLAGS="$RPM_OPT_FLAGS"
        AP_LIBS="-lssl -lcrypto"
fi
export CFLAGS
export AP_LIBS

This didn't work (although it helped compiling Apache2 with SSL support).

And I tried:

CXXFLAGS="-Wno-deprecated $RPM_OPT_FLAGS" \
CPPFLAGS="-Wno-deprecated $RPM_OPT_FLAGS" \
CFLAGS="$RPM_OPT_FLAGS `pkg-config --cflags openssl | sed 's/ *$//'`" \
AP_LIBS="$AP_LIBS `pkg-config --libs openssl`" \
./configure .....

Didn't help ...

I think I missed something. I have not enough practice in debuggig C/C++ (I wrote my last C program about 5 years ago. :-( ). It looks to me like some Makefile magic.

Help would be appreciated.


Thanks in advance.


Berthold





-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
ht://Dig general mailing list: <[EMAIL PROTECTED]>
ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-general

Reply via email to