Tried building the gowhatsapp plugin for Pidgin. The bulk of that code is written in Go and linked into a library using the c-archive mode.
What did you see happen?
go build -buildmode=c-archive -o /wrkdirs/usr/ports/net-im/purple-gowhatsapp/work/.build/src/go/purple-go-whatsapp.a bridge.go login.go handler.go send_message.go handle_message.go logger.go send_file.go mark_read.go presence.go profile.go send_file_checks.go message_cache.go conversations.go groups.go
FAILED: src/go/purple-go-whatsapp.a src/go/purple-go-whatsapp.h /wrkdirs/usr/ports/net-im/purple-gowhatsapp/work/.build/src/go/purple-go-whatsapp.a /wrkdirs/usr/ports/net-im/purple-gowhatsapp/work/.build/src/go/purple-go-whatsapp.h
cd /wrkdirs/usr/ports/net-im/purple-gowhatsapp/work/purple-gowhatsapp-1.13.0/src/go && /usr/local/bin/cmake -E env GOPATH=/wrkdirs/usr/ports/net-im/purple-gowhatsapp/work/.build/src/go/go CGO_LDFLAGS="/wrkdirs/usr/ports/net-im/purple-gowhatsapp/work/.build/src/go/libpurple-dummy.a" go build -buildmode=c-archive -o /wrkdirs/usr/ports/net-im/purple-gowhatsapp/work/.build/src/go/purple-go-whatsapp.a bridge.go login.go handler.go send_message.go handle_message.go logger.go send_file.go mark_read.go presence.go profile.go send_file_checks.go message_cache.go conversations.go groups.go
# command-line-arguments
invalid value "c-archive" for flag -buildmode: buildmode c-archive not supported on freebsd/386
What did you expect to see?
Successful linking. Apparently, when it comes to FreeBSD, the c-archive (and c-shared) modes are only supported for the amd64 hardware. Other platforms -- like i386 or arm (see earlier request #44084), mips, etcætera -- fail...
A quick search shows, support for Darwin is wider (see #12683, for example), than for FreeBSD, which gives hope, it can be expanded to cover FreeBSD with relative ease: because Darwin itself is a FreeBSD derivative...
Go version
go version go1.21.5 freebsd/386
Output of
go env
in your module/workspace:What did you do?
Tried building the gowhatsapp plugin for Pidgin. The bulk of that code is written in Go and linked into a library using the
c-archive
mode.What did you see happen?
What did you expect to see?
Successful linking. Apparently, when it comes to FreeBSD, the c-archive (and c-shared) modes are only supported for the amd64 hardware. Other platforms -- like i386 or arm (see earlier request #44084), mips, etcætera -- fail...
A quick search shows, support for Darwin is wider (see #12683, for example), than for FreeBSD, which gives hope, it can be expanded to cover FreeBSD with relative ease: because Darwin itself is a FreeBSD derivative...