View Ticket
Bounty program for improvements to Tcl and certain Tcl packages.
13:20 Ticket [14befce25e] Compile error with openssl1.1.1.c and GCC status still Open with 4 other changes artifact: a102dfe711 user: anonymous
08:12 Ticket [14befce25e]: 5 changes artifact: 3773354dc1 user: anonymous
07:01 New ticket [14befce25e]. artifact: ff2b9f31fe user: anonymous

Ticket Hash: 14befce25ea1041cce8430113ef3399242598bf6
Title: Compile error with openssl1.1.1.c and GCC
Status: Open Type: Build Problem
Severity: Severe Priority: Immediate
Subsystem: Resolution: Open
Last Modified: 2019-09-26 13:20:29
Version Found In: 1.7.18
User Comments:
anonymous added on 2019-07-30 07:01:05:
While compiling against openssl-1.1.1c I get the following error when compiling tls.c 

In file included from tls.c:83:0:
dh_params.h: In function 'get_dhParams':
dh_params.h:33:4: error: dereferencing pointer to incomplete type 'DH {aka struct dh_st}'

I have searched the net and saw this problem mentioned elsewhere:

I have tried with different GCC versions - all show the same problem.
OPENSSL_NO_DH is undefined!

anonymous added on 2019-08-02 08:12:45:
As a workaround I just added -DOPENSSL_NO_DH to the makefile.

anonymous (claiming to be R. J. Mathar) added on 2019-09-26 13:20:29:
The core problem seems to be that include/openssl/bn.h of defines BIGNUM as a typedef of struct bignum_st, but does not define that structure anywhere.

The declarations of the header of openssl 1.0.2 are still including such a definition; but the openssl 1.1 distributed with openSUSE 15.1 does no longer define the structure, and it's found nowhere in /usr/include, so the compiler has no chance to know whether 'p' and/or 'g' are members of that structure.

So the first approach here might be that the code in tlsInt.h does not define TCLTLS_OPENSSL_PRE_1_1_API for e.g. OPENSSL_VERSION_NUMBER == 0x1010009fL as defined in opensslv.h .