Bug 1382 - libGLw is binary incompatible with latest openmotif (2.2)
Summary: libGLw is binary incompatible with latest openmotif (2.2)
Status: RESOLVED WORKSFORME
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All All
: high normal
Assignee: mesa-dev
QA Contact:
URL: https://bugzilla.redhat.com/bugzilla/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-14 17:39 UTC by Kristian Høgsberg
Modified: 2010-03-16 07:08 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to update libGLw's Motif headers (740 bytes, patch)
2005-08-29 12:28 UTC, Garrick Meeker
Details | Splinter Review

Description Kristian Høgsberg 2004-09-14 17:39:11 UTC
libGLw includes its own copies of PrimitiveP.h, Xm.h, XmP.h and XmStrDefs.h. 
Now that openmotif 2.2 added a tool_tip_string field to the XmPrimitivePart
struct from PrimitiveP.h, the libGLw is out of sync and binary incompatible with
openmotif 2.2.

I'm thinking that we should update the libGLw copies of the motif header files
and bump the libGLw version.  Alternatively, we could remove the copies and
require that motif must be installed in order to build libGLw, but of course
still bump the version.

Comments?
Comment 1 Mike A. Harris 2004-09-14 18:23:33 UTC
Easier to find reference (the URL field seems obscure <grin>):
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=132160

Me and Kristian discussed this in IRC today for some time, and here are some
thoughts about the issue.  Initially I misread the issue of being Motif
dragging around libGLw headers, but it's the other way around.  The problem
with dragging another library's headers around, is that you either have to
synchronize with that library over time, or you fall out of touch and changes
in the library may end up with incompatible interfaces in your local copy
that do not match the new library.  For this alone, I think it is very very
bad to drag around openmotif headers just for libGLw's personal usage.  I think
that they should be removed from X.Org completely, and if you enable the
compilation of libGLw, you _must_ have a motif implemenation installed in
order to link to.  This is the only sensible way to guarantee you're using
compatible motif headers.

That's just the first problem though.

The real problem here, is that Motif changed the interface by adding new
symbols without bumping the library version.  Since libGLw carries around
motif headers currently, it will be tied to a specific motif version and
assume no incompatible binary changes are made (which *should* be a safe
assumption, but can't be relied upon really).  So the way I currently see
this, is that updating the libGLw copies of motif headers and rebuilding
libGLw with them, will just produce a new libGLw with the same .so version,
linked to a newer version of Motif which is binary incompatible.  Apps linked
to the older libGLw and older OpenMotif will break if we update the libGLw
to use new motif headers.  Keeping the old headers means that current
apps work, but building apps against current Motif 2.2 or later will fail
due to the MOtif changes.

It appears to be a very ugly problem IMHO.  It isn't clear what is the best
solution which retains both source and binary compat of libGLw, openmotif, and
apps that use either.

http://cvs.motifzone.net/cgi-bin/cvsweb.cgi/openmotif/lib/Xm/PrimitiveP.h?cvsroot=openmotif
Comment 2 Mike A. Harris 2005-04-29 06:25:54 UTC
Anyone care to comment on this?
Comment 3 Roland Mainz 2005-04-29 09:11:55 UTC
(In reply to comment #2)
> Anyone care to comment on this?

The current version in the tree seems to work with the normal version of Motif
(tested on Solaris) so the problem is likely specific to OpenMotif... best
solution may be to ask the OpenMotif guys what we should do here...
Comment 4 Mike A. Harris 2005-07-14 04:05:51 UTC
This is an OpenMotif bug.  They have an incompatible libGLw header in
their own source tree IIRC.

Setting status to "NOTOURBUG"
Comment 5 Garrick Meeker 2005-08-29 12:28:40 UTC
Created attachment 3101 [details] [review]
Patch to update libGLw's Motif headers
Comment 6 Garrick Meeker 2005-08-29 12:37:49 UTC
I'm not sure why this was closed, because libGLw definitely has an out of date
copy of OpenMotif's PrimitiveP.h, not the other way around.  This is a major
showstopper for many of our apps.  I've tested this patch with OpenMotif 2.1 and
2.2.  Under 2.1 the tool tips member just adds extra padding but no crashes
occur.  That is, one build is in fact binary compatibile with both 2.1 and 2.2,
and libGLw doesn't actually link to libXm.  Yes, the duplication of headers is
ugly, but can we update libGLw so it at least works?
Comment 7 Mike A. Harris 2005-09-07 07:55:16 UTC
Please just remove this header completely.  Make it a necessity that
openmotif be installed in order to compile libGLw.  This is insane to
patch like this, as it is an ongoing maintenance hell.

Comment 8 Adam Jackson 2005-11-30 16:59:43 UTC
libGLw is at any rate a Mesa component, not an Xorg component.  shifting
appropriately...
Comment 9 Brian Paul 2006-08-31 07:49:31 UTC
The GLw sources in Mesa do not include PrimitiveP.h, XM.h, etc.  Here's a
directory listing:
$ ls Mesa/src/glw/
CVS/        GLwDrawA.h   GLwMDrawA.c  GLwMDrawAP.h  README
GLwDrawA.c  GLwDrawAP.h  GLwMDrawA.h  Makefile

Furthermore, I don't see a libGLw in x.org's git tree.

This bug report may be obsolete.  Can anyone confirm?


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.