Project

General

Profile

Actions

Bug #21327

closed

Windows builds seem broken after clock_gettime changes?

Added by zenspider (Ryan Davis) 22 days ago. Updated 15 days ago.

Status:
Closed
Target version:
-
[ruby-core:121994]

Description

https://github.com/ruby/ruby/actions/workflows/windows.yml

not sure how stable windows normally is, but this looks consistent since this commit (5855986)

Assigning to nobu to investigate.

Actions #1

Updated by hsbt (Hiroshi SHIBATA) 20 days ago

  • Status changed from Open to Assigned

Updated by MSP-Greg (Greg L) 19 days ago

I just tested this with the ruby_3_4 branch. It's failing with:

../ruby/win32/win32.c:4795:1: error: redefinition of 'clock_gettime'
 4795 | clock_gettime(clockid_t clock_id, struct timespec *sp)
      | ^~~~~~~~~~~~~
In file included from C:/msys64/ucrt64/include/time.h:323,
                 from C:/msys64/ucrt64/include/iptypes.h:16,
                 from C:/msys64/ucrt64/include/iphlpapi.h:17,
                 from ../ruby/include/ruby/win32.h:40,
                 from ../ruby/include/ruby/internal/dosish.h:38,
                 from ../ruby/include/ruby/defines.h:78,
                 from ../ruby/include/ruby/ruby.h:25,
                 from ../ruby/win32/win32.c:24:
C:/msys64/ucrt64/include/pthread_time.h:111:35: note: previous definition of 'clock_gettime' with type 'int(clockid_t,  struct timespec *)' {aka 'int(int,  struct timespec *)'}
  111 | WINPTHREAD_CLOCK_DECL int __cdecl clock_gettime(clockid_t clock_id, struct timespec *tp)
      |                                   ^~~~~~~~~~~~~
../ruby/win32/win32.c:4835:1: error: redefinition of 'clock_getres'
 4835 | clock_getres(clockid_t clock_id, struct timespec *sp)
      | ^~~~~~~~~~~~
C:/msys64/ucrt64/include/pthread_time.h:100:35: note: previous definition of 'clock_getres' with type 'int(clockid_t,  struct timespec *)' {aka 'int(int,  struct timespec *)'}
  100 | WINPTHREAD_CLOCK_DECL int __cdecl clock_getres(clockid_t clock_id, struct timespec *res)

Can this be backported to 3.4, 3.3, & 3.2, similar to the gcc 15 fix?

Actions #4

Updated by k0kubun (Takashi Kokubun) 19 days ago

  • Backport changed from 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN to 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED
Actions #5

Updated by k0kubun (Takashi Kokubun) 19 days ago

  • Status changed from Assigned to Closed

Applied in changeset git|65e02ab1a6e4482f417ec1d1cb4453958ad36ca3.


merge revision(s) 3e47e7a499acd256be549935fcb559d3c82e556c, b48b841378f80e16378ceb83f3b78e52df9ae023, 2fe8b9cd3d308d754f3d33a948dfb1dd782a10dc: [Backport #21327]

    Fix redefinition of `clock_gettime` and `clock_getres`

    winpthreads-git 12.0.0.r720 provides `clock_gettime` and
    `clock_getres` as inline functions.

    digest.so needs ruby/digest.h which is installed by build-ext

    Copy to path with the base name

Updated by k0kubun (Takashi Kokubun) 19 days ago

  • Backport changed from 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED to 3.2: REQUIRED, 3.3: REQUIRED, 3.4: DONE

Updated by nagachika (Tomoyuki Chikanaga) 15 days ago

  • Backport changed from 3.2: REQUIRED, 3.3: REQUIRED, 3.4: DONE to 3.2: REQUIRED, 3.3: DONE, 3.4: DONE

ruby_3_3 a3adc05a4e1f5c5d1cd95eee92da9693b23360bf merge revision(s) 3e47e7a499acd256be549935fcb559d3c82e556c, 46e4c8673747de96838d2c5dec37446d23d99d88

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like1Like1Like0