Bruce Dubbs wrote:
Pierre Labastie wrote:
I am not sure exactly what is going on, but when compiling
kdelibs4support, I get:
-------------------------
76%] Building CXX object
src/CMakeFiles/KF5KDELibs4Support.dir/kssl/kopenssl.cpp.o
In file included from /usr/include/openssl/buffer.h:15:0,
from /usr/include/openssl/x509.h:22,
from
/sources/kf5/kdelibs4support-5.34.0/src/kssl/ksslutils.h:28,
from
/sources/kf5/kdelibs4support-5.34.0/:21:
/sources/kf5/kdelibs4support-5.34.0/src/kssl/ksslutils.cpp: In function
'QString ASN1_INTEGER_QString(ASN1_INTEGER*)':
/sources/kf5/kdelibs4support-5.34.0/src/kssl/ksslutils.cpp:99:20: error: no
matching function for call to 'KOpenSSLProxy::CRYPTO_free(char*&, const
char
[59], int)'
KOSSL::self()->OPENSSL_free(rep);
Cutting to one error. If this is solved, the rest should be OK.
I have the same errors in my log but did not notice it before. The
library is only used for backporting qt4 apps and I have not seen any
issues because it is missing. I'll investigate.
Looking at this first error everything seems to be in kopenssl.{h,cpp}.
It's fairly confusing. There is:
kopenssl.h:#define KOSSL KOpenSSLProxy
So the problem, appears to be in class KOpenSSLProxy, but I am totally
confused. In a grep: 'grep -r CRYPTO_free *' from the root of
kdelibs4support, I see no instance of a call to 'CRYPTO_free(char*&, const
char[59], int)'
==========
I think I've figured something out. The above error is generated by:
QString ASN1_INTEGER_QString(ASN1_INTEGER *aint)
{
char *rep = KOSSL::self()->i2s_ASN1_INTEGER(nullptr, aint);
QString yy = rep;
KOSSL::self()->OPENSSL_free(rep);
return yy;
}
But if I build the cpp file with -E instead of -c, I get:
QString ASN1_INTEGER_QString(ASN1_INTEGER *aint)
{
char *rep = KOpenSSLProxy::self()->i2s_ASN1_INTEGER(nullptr, aint);
QString yy = rep;
KOpenSSLProxy::self()->
# 99 "/tmp/kdelibs4support-5.34.0/src/kssl/ksslutils.cpp" 3 4
CRYPTO_free(
# 99 "/tmp/kdelibs4support-5.34.0/src/kssl/ksslutils.cpp"
rep
# 99 "/tmp/kdelibs4support-5.34.0/src/kssl/ksslutils.cpp" 3 4
, "/tmp/kdelibs4support-5.34.0/src/kssl/ksslutils.cpp", 99)
# 99 "/tmp/kdelibs4support-5.34.0/src/kssl/ksslutils.cpp"
;
return yy;
}
So this looks like a gcc7 problem to me. The line:
, "/tmp/kdelibs4support-5.34.0/src/kssl/ksslutils.cpp", 99)
is inserted into the code where only a right parenthesis should be.
Changing
KOSSL::self()->OPENSSL_free(rep); to
KOSSL::self()->CRYPTO_free(rep);
Does fix this problem.
For other errors, I was able to fix ksslcertchain.cpp with a one line
change to prevent redefinition of some macros, but ksslcertificate.cpp has
a whole bunch of errors:
invalid use of incomplete type ‘EVP_PKEY {aka struct evp_pkey_st}’ and
‘NETSCAPE_X509’ was not declared in this scope and
‘class KOpenSSLProxy’ has no member named ‘sk_GENERAL_NAME_num’
as well as needing changing OPENSSL_free to CRYPTO_free in several places.
Perhaps we should just comment out this kf5 package from the list of
packages. It's only used for backward compatibility with qt4.
-- Bruce
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page