[openssl-dev] [openssl.org #4473] Compile errors when compiling with C++ compiler

noloader@gmail.com via RT rt at openssl.org
Wed Mar 23 23:47:20 UTC 2016

I'm not sure if this is a supported configuration, but I'm guessing
there are going to be users in the filed who find themselves in it,
like http://stackoverflow.com/q/36188982.

Working from the tip of Master...

$ export CC=g++
$ ./config
$ make

-DENGINESDIR="\"/usr/local/lib/engines\"" -Wall -O3 -pthread -m64
-DL_ENDIAN  -Wa,--noexecstack -fPIC -Iinclude -I. -Icrypto/include -c
-o crypto/asn1/a_bitstr.o crypto/asn1/a_bitstr.c
In file included from crypto/include/internal/cryptlib.h:71:0,
                 from crypto/asn1/a_bitstr.c:59:
crypto/asn1/a_bitstr.c: In function ‘ASN1_BIT_STRING*
c2i_ASN1_BIT_STRING(ASN1_BIT_STRING**, const unsigned char**, long
include/openssl/crypto.h:236:54: error: invalid conversion from
‘void*’ to ‘unsigned char*’ [-fpermissive]
crypto/asn1/a_bitstr.c:158:13: note: in expansion of macro ‘OPENSSL_malloc’
         s = OPENSSL_malloc((int)len);
crypto/asn1/a_bitstr.c: In function ‘int
ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING*, int, int)’:
include/openssl/crypto.h:242:76: error: invalid conversion from
‘void*’ to ‘unsigned char*’ [-fpermissive]
         CRYPTO_clear_realloc(addr, old_num, num, OPENSSL_FILE, OPENSSL_LINE)
crypto/asn1/a_bitstr.c:206:13: note: in expansion of macro
         c = OPENSSL_clear_realloc(a->data, a->length, w + 1);
make: *** [crypto/asn1/a_bitstr.o] Error 1

Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4473
Please log in as guest with password guest if prompted

More information about the openssl-dev mailing list