Hi,

The current release of brltty does not compile on OpenBSD due to some missing 
includes:

In Programs/beep_wskbd.c, we need to add <sys/ioctl.h> and <time.h> before 
wsconsio.h.
In Programs/rgx_internal.h, the path to pcre2.h needs to be 
/usr/local/include/pcre2.h, (pcre2 is not part of the base system on OpenBSD, 
but can be installed from a package).

With these changes, it's possible to compile brltty-6.5 on OpenBSD 7.3 using 
the following configure options:

./configure --disable-speech-support --disable-api --without-pcm-package 
--disable-icu

It's also necessary to use gmake rather than the native bsd make for the build.

The resulting binaries seem to run OK, but I've only done basic testing using 
the XW driver for a virtual braille display in X.

However, the system is not fully usable:

Overall, support for running brltty on OpenBSD is not as comprehensive as it is 
for Linux systems.  This was mentioned last month in a post to one of the 
OpenBSD mailing lists [1].

A quick aside - I'm not a regular user of brltty on any platform, and only 
became aware of this issue when I read the above linked mailing list post.  The 
main reason I started looking in to it is because I've been doing various 
development on the OpenBSD console code for some time, and noticed that on 
OpenBSD brltty has always used a patched version of screen to provide access to 
the display, since the method used on Linux systems, (reading from /dev/vcsa0), 
is not available on OpenBSD.  Writing a kernel patch to provide a vcsa-like 
device on OpenBSD seemed fairly trivial, (and in fact it was), so I began to 
look further at whether getting a modern version of brltty properly running on 
OpenBSD, (as requested in the above post), would be practical.

The documentation on brltty.com still refers to OpenBSD 3.4, which was released 
in 2003, and screen-4.0.1.  Obviously things have moved on quite a lot in the 
last 20 years.  The shm patched version of screen which is maintained in the 
OpenBSD ports tree has been updated to 4.0.3, but this is still very out of 
date.  Discussion in 2021 floated the idea of interfacing with tmux instead [2].

For testing purposes, I was able to use the patched version of screen-4.0.3 
together with brltty-6.5 compiled as described above on an OpenBSD 7.3 system, 
using the XW driver.  It displayed what seemed to be the correct output in the 
brltty X window.

Having got this far, I was hoping to get brltty working with my new vcsa-like 
kernel device.  Unfortunately, the relevant screen driver code is quite 
linux-specific and uses various interfaces that are not present on OpenBSD.  If 
this functionality was ever going to be added to brltty, it would probably be 
better to have a separate screen driver for the OpenBSD console, and in that 
case it wouldn't make much sense for my kernel patch to necessarily emulate the 
data format of the linux vcsa device at all, we might as well send the data out 
as the raw unicode codepoints from the wscons display buffer.  This would 
likely keep the code simpler, and potentially give more flexibility when 
handling non-ASCII characters.

At this point, I can't really do much more to make any further progress that 
would be useful to the wider community of brltty users.  I'm hoping that there 
are some brltty developers who are interested in the OpenBSD platform that can 
make use of the information I've provided above.

[1] https://marc.info/?l=openbsd-misc&m=168453178604532&w=2
[2] https://marc.info/?l=openbsd-misc&m=161670969314602&w=2
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: [email protected]
For general information, go to: http://brltty.app/mailman/listinfo/brltty

Reply via email to