Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error compiling OpenSSL with MinGW/MSYS

Download source files from official OpenSSL site. I follow the INSTALL.M32 file in OpenSSL folder. I open msys.bat, go to the OpenSSL folder, then type

$ ./config

It says "Configured for MinGW", than I type

$ make

and after few minutes receive error:

md2test.c:1:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
like image 710
Alecs Avatar asked Aug 31 '11 11:08

Alecs


2 Answers

I simply opened the files that were causing the error (/test/"md5test.c; rc5test.c; jpaketest.c") and replaced the line

dummytest.c

to

#include "dummytest.c"

It's the same solution as stated above, except it's a bit faster...

like image 184
aStranger Avatar answered Oct 09 '22 08:10

aStranger


The problem is that md2test.c is actually a symbolic link, or symlink to dummytest.c.

If you extracted openssl-1.0.1c.tar.gz with anything other than

tar xf openssl-1.0.1c.tar.gz

then these symlinks were not preserved. On Cygwin it works after that; not sure about MinGW.

like image 42
Zombo Avatar answered Oct 09 '22 08:10

Zombo