After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 303633 - gnopernicus should have support for brltty and load it if present
gnopernicus should have support for brltty and load it if present
Status: RESOLVED FIXED
Product: gnopernicus
Classification: Deprecated
Component: braille
unspecified
Other Linux
: Normal normal
: ---
Assigned To: remus draica
remus draica
AP1
Depends on:
Blocks:
 
 
Reported: 2005-05-10 07:45 UTC by remus draica
Modified: 2006-04-06 11:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (10.38 KB, patch)
2005-05-10 07:47 UTC, remus draica
none Details | Review
proposed patch (29.01 KB, patch)
2005-10-13 11:30 UTC, remus draica
committed Details | Review

Description remus draica 2005-05-10 07:45:57 UTC
Now, if brltty is not present at compile time, support is turned off. If brltty
is installed after, gnopernicus has to be recompiled in order to use it. The
desire behaviour is to compile that support, to check at run-time if brltty is
present and to load it if present.
Comment 1 remus draica 2005-05-10 07:47:10 UTC
Created attachment 46269 [details] [review]
proposed patch
Comment 2 remus draica 2005-06-27 08:52:47 UTC
Samuel, what are you suggestions/oppinions about patch above?
Comment 3 Samuel Thibault 2005-06-27 11:46:24 UTC
To be franc, I really would *not* do that. BrlAPI's API will probably not
change, but BrlAPI's ABI might change, it is not really stable yet, so using
such dlopen() is really not safe.

And things have always been like this: if you don't have some library,
configure will not use it. How is it that in your case brltty might not be
installed when compiling ? The build-dep of Debian for gnopernicus include
libbrlapi-dev for instance, and it works fine.
Comment 4 korn 2005-08-18 15:48:59 UTC
Samuel - do you have another suggestion for how to deal with this?  We want to
have BrlTTY support built at compile time (with libraries present), BUT if it
isn't on the users' system at run-time, it should fail gracefully.
Comment 5 bill.haneman 2005-08-18 15:52:38 UTC
Samuel: the main motivation is to avoid a hard dependency of gnopernicus on
brltty, in the resulting binaries.  This is important for RPMS etc where the
target machine isn't the same as the build machine.
Comment 6 Samuel Thibault 2005-08-18 16:15:04 UTC
How does a hard dependency pose big problems?

Indeed, it makes the user need to download and install Dave's rpm on
mielke.cc too. But a lot of other softwares just work this way, mplayer for
instance. And it's easy to put the URL of Dave's rpms in front of the URL
of gnopernicus rpms.

And the distribution helps too: with debian for instance, the libbrlapi deb is
available on official mirrors/cds, so that the user won't even need to download
it from mielke.cc: when installing the gnopernicus deb, he gets an "I need the
libbrlapi package" error, and hence runs apt-get install libbrlapi, and then
it works fine. I guess Mandrake/RedHat/... distributions just behave the same.

Maybe you will tell me that there can be a versioning problem. Well,
yes. But the dlopen() approach just has the same problem: version only
jumps up when the ABI changes (which, we hope, should be quite rare now),
and that's precisely when the dlopen() approach will break! So this is not a
good solution, even less since it needs updated even if brlapi's API doesn't
change while its ABI changes.
Comment 7 Samuel Thibault 2005-08-18 16:24:45 UTC
I forgot:

The user doesn't need to install and configure brltty. He only needs to install
brlapi, which is just about 80K. It won't hurt to require all gnopernicus-using
people install that. And yes, gnopernicus will gracefully fail, with an

Error opening brlapi connection: Connection refused
Please check that
- /etc/brlapi.key exists and contains some data
- you have read permission on /etc/brlapi.key
- BRLTTY is running

error message (which could be improved if needed btw, see
braille/libbrl/ttybrl.c)
Comment 8 Samuel Thibault 2005-08-18 16:53:12 UTC
A colleague of mine proposed an alternate solution: couldn't ttybrl.c be compiled in a separate .so file, and gnopernicus dlopen() _that_ file ? If libbrlapi.so is available, it will work nicely. If not, dlopen() will fail (missing dependancy), and then the BRLTTY choice could be disabled at runtime. 
Comment 9 bill.haneman 2005-08-18 17:17:29 UTC
That sounds like a great idea.

The reason for avoiding a hard dependency is that gnopernicus is part of the
official Gnome 'desktop release' and we try to reduce the number of new libs
pulled in there.  Of course it's OK to pull in new libs with justification, but
if it can be avoided gracefully that's even better.
Comment 10 remus draica 2005-10-13 11:30:58 UTC
Created attachment 53411 [details] [review]
proposed patch
Comment 11 remus draica 2006-04-06 11:32:53 UTC
Comment on attachment 53411 [details] [review]
proposed patch

patch applied on cvs head.