heartleech icon indicating copy to clipboard operation
heartleech copied to clipboard

build fails with wrong OpenSSL header error

Open digininja opened this issue 11 years ago • 2 comments

I just followed your build instructions, OpenSSL built fine, stayed in the directory and ran gcc but got the following error:

robin@bt openssl $ gcc ../heartleech/heartleech.c libssl.a libcrypto.a -ldl -lpthread -o ../heartleech/heartleech ../heartleech/heartleech.c:111:2: error: #error You are using the wrong version of OpenSSL headers. ../heartleech/heartleech.c: In function ‘receive_heartbeat’: ../heartleech/heartleech.c:562: error: ‘TLS1_RT_HEARTBEAT’ undeclared (first use in this function) ../heartleech/heartleech.c:562: error: (Each undeclared identifier is reported only once ../heartleech/heartleech.c:562: error: for each function it appears in.) ../heartleech/heartleech.c: In function ‘ssl_thread’: ../heartleech/heartleech.c:2057: error: ‘SSL’ has no member named ‘tlsext_heartbeat’ ../heartleech/heartleech.c:2154: error: ‘TLS1_RT_HEARTBEAT’ undeclared (first use in this function) ../heartleech/heartleech.c: In function ‘main’: ../heartleech/heartleech.c:3178: warning: passing argument 3 of ‘pthread_create’ from incompatible pointer type /usr/include/pthread.h:227: note: expected ‘void * ()(void *)’ but argument is of type ‘void ()(void *)’

digininja avatar May 10 '14 22:05 digininja

Try putting -I./include on the command-line.

The reason is that it's getting the system headers instead of the local headers. This should fix it (at least, it fixes the problem on Mac OS X).

robertdavidgraham avatar May 11 '14 00:05 robertdavidgraham

That fixed it, thanks.

On 11 May 2014 01:08, Robert David Graham [email protected] wrote:

Try putting -I./include on the command-line.

The reason is that it's getting the system headers instead of the local headers. This should fix it (at least, it fixes the problem on Mac OS X).

— Reply to this email directly or view it on GitHubhttps://github.com/robertdavidgraham/heartleech/issues/25#issuecomment-42758316 .

digininja avatar May 11 '14 21:05 digininja