Actions
Bug #21328
closedGem::Ext::BuildError: ERROR: Failed to build gem native extension.
Description
We are facing an issue that starts in 05/03/2025
We have an Azure Devops Pipeline that build and test a project, but in the test step we have the following error:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
C:/hostedtoolcache/windows/Ruby/3.3.8/x64/lib/ruby/gems/3.3.0/gems/ffi-1.16.3/ext/ffi_c
'/c/hostedtoolcache/windows/Ruby/3.3.8/x64/lib/ruby/gems/3.3.0/gems/ffi-1.16.3/ext/ffi_c/libffi-x64-mingw-ucrt'
2025-05-08T20:17:16.1292182Z compiling AbstractMemory.c
2025-05-08T20:17:16.1293918Z AbstractMemory.c: In function 'rbffi_AbstractMemory_Init':
2025-05-08T20:17:16.1379827Z AbstractMemory.c(816,49): error G9F317667: passing argument 3 of 'rb_define_method' from [C:\Users\VssAdministrator\.nuget\packages\project.msbuild.sdk\8.0.10-platform-debuggi0004\build\Chef\ChefDependencies.proj] [D:\a\1\s\Tests\ChefUnitTests\ChefUnitTests.csproj]
2025-05-08T20:17:16.1382541Z incompatible pointer type [-Wincompatible-pointer-types]
2025-05-08T20:17:16.1384491Z 816 | rb_define_method(classMemory, "put_" #type, memory_put_##type, 2); \
2025-05-08T20:17:16.1386316Z | ^~~~~~~~~~~
2025-05-08T20:17:16.1388056Z | |
2025-05-08T20:17:16.1389784Z | VALUE (*)(VALUE, VALUE,
2025-05-08T20:17:16.1391627Z VALUE) {aka long long unsigned int (*)(long long unsigned int, long long
2025-05-08T20:17:16.1393395Z unsigned int, long long unsigned int)}
2025-05-08T20:17:16.1395349Z AbstractMemory.c:833:5: note: in expansion of macro 'INT'
2025-05-08T20:17:16.1397142Z 833 | INT(int8);
2025-05-08T20:17:16.1398853Z | ^~~
2025-05-08T20:17:16.1400582Z In file included from
2025-05-08T20:17:16.1402347Z C:/hostedtoolcache/windows/Ruby/3.3.8/x64/include/ruby-3.3.0/ruby/internal/anyargs.h:78,
2025-05-08T20:17:16.1404181Z from
2025-05-08T20:17:16.1406077Z C:/hostedtoolcache/windows/Ruby/3.3.8/x64/include/ruby-3.3.0/ruby/ruby.h:27,
2025-05-08T20:17:16.1407838Z from
2025-05-08T20:17:16.1409590Z C:/hostedtoolcache/windows/Ruby/3.3.8/x64/include/ruby-3.3.0/ruby.h:38,
2025-05-08T20:17:16.1411368Z from AbstractMemory.c:40:
2025-05-08T20:17:16.1413229Z C:/hostedtoolcache/windows/Ruby/3.3.8/x64/include/ruby-3.3.0/ruby/internal/method.h:99:61:
2025-05-08T20:17:16.1415037Z note: expected 'VALUE (*)(void)' {aka 'long long unsigned int (*)(void)'} but
2025-05-08T20:17:16.1417112Z argument is of type 'VALUE (*)(VALUE, VALUE, VALUE)' {aka 'long long unsigned
2025-05-08T20:17:16.1419032Z int (*)(long long unsigned int, long long unsigned int, long long unsigned
2025-05-08T20:17:16.1420785Z int)'}
2025-05-08T20:17:16.1422532Z 99 | void rb_define_method(VALUE klass, const char *mid, VALUE
2025-05-08T20:17:16.1424350Z (*func)(ANYARGS), int arity);
2025-05-08T20:17:16.1427260Z |
2025-05-08T20:17:16.1429021Z ~~~~~~~~^~~~~~~~~~~~~~
2025-05-08T20:17:16.1430845Z AbstractMemory.c:96:1: note: 'memory_put_int8' declared here
2025-05-08T20:17:16.1432652Z 96 | memory_put_##name(VALUE self, VALUE offset, VALUE value) \
2025-05-08T20:17:16.1434412Z | ^~~~~~~~~~~
2025-05-08T20:17:16.1436168Z AbstractMemory.c:259:1: note: in expansion of macro 'NUM_OP'
2025-05-08T20:17:16.1438040Z 259 | NUM_OP(int8, int8_t, NUM2INT, INT2NUM, NOSWAP);
2025-05-08T20:17:16.1439757Z | ^~~~~~
2025-05-08T20:17:16.1446346Z AbstractMemory.c(817,49): error G9F317667: passing argument 3 of 'rb_define_method' from [C:\Users\VssAdministrator\.nuget\packages\project.msbuild.sdk\8.0.10-platform-debuggi0004\build\Chef\ChefDependencies.proj] [D:\a\1\s\Tests\ChefUnitTests\ChefUnitTests.csproj]
2025-05-08T20:17:16.1448813Z incompatible pointer type [-Wincompatible-pointer-types]
2025-05-08T20:17:16.1450695Z 817 | rb_define_method(classMemory, "get_" #type, memory_get_##type, 1); \
2025-05-08T20:17:16.1452471Z | ^~~~~~~~~~~
2025-05-08T20:17:16.1454208Z | |
2025-05-08T20:17:16.1455919Z | VALUE (*)(VALUE, VALUE)
2025-05-08T20:17:16.1457703Z {aka long long unsigned int (*)(long long unsigned int, long long unsigned
2025-05-08T20:17:16.1459434Z int)}
2025-05-08T20:17:16.1461252Z AbstractMemory.c:833:5: note: in expansion of macro 'INT'
2025-05-08T20:17:16.1463024Z 833 | INT(int8);
2025-05-08T20:17:16.1464707Z | ^~~
Any ideas or how can we fix that?
Updated by mame (Yusuke Endoh) 2 days ago
- Is duplicate of Bug #21286: Windows - MSYS2 just updated to GCC 15.1.0, builds failing added
Updated by mame (Yusuke Endoh) 2 days ago
- Status changed from Open to Closed
I believe this is the same issue as #21286.
Please apply the patch of https://github.com/ruby/ruby/pull/13202 yourself, or wait for Ruby 3.3.9.
Updated by mame (Yusuke Endoh) 2 days ago
Or, use GCC 14 for a while, if possible. (I am not familiar with MSYS2)
Actions
Like0
Like0Like0Like1Like0Like0