[openssl-users] mingw 64-bit build of 1.1.0e

sisyphus1 at optusnet.com.au sisyphus1 at optusnet.com.au
Sat Mar 11 11:21:05 UTC 2017


Hi,

Having a spot of bother trying to build a static openssl-1.1.0e using a
mingw-w64 64-bit compiler - namely, gcc version 6.3.0
(x86_64-posix-sjlj-rev1, Built by MinGW-W64 project).

In the msys2 shell, I run:

./config no-shared
zlib -IC:/_64/msys_630/1.0/local/include -LC:/_64/msys_630/1.0/local/lib --prefix=C:/_64/msys_630/1.0/local
&& make && make test && make install

Works beautifully ... except that libssl.a and libcrypto.a turn out to be
32-bit builds !!
That is, the built library works fine with the same vendor's 32-bit compiler
(gcc version 6.3.0 (i686-posix-sjlj-rev1, Built by MinGW-W64 project)), but
the x64 compiler that built the damned things regards them as incompatible.

I'm thinking that I just need to specify an -m64 switch in there. How do I
do that ?

I did try adding the 'os/compiler:mingw64' to the ./config args, but that
resulted in:

$ ./config no-shared
zlib -IC:/_64/msys_630/1.0/local/include -LC:/_64/msys_630/1.0/local/lib --prefix=C:/_64/msys_630/1.0/local
os/compiler:mingw64 && make && make test && make install
Operating system: x86_64-whatever-mingw
Configuring for mingw
Configuring OpenSSL version 1.1.0e (0x1010005fL)
target already defined - mingw (offending arg: os/compiler:mingw64)

Having spent quite a few hours just getting to this diagnosis, I've now
settled for simply asking the dumb question.
(Sorry.)

Cheers,
Rob 



More information about the openssl-users mailing list