Skip to content

go 1.24-1.25: build failures against libpact_ffi #550

@bmomberger-bitovi

Description

@bmomberger-bitovi

Tested on:

  • Win64, Go 1.25.4 (from scoop), libpact_ffi 0.4.16, pact-go 2.0.5,
  • Ubuntu 24.04.3 in WSL, Go 1.25.4 (from snap), libpact_ffi 0.4.28, pact-go 2.4.2
  • Ubuntu 24.04.3 in WSL, Go 1.24.0 (d/l'ed by apt-get golang-1.23-go package), libpact_ffi 0.4.28, pact-go 2.4.2

When trying to run a test suite using pact-go on Go 1.25, I encounter this error that fails the build and further fails the test:

# github.com/pact-foundation/pact-go/v2/internal/native
cgo: inconsistent definitions for C.pactffi_given_with_param
cgo: inconsistent definitions for C.pactffi_given
FAIL    <containing folder of test files> [build failed]
FAIL

A known-good configuration in the above Ubuntu includes:

  • Go 1.23.3 d/l'ed by apt-get golang-1.23-go package),
  • pact-go 2.0.5
  • libpact_ffi 0.4.28
    When using this config, the tests build and run as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageThis issue is yet to be triaged by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions