I suggest Guy's solution to this problem might be the best.
"openmotif-devel" was un-installed by an update (ALL) to today's
current Fedora Core 6 OS, which I did recently. Probably because of
the conflict with lesstif which was installed (just guessing).
My Fedora Core 6 had not been updated since my original
installation last November when I installed every Core 6 option.
Billy R. Adams
Raytheon Technical Services
NASA-Langley Research Center
-----Original Message-----
From: [email protected] on behalf of Guy Jennings
Sent: Thu 06/28/07 12:13 PM
To: Emmanuel Mayssat
Cc: [email protected]
Subject: Re: medm, edm, other on fc6
I found that it was straightforward to make medm work under lesstif.
The following
patch may suffice:
--- extensions/src/medm/medm/medm.c 2006-09-20 11:51:05.000000000
-0500
+++ ../medm-3.1.1/extensions/src/medm/medm/medm.c 2007-03-06
16:42:25.000000000 -0600
@@ -36,6 +36,8 @@
#include <X11/Xmu/Editres.h>
#endif
+#define STRING_CHECK(a) ((a)?(a):"")
+
#if DEBUG_WIN32_LEAKS
# ifdef WIN32
# ifdef _DEBUG
@@ -2807,7 +2809,7 @@
* we don't worry about that; we know better in our
declarations.
*/
if(items[i].accelerator) {
- str = XmStringCreateLocalized(items[i].accText);
+ str = XmStringCreateLocalized(STRING_CHECK(items[i].accText));
XtVaSetValues(items[i].widget,
XmNaccelerator, items[i].accelerator,
XmNacceleratorText, str,
Basically, the XmStringCreateLocalized function gets called with a NULL
argument from time to time. This is technically undefined according
to the
API, but allowed by openmotif and causes lesstif to segfault. The patch
simply substitutes an empty string for the NULL where necessary.
A caveat: I'm not a heavy medm user so YMMV....
Guy Jennings
Advanced Photon Source
On Jun 27, 2007, at 3:28 PM, Emmanuel Mayssat wrote:
> Hello,
>
> I am having a few difficulties compiling medm specifically on fedora
> core 6. First I had to install the lesstif-devel to get missing header
> files, then I change my CONFIG_SITE.linux-x86.linux86 and customize it
> to my platform, then when I compile and I get conflicting
> definition for
> _XmDrawShadow which is declared as extern in /usr/include/Xm/XmDraw.h
> and in .../medm/xc/Matrix.c. As a result, Matrix.c doesn't compile.
> Bummer! Has anyone experienced this problem?
>
> I tried to compile edm in place of medm.
> Again I hit roadblocks on fc6.
> I did not investigate the reason in depth.
>
> But is there anything that I can use to visualize me PV on fc6 (i.e.
> that is straight forward to compile) ?
>
> I also remember reading a thread related to Motif support in future
> linux versions. If I remember correctly motif was not going to be
> supported any more. Is that true?
>
> --
> E
>