openssl / openssl

TLS/SSL and crypto library
https://www.openssl.org
Apache License 2.0
25.91k stars 10.15k forks source link

Embarcadero (11.ver last ) "make -N" => Error openssl.rc 1 11: Cannot open file: winver.h #23181

Open andrys2007 opened 10 months ago

andrys2007 commented 10 months ago

Embarcadero (11.ver last ) "make -N" => Error openssl.rc 1 11: Cannot open file: winver.h

t8m commented 10 months ago

Embarcadero is currently unsupported/unadopted platform but if anybody submits a PR with a fix we would gladly accept it.

andrys2007 commented 10 months ago

Why do you put this then:

"Native builds using Embarcadero C++Builder

This toolchain (a descendant of Turbo/Borland C++) is an alternative to MSVC. OpenSSL currently includes an experimental 32-bit configuration targeting the Clang-based compiler (bcc32c.exe) in v10.3.3 Community Edition. https://www.embarcadero.com/products/cbuilder/starter

  1. Install Perl.

  2. Open the RAD Studio Command Prompt.

  3. Go to the root of the OpenSSL source directory and run: perl Configure BC-32 --prefix=%CD%

  4. make -N

  5. make -N test

  6. Build your program against this OpenSSL:

    • Set your include search path to the "include" subdirectory of OpenSSL.
    • Set your library search path to the OpenSSL source directory.

Note that this is very experimental. Support for 64-bit and other Configure options is still pending."

===========

Then remove this, and there won't be any questions.

andrys2007 commented 10 months ago

If you claim that it supports something, it should support it in some way. And if it doesn't work, then why mention it at all?

andrys2007 commented 10 months ago

Removing OpenSSL. You can close the ticket

t8m commented 10 months ago

As I said we would welcome fixes that would make it work.

nhorman commented 10 months ago

@andrys2007 That documentation states that support for Embarcadero is very experimental. The official supported platforms page can be found here

andrys2007 commented 10 months ago

Opss....t8m ,hi. Can you make corrections to fix the error?

andrys2007 commented 10 months ago

Here is the place:

D:\Strawberry\perl\bin\perl.exe" "util\mkrc.pl" libcrypto > libcrypto.rc "brcc32" -i"\include\windows\sdk" -folibcrypto-shlib-libcrypto.res "libcrypto.rc" Borland Resource Compiler Version 5.40 Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved. Error libcrypto.rc 1 11: Cannot open file: winver.h error 20018 deleting libcrypto-shlib-libcrypto.res error 1 deleting build_sw

nhorman commented 10 months ago

There may not be anything to fix in the openssl tree here. mkrc.pl builds a resource file that has the line:

#include <winver.h>

Working on the fact that winver.h is part of the windows system header file set, and available in the standard include path. Based on the error above, it would seem to me that the solution would be to identify where on this system winver.h was located (I would have thought it would be in include/windows/sdk, but apparently I'm mistaken), and make sure that the path where it actually exists gets included by adding that path.

From the looks of this:

-i"\include\windows\sdk" 

Its possible that we're just not looking in the right place. If your SDK isn't installed in the root directory you might just need to set the root path, which I think you can do with the BDS environment variable

andrys2007 commented 10 months ago

When an error occurs, I manually open the "libcrypto.rc" file and in the include section, I specify the full path to "winver.h," and then it proceeds. However, later, other compiler version mismatch errors arise.

andrys2007 commented 10 months ago

built with bcc32 compiler; expected the bcc32c compiler because of 'D:\OPENSSL\CRYPTO\AES\LIBCRYPTO-SHLIB-AES_CBC.OBJ'. Warning: Compiler mismatch. Module 'C:\PROGRAM FILES (X86)\EMBARCADERO\STUDIO\22.0\LIB\WIN32\RELEASE\CW32MTI.LIB|fasttls' built with bcc32 compiler; expected the bcc32c compiler because of 'D:\OPENSSL\CRYPTO\AES\LIBCRYPTO-SHLIB-AES_CBC.OBJ'. Error: Unresolved external '_MemoryBarrier' referenced from D:\OPENSSL\CRYPTO\THREAD\ARCH\LIBCRYPTO-SHLIB-THREAD_WIN.OBJ Error: Unable to perform link