Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devdraw doesn't work on AIX #122

Open
bhuntsman opened this issue Feb 17, 2025 · 0 comments
Open

devdraw doesn't work on AIX #122

bhuntsman opened this issue Feb 17, 2025 · 0 comments

Comments

@bhuntsman
Copy link

The Go port of devdraw does not work on AIX, even though Go itself does. While devdraw itself can be built on AIX, when running sam or acme, an error similar to the following is displayed:

$ sam
devdraw: no driver for accessing a screen
samterm: drawinit: EOF

This is because AIX is not supported in the upstream module golang.org/x/exp/shiny/driver. The following local modification to golang.org/x/exp adds support:

diff --git a/shiny/driver/driver_fallback.go b/shiny/driver/driver_fallback.go
index e36fbc5..9c9b01c 100644
--- a/shiny/driver/driver_fallback.go
+++ b/shiny/driver/driver_fallback.go
@@ -2,12 +2,13 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build !darwin && (!linux || android) && !windows && !dragonfly && !openbsd
+//go:build !darwin && (!linux || android) && !windows && !dragonfly && !openbsd && !aix
 // +build !darwin
 // +build !linux android
 // +build !windows
 // +build !dragonfly
 // +build !openbsd
+// +build !aix
 
 package driver
 
diff --git a/shiny/driver/driver_x11.go b/shiny/driver/driver_x11.go
index bc24238..e205638 100644
--- a/shiny/driver/driver_x11.go
+++ b/shiny/driver/driver_x11.go
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build (linux && !android) || dragonfly || openbsd
-// +build linux,!android dragonfly openbsd
+//go:build (linux && !android) || dragonfly || openbsd || aix
+// +build linux,!android dragonfly openbsd aix
 
 package driver

However, with that modification in place, errors such as the following are seen on the command line:

$ sam
XGB: conn.go:47: Could not get authority info: EOF
XGB: conn.go:48: Trying connection without authority info...
devdraw: x11driver: xgb.NewConn failed: EOF
samterm: drawinit: EOF

This might entirely be the fault of the exp module, not actually devdraw, but wasn't sure, so I'm reporting it here as well.

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

No branches or pull requests

1 participant