Closed 99z closed 5 years ago
That is because I do not have an OpenBSD binary build. You will need to get libui Alpha 4.1 source code and build it in static mode (cmake -DBUILD_SHARED_LIBS=OFF
, as Alpha 4.1 still used cmake), then copy the resultant libui.a
file to libui_openbsd_ARCH.a
and create an appropriatelink_openbsd_ARCH.go
(copying the Linux one and changing the filenames within should be sufficient).
If there was an OpenBSD CI environment I could use I could avoid the need to manually do this in the future...
Thanks for the reply - I will give this a go on Monday.
This worked wonderfully.
I built Alpha 4.1 using cmake -DBUILD_SHARED_LIBS=OFF
. Copied the resulting libui.a
from build/meson-out
to $GOPATH/src/github.com/andlabs/ui
as libui_openbsd_amd64.a
. Then made the link_openbsd_amd64.go
file with the contents:
// +build !windows
// +build !darwin
// 11 december 2015
package ui
// #cgo LDFLAGS: ${SRCDIR}/libui_openbsd_amd64.a -lm
// #cgo pkg-config: gtk+-3.0
import "C"
Note that on {Open/Free?/Net?}BSD there is no libdl
as the functionality is included inlibc
, so removing -ldl
was necessary.
Cheers.
Yeah. On meson I set libdl and libm as optional dependencies specifically to avoid that issue, but we'll see what that means for the Go code or for the documentation... Either way, glad to see it works! (One day I will devote the time to set up a VM so I can do this locally again...)
go env
go get -u github.com/andlabs/ui/...