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

added CI for MinGW #536

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

RohanKrMahato
Copy link

Added CI for MinGW

While testing the MinGW_build_support, we needed CI to check if the implementation was correct.

Type of change

  • New feature (non-breaking change which adds functionality)

@viferga viferga marked this pull request as draft December 3, 2024 18:47
@viferga
Copy link
Member

viferga commented Dec 3, 2024

@RohanKrMahato you created the PR again but it's the same code as before, I can't see the build matrix..

@viferga
Copy link
Member

viferga commented Dec 3, 2024

I am leaving this here for reference: https://github.com/msys2/setup-msys2/blob/main/examples/cmake.yml

@RohanKrMahato
Copy link
Author

RohanKrMahato commented Dec 3, 2024

@viferga I was testing on my local machine and different branch on the forked repo. I will push here, a little bit of work remaining :)

@RohanKrMahato
Copy link
Author

RohanKrMahato commented Dec 4, 2024

@viferga
image
Added all the combination of Release and Debug, also added the Ctest in the Latest commit ... Sir, I have changed the shell from Msys2 shell to Cmd and it is now working fine (I mean, it is building till the function pointer error, which indicates, after this we need to add the cases for MinGW in the Metacall Core).

D:\a\core\core\source\loaders\ext_loader\source\ext_loader_impl.cpp:355:37: error: invalid 'static_cast' from type 'dynlink_symbol_addr' {aka 'void (*)()'} to type 'void*'
  355 |                 function_cast.ptr = static_cast<void *>(ext.addr);
      |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@RohanKrMahato
Copy link
Author

@viferga Sir, I'm sorry for the last comment, but what I noticed that changing the default Shell can have consequences, actually what was happening ( and why i thought it was working ) was that the cmd for all the test in Msys2 environment was taking the same compiler.

Note: Now I changed the Default shell to Msys2 however now Clang64 is working fine, but not MinGW 64,32 & Ucrt64 (it is giving the following error, may be it is because of the strict type conversion feature of compiler).

I'm attaching the error with MinGW64, (Ucrt also giving the similar error)

types]
  134 |                 NULL, 1, 0, (LPTSTR *)lpt_str, NULL);
      |                             ^~~~~~~~~~~~~~~~~
      |                             |
      |                             CHAR ** {aka char **}
In file included from D:/a/_temp/msys64/mingw64/include/windows.h:70,
                 from D:\a\core\core\source\log\source\log_policy_stream_syslog.c:23:
D:/a/_temp/msys64/mingw64/include/winbase.h:2578:165: note: expected 'const CHAR **' {aka 'const char **'} but argument is of type 'CHAR **' {aka 'char **'}
 2578 |   WINADVAPI WINBOOL WINAPI ReportEventA (HANDLE hEventLog, WORD wType, WORD wCategory, DWORD dwEventID, PSID lpUserSid, WORD wNumStrings, DWORD dwDataSize, LPCSTR *lpStrings, LPVOID lpRawData);
      |                                                                                                                                                             ~~~~~~~~^~~~~~~~~
mingw32-make[2]: *** [source\log\CMakeFiles\log.dir\build.make:469: source/log/CMakeFiles/log.dir/source/log_policy_stream_syslog.c.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:5501: source/log/CMakeFiles/log.dir/all] Error 2
mingw32-make: *** [Makefile:155: all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants