Windows Go programs not running under Wine anymore.

1,348 views
Skip to first unread message

Bruno Albuquerque

unread,
Dec 14, 2023, 3:52:26 PM12/14/23
to golang-nuts
I know this is not a common thing so here goes nothing.

Apparently the change below broke Windows apps when running under Wine as it made bcryptprimitives.dll a hard requirement now and this dll is not bundled with Wine. This is true even for programs that do not use it all (like a simple "hello world" program).

https://github.com/golang/go/commit/693def151adff1af707d82d28f55dba81ceb08e1

Here is what I see:

bga@rincewind:~$ cat hello.go
package main

import "fmt"

func main() {
fmt.Println("Hello World!")
}
bga@rincewind:~$ GOOS=windows go build hello.go
bga@rincewind:~$ wine hello.exe
fatal error: bcryptprimitives.dll not found
runtime: panic before malloc heap initialized
wine: Unhandled page fault on execute access to 0000000000000000 at address 0000000000000000 (thread 0108), starting debugger...
[...]

This is with go 1.21.5. It works fine with go 1.21.4 (there is no such requirement in this version).

-Bruno

Juliusz Chroboczek

unread,
Dec 17, 2023, 2:32:00 PM12/17/23
to golan...@googlegroups.com
> Apparently the change below broke Windows apps when running under Wine as
> it made bcryptprimitives.dll a hard requirement now and this dll is not
> bundled with Wine. This is true even for programs that do not use it all
> (like a simple "hello world" program).
>
> https://github.com/golang/go/commit/693def151adff1af707d82d28f55dba81ceb08e1

I can confirm this issue. I think it's a significant issue, since it's
convenient to be able to quickly run Windows tests without the hassle of
booting a Windows VM.

Could you please file a bug?

Bruno Albuquerque

unread,
Dec 17, 2023, 3:52:57 PM12/17/23
to Juliusz Chroboczek, golan...@googlegroups.com
Apparently wine 9.0 rc2 includes bcryptprimitives.dll now (I tested on it and it did work). So I guess it sorted itself.

-Bruno


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/87fs00zkvr.fsf%40pirx.irif.fr.

Juliusz Chroboczek

unread,
Dec 17, 2023, 5:55:42 PM12/17/23
to golan...@googlegroups.com
> Apparently wine 9.0 rc2 includes bcryptprimitives.dll now (I tested on it
> and it did work).

Thanks for the hint, it apparently works with 8.19 (wine-development in
Debian).


Reply all
Reply to author
Forward
0 new messages