Skip to content

Make library work with OpenBSD - #6

Open
codesoap wants to merge 1 commit into
jkl1337:masterfrom
codesoap:fix_openbsd
Open

Make library work with OpenBSD#6
codesoap wants to merge 1 commit into
jkl1337:masterfrom
codesoap:fix_openbsd

Conversation

@codesoap

@codesoap codesoap commented Jan 6, 2026

Copy link
Copy Markdown

On OpenBSD I got the following error message:

PC=0x0 m=0 sigcode=1 addr=0x0
signal arrived during cgo execution

goroutine 1 gp=0xc000002540 m=0 mp=0x352b40 [syscall]:
runtime.cgocall(0x348e20, 0xc000051eb8)
        /usr/local/go/src/runtime/cgocall.go:167 +0x56 fp=0xc000051e90 sp=0xc000051e58 pc=0x324a56
github.com/jkl1337/go-mediainfo._Cfunc_g_MediaInfo_New()
        _cgo_gotypes.go:211 +0x47 fp=0xc000051eb8 sp=0xc000051e90 pc=0x347bc7
github.com/jkl1337/go-mediainfo.New()
...

Using the static variant of the library (MediaInfoDLL/MediaInfoDLL_Static.h instead of MediaInfoDLL/MediaInfoDLL.h) seems to solve the issue. Instead of copying the header file in the Repository, I am now including the installed header file. Unfortunately I'm not familiar enough with C to understand why this works and the dynamic variant didn't.

I have also added the additional paths needed to find the library on OpenBSD.

I have tested successfully on Linux and OpenBSD, but don't have access to a Darwin machine.

The dynamic use of the library led to a segmentation violation on
OpenBSD.
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