Skip to content

link: duplicated definition of symbol callbackasm1 #15

@zhhc99

Description

@zhhc99

tldr: goffi conflicts with purego for now.

Environment

  • Fedora 43, Wayland
  • go 1.25.5

To reproduce

create an empty project:

require (
	github.com/ebitengine/purego v0.9.1
	github.com/gogpu/gogpu v0.9.2
)
package main

import (
	_ "github.com/ebitengine/purego"
	_ "github.com/go-webgpu/goffi/ffi"
)

func main() {
	// linker crys even if you do nothing here
}

and run/build:

$ CGO_ENABLED=0 go run main.go
# command-line-arguments
link: duplicated definition of symbol callbackasm1, from github.com/ebitengine/purego (type STEXT size 276) and github.com/go-webgpu/goffi/ffi (type STEXT size 176)

likely reason

It appears that goffi internalises assembly code from purego but keeps the same global symbol names. There can be other duplicated symbols (maybe rename them to goffi_callbackasm1 stuffs).

CGO_ENABLED=1 does not help. See issue.

Metadata

Metadata

Assignees

Labels

area: assemblyPlatform-specific assembly (ABI)area: callbacksC-to-Go callback trampolineseffort: 3Medium, ~1 dayfeature: interopLibrary ecosystem interop (purego, cgo)priority: highImportant for next releasetype: bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions