Reputation: 2316
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
Upvotes: 7
Views: 6015
Reputation: 280
The problem is a symbolic link in the archive that MinGW/MSYS does not seem to understand.
You can work around it by using the --derefence
(-h
) option when extracting.
For example tar -xzvfh archive.tar.gz
from http://www.gnu.org/software/tar/manual/html_node/dereference.html:
When reading from an archive, the
--dereference' (
-h') option causes tar to follow an already-existing symbolic link when tar writes or reads a file named in the archive.
Upvotes: 1
Reputation: 1
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.
Upvotes: 14
Reputation: 29
What program did you use to decompress 'openssl-1.0.0x.tar.gz'? 7-zip is a great program, but it seems there's a bug.
Use tar or other decompressor such as BreadZip.
tar zvxf openssl-1.0.0x.tar.gz
It's the same solution as stated above, except it's a bit faster... :)
Upvotes: 2
Reputation: 249
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...
Upvotes: 15
Reputation: 2316
In my case the problem was that few test files (3 as far as I remember) had instead of C++-code the name of file (something like dummitest.c). I copy-paste the right code to that files from files from other folder, but with the same name, and everything went fine.
Upvotes: 3
Reputation: 1
I am having the same problem. As the problem is while building the tests, I just did not make them:
make Makefile openssl.pc libssl.pc libcrypto.pc build_libs build_apps build_tools
Is a horrible solution but it seems to work. You get the libraries and the tools, but not the test suite.
I hope someone gives a better answer and/or fixes the problem with the code if there is any.
Upvotes: 0