Skip to content

error: ‘pthread_mutex_t’ has no member named ‘abi’ in refc with reset/{.exportc.} #25205

@tersec

Description

@tersec

Nim Version

Nim Compiler Version 2.2.4 [Linux: amd64]
Compiled at 2025-10-06
Copyright (c) 2006-2025 by Andreas Rumpf

git hash: f7145dd26efeeeb6eeae6fff649db244d81b212d
active boot switches: -d:release
Nim Compiler Version 2.2.5 [Linux: amd64]
Compiled at 2025-10-06
Copyright (c) 2006-2025 by Andreas Rumpf

git hash: cfe163795f3a8ac8ecf11dc0ab788a3758b2a32e
active boot switches: -d:release
Nim Compiler Version 2.3.1 [Linux: amd64]
Compiled at 2025-10-06
Copyright (c) 2006-2025 by Andreas Rumpf

git hash: 483389d3999e243d7c61647c55187b0578dc57ee
active boot switches: -d:release
gcc (Debian 15.2.0-4) 15.2.0
Copyright (C) 2025 Free Software Foundation, Inc.

Description

import std/locks

type
  S = object
    r: proc()

  B = object
    d: Lock
    w: S

proc v(x: ptr B) {.exportc.} = reset(x[])

Current Output

CC: system/exceptions.nim
CC: std/private/digitsutils.nim
CC: system/dollars.nim
CC: std/typedthreads.nim
CC: sharedlist.nim
CC: system.nim
CC: types.nim
/tmp/tmp.m32umU53cV/@psystem.nim.c: In function ‘reset__types_u10’:
/tmp/tmp.m32umU53cV/@psystem.nim.c:5491:20: error: ‘pthread_mutex_t’ has no member named ‘abi’
 5491 |         (*obj_p0).d.abi[T1_] = 0;

Expected Output

No C compilation error

Known Workarounds

No response

Additional Information

No response

Metadata

Metadata

Assignees

Labels

refcrefc issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions