Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building faild on cygwin #19531

Closed
affggh opened this issue Oct 28, 2022 · 10 comments
Closed

Building faild on cygwin #19531

affggh opened this issue Oct 28, 2022 · 10 comments
Labels
branch: master Merge to master branch help wanted triaged: bug The issue/pr is/fixes a bug

Comments

@affggh
Copy link

affggh commented Oct 28, 2022

In file included from providers/implementations/storemgmt/winstore_store.c:27:
/usr/include/w32api/wincrypt.h:20:11: error: unknown type name ‘LONG’
   20 |   typedef LONG HRESULT;
      |           ^~~~
In file included from providers/implementations/storemgmt/winstore_store.c:27:
/usr/include/w32api/wincrypt.h:283:11: error: unknown type name ‘ULONG_PTR’
  283 |   typedef ULONG_PTR HCRYPTHASH;
      |           ^~~~~~~~~
/usr/include/w32api/wincrypt.h:284:11: error: unknown type name ‘ULONG_PTR’
  284 |   typedef ULONG_PTR HCRYPTKEY;
      |           ^~~~~~~~~
/usr/include/w32api/wincrypt.h:285:11: error: unknown type name ‘ULONG_PTR’
  285 |   typedef ULONG_PTR HCRYPTPROV;
      |           ^~~~~~~~~
/usr/include/w32api/wincrypt.h:628:5: error: unknown type name ‘DWORD’
  628 |     DWORD dwVersion;
      |     ^~~~~
/usr/include/w32api/wincrypt.h:630:5: error: unknown type name ‘BYTE’
  630 |     BYTE *pbOID;
      |     ^~~~
/usr/include/w32api/wincrypt.h:631:5: error: unknown type name ‘DWORD’
  631 |     DWORD cbOID;
      |     ^~~~~
/usr/include/w32api/wincrypt.h:636:5: error: unknown type name ‘BYTE’
  636 |     BYTE *pbInnerString;
      |     ^~~~
/usr/include/w32api/wincrypt.h:637:5: error: unknown type name ‘DWORD’
  637 |     DWORD cbInnerString;
      |     ^~~~~
/usr/include/w32api/wincrypt.h:638:5: error: unknown type name ‘BYTE’
  638 |     BYTE *pbOuterString;
      |     ^~~~
/usr/include/w32api/wincrypt.h:639:5: error: unknown type name ‘DWORD’
  639 |     DWORD cbOuterString;
      |     ^~~~~
/usr/include/w32api/wincrypt.h:643:5: error: unknown type name ‘DWORD’
  643 |     DWORD dwUse;
      |     ^~~~~
/usr/include/w32api/wincrypt.h:645:5: error: unknown type name ‘DWORD’
  645 |     DWORD cBits;
      |     ^~~~~
/usr/include/w32api/wincrypt.h:646:5: error: unknown type name ‘DWORD’
  646 |     DWORD dwFlags;
      |     ^~~~~
/usr/include/w32api/wincrypt.h:647:5: error: unknown type name ‘DWORD’
  647 |     DWORD dwReserved;
      |     ^~~~~
/usr/include/w32api/wincrypt.h:656:5: error: unknown type name ‘DWORD’
  656 |     DWORD dwBitLen;
      |     ^~~~~
/usr/include/w32api/wincrypt.h:657:5: error: unknown type name ‘DWORD’
  657 |     DWORD dwNameLen;
      |     ^~~~~
/usr/include/w32api/wincrypt.h:658:5: error: unknown type name ‘CHAR’
  658 |     CHAR szName[20];
      |     ^~~~
/usr/include/w32api/wincrypt.h:663:5: error: unknown type name ‘DWORD’
  663 |     DWORD dwDefaultLen;
      |     ^~~~~
/usr/include/w32api/wincrypt.h:664:5: error: unknown type name ‘DWORD’
  664 |     DWORD dwMinLen;
      |     ^~~~~
/usr/include/w32api/wincrypt.h:665:5: error: unknown type name ‘DWORD’
  665 |     DWORD dwMaxLen;
      |     ^~~~~
/usr/include/w32api/wincrypt.h:666:5: error: unknown type name ‘DWORD’
  666 |     DWORD dwProtocols;
      |     ^~~~~
/usr/include/w32api/wincrypt.h:667:5: error: unknown type name ‘DWORD’
  667 |     DWORD dwNameLen;
      |     ^~~~~
/usr/include/w32api/wincrypt.h:668:5: error: unknown type name ‘CHAR’
......

Command build below

cd openssl
./config
make -j8

I just add

#ifdef __CYGWIN__
#include <Windows.h>
#endif

at providers/implementations/storemgmt/winstroe_stroe.c at line 26

after, I faced link error

Add Configurations10-main.conf

1563|         ex_libs          => add("-lcrypt32"),

then I Succeed build openssl.exe at cygwin terminal

@affggh affggh added the issue: bug report The issue was opened to report a bug label Oct 28, 2022
@affggh
Copy link
Author

affggh commented Oct 28, 2022

Hope you can fix. Thanks !

@mattcaswell mattcaswell added triaged: bug The issue/pr is/fixes a bug and removed issue: bug report The issue was opened to report a bug labels Oct 31, 2022
@t8m t8m added branch: master Merge to master branch help wanted labels Oct 31, 2022
@rakesh5283
Copy link

rakesh5283 commented Dec 3, 2022

@affggh

where did you add this line, I am still facing problem in CYGWIN

1563| ex_libs => add("-lcrypt32"),

image

@affggh
Copy link
Author

affggh commented Dec 3, 2022

@affggh

where did you add this line, I am still facing problem in CYGWIN

1563| ex_libs => add("-lcrypt32"),

image

Its in Configurations/Configurations10-main.conf
at line 1563
and then

./config
make

@rakesh5283
Copy link

@affggh Thanks for Reply.

But I already see that at Line number 1573,

image

@rakesh5283
Copy link

After doing above changes to config file..

I am still receiving errors as attached.

image

@affggh
Copy link
Author

affggh commented Dec 5, 2022

@affggh Thanks for Reply.

But I already see that at Line number 1573,

image

this mingw target is not working on cygwin

@affggh
Copy link
Author

affggh commented Dec 5, 2022

After doing above changes to config file..

I am still receiving errors as attached.

image

did you add -lctypt32 on cygwin target

@rakesh5283
Copy link

rakesh5283 commented Dec 5, 2022

Yes,

I did add that line.. see below screenshot. Line Number : 1563

image

@affggh
Copy link
Author

affggh commented Dec 5, 2022

Yes,

I did add that line.. see below screenshot. Line Number : 1563

image

you should insert it at cygwin target,not mingw

@rakesh5283
Copy link

Thanks Buddy!!

It working now..

baentsch added a commit to baentsch/openssl that referenced this issue May 22, 2023
baentsch added a commit to baentsch/openssl that referenced this issue Jun 7, 2023
baentsch added a commit to baentsch/openssl that referenced this issue Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch: master Merge to master branch help wanted triaged: bug The issue/pr is/fixes a bug
Projects
None yet
Development

No branches or pull requests

4 participants