Skip to content

Revert "ci: add compiler flag to avoid build error" #881

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Watson1978
Copy link
Contributor

@Watson1978 Watson1978 commented Aug 23, 2025

Reverts #880

Unfortunately, this workflow still causes build error when compile libiconv.

2025-08-23T04:57:37.3576074Z -Wno-error=sign-conversion -O2 -g -fPIC
2025-08-23T04:57:37.3576954Z -DLIBDIR=\"C:/hostedtoolcache/windows/Ruby/3.4.5/x64/lib/ruby/gems/3.4.0/gems/nokogiri-1.18.9/ports/x64-mingw-ucrt/libiconv/1.17/lib\"
2025-08-23T04:57:37.3577964Z -DBUILDING_LIBICONV -DBUILDING_LIBCHARSET -DBUILDING_DLL -DENABLE_RELOCATABLE=1
2025-08-23T04:57:37.3578483Z -DIN_LIBRARY
2025-08-23T04:57:37.3579197Z -DINSTALLDIR=\"C:/hostedtoolcache/windows/Ruby/3.4.5/x64/lib/ruby/gems/3.4.0/gems/nokogiri-1.18.9/ports/x64-mingw-ucrt/libiconv/1.17/lib\"
2025-08-23T04:57:37.3580176Z -DNO_XMALLOC -Dset_relocation_prefix=libiconv_set_relocation_prefix
2025-08-23T04:57:37.3580832Z -Drelocate=libiconv_relocate -Drelocate2=libiconv_relocate2 -DHAVE_CONFIG_H -c
2025-08-23T04:57:37.3581376Z ./iconv.c -o iconv.o
2025-08-23T04:57:37.3581646Z In file included from ./loops.h:23,
2025-08-23T04:57:37.3581982Z                  from ./iconv.c:148:
2025-08-23T04:57:37.3582411Z ./loop_wchar.h:39:17: error: conflicting types for 'mbrtowc'; have
2025-08-23T04:57:37.3582923Z 'size_t(void)' {aka 'long long unsigned int(void)'}
2025-08-23T04:57:37.3584151Z    39 |   extern size_t mbrtowc ();
2025-08-23T04:57:37.3584503Z       |                 ^~~~~~~
2025-08-23T04:57:37.3584835Z In file included from ../include/iconv.h:118,
2025-08-23T04:57:37.3585189Z                  from ./iconv.c:20:
2025-08-23T04:57:37.3585692Z D:/a/_temp/msys64/ucrt64/include/wchar.h:1212:18: note: previous declaration of
2025-08-23T04:57:37.3586384Z 'mbrtowc' with type 'size_t(wchar_t * restrict,  const char * restrict,  size_t,
2025-08-23T04:57:37.3587010Z mbstate_t * restrict)' {aka 'long long unsigned int(short unsigned int *
2025-08-23T04:57:37.3587604Z restrict,  const char * restrict,  long long unsigned int,  mbstate_t *
2025-08-23T04:57:37.3588045Z restrict)'}
2025-08-23T04:57:37.3588392Z 1212 |   size_t __cdecl mbrtowc(wchar_t * __restrict__ _DstCh,const char *
2025-08-23T04:57:37.3588985Z __restrict__ _SrcCh,size_t _SizeInBytes,mbstate_t * __restrict__ _State);
2025-08-23T04:57:37.3589441Z       |                  ^~~~~~~
2025-08-23T04:57:37.3589788Z ./loop_wchar.h: In function 'wchar_to_loop_convert':
2025-08-23T04:57:37.3590325Z ./loop_wchar.h:356:15: error: too many arguments to function 'mbrtowc'; expected
2025-08-23T04:57:37.3590746Z 0, have 4
2025-08-23T04:57:37.3590963Z   356 |         res = mbrtowc(&wc,buf,bufcount,&state);
2025-08-23T04:57:37.3591246Z       |               ^~~~~~~ ~~~

To build libiconv1.17, seems we need to either downgrade the gcc version or modify the source code.

If libiconv 1.18, looks like we can be able to build with gcc 15.2.
So, we need to wait for a release of nokogiri that uses libiconv 1.18.

Reported to sparklemotion/nokogiri#3543

@Watson1978 Watson1978 force-pushed the revert-880-avoid-build-error branch from 264f100 to 1acdd30 Compare August 23, 2025 06:29
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.

1 participant