need help with Motif 1.1 code compile! - Xwindows

This is a discussion on need help with Motif 1.1 code compile! - Xwindows ; Hello, I'm trying to get a program working that was written in 1993 for X11R5, Motif 1.1 and tested on SunOS 4.1. My build machine is running 2.4.18 linux kernel with Debian GNU/Linux distro (unstable branch), XFree86 4.3.0.dfsg.1-8 Xserve; I ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: need help with Motif 1.1 code compile!

  1. need help with Motif 1.1 code compile!

    Hello,

    I'm trying to get a program working that was written in 1993 for X11R5,
    Motif 1.1 and tested on SunOS 4.1. My build machine is running 2.4.18
    linux kernel with Debian GNU/Linux distro (unstable branch), XFree86
    4.3.0.dfsg.1-8 Xserve; I have the Open Motif 2.2.3-1 shared libraries
    installed as well as the Lesstif 1.2 development library and header
    files which contains static libraries and header files for libXm and
    libMrm. The code for the program, xnetrekm, can be downloaded here:

    http://ftp.netrek.org/pub/netrek/cli...trekm1.1.tar.Z

    It is a small download - only 35K.

    Following the instructions in the README for COMPILING I edited the
    Imakefile and changed the following to be:
    CC = /usr/bin/gcc
    XMINCLUDE = -I/usr/include/Xm
    XMLIB = -L/usr/lib -lXm

    I then did: xmkmf

    This resulted in a fatal error:

    netrek:~/xnetrekm/build/xnetrekm1.1# xmkmf
    mv -f Makefile Makefile.bak
    imake -DUseInstalled -I/usr/X11R6/lib/X11/config
    In file included from /usr/X11R6/lib/X11/config/Imake.tmpl:1802,
    from Imakefile.c:33:
    Imakefile:32: arguments given to macro `DependTarget'
    imake: Exit code 1.
    Stop.

    I looked at /usr/X11R6/lib/X11/config/Imake.tmpl but didn't know how to
    proceed to fix this.
    I've never used xmkmf or compiled Motif apps before

    The lesstif docs say to use mxmkmf but this program was not included
    with the Debian lesstif-dev package. Will using lesstif solve this
    compile problem? If so what should I add to the Imakefile so that it
    uses lesstif.

    If anyone can try the code and see if you can get it working I'd really
    appreciate it.

    Regards,
    Zach
    netrek@gmail.com


  2. Re: need help with Motif 1.1 code compile!

    Zach wrote:

    > I'm trying to get a program working that was written in 1993 for X11R5,
    > Motif 1.1 and tested on SunOS 4.1.




    Even if you get the Makefile to work, that code is not going to compile
    with any recent (or even not so recent) version of gcc.

    See for yourself by trying this:

    gcc -Wall -c xnetrekm.c -o xnetrekm.o

    Ouch!

    Why are you trying to compile such an anicent version? According to
    their website they have much more recent ones available...

  3. Re: need help with Motif 1.1 code compile!

    Zach wrote:

    > I'm trying to get a program working that was written in 1993 for

    X11R5,
    > Motif 1.1 and tested on SunOS 4.1. My build machine is running 2.4.18
    > linux kernel with Debian GNU/Linux distro (unstable branch), XFree86
    > 4.3.0.dfsg.1-8 Xserve; I have the Open Motif 2.2.3-1 shared libraries
    > installed as well as the Lesstif 1.2 development library and header
    > files which contains static libraries and header files for libXm and
    > libMrm. The code for the program, xnetrekm, can be downloaded here:
    >
    > http://ftp.netrek.org/pub/netrek/cli...trekm1.1.tar.Z


    Rename xnetrekm.SAMPLE.ad to XNetrekM.ad an use the Imakefile below.
    You will
    have to fix lots of bugs in that old-fashioded code, however. YMMV.

    BTW, xmkmf is not fart os Motif/Lesstif. It is part of the standard X
    distribution. Lesstif used to provide a "mxmkmf" script.

    ---8<--- cut here
    XCOMM
    XCOMM Imakefile for XNetrekM.
    XCOMM
    XCOMM Add str.c str.o if you do not have strdup or strstr.
    XCOMM

    #ifndef XmClientLibs
    #define XmClientLibs -lXm -lXp $(XTOOLLIB) $(XLIB)
    #endif

    #ifndef XmClientDepLibs
    #define XmClientDepLibs $(DEPXTOOLLIB) $(DEPXLIB)
    #endif

    #ifndef MrmClientLibs
    #define MrmClientLibs -lXm -lMrm $(XTOOLLIB) $(XLIB)
    #endif

    #ifndef MrmClientDepLibs
    #define MrmClientDepLibs $(DEPXTOOLLIB) $(DEPXLIB)
    #endif

    #if defined(SunArchitecture) && (OSMajorVersion > 4) && !HasGcc
    MY_EXTRA_LIB = -ldl /* SUNWspro/cc needs this */
    #else
    MY_EXTRA_LIB =
    #endif
    SRCS = connect.c metaserver.c mesg.c popen.c strutil.c
    xnetrekm.c
    OBJS = connect.o metaserver.o mesg.o popen.o strutil.o
    xnetrekm.o
    PROGRAMS = xnetrekm
    DEPLIBS = XmClientDepLibs $(DEPXMULIB)
    LOCAL_LIBRARIES = XmClientLibs $(MY_EXTRA_LIB) $(XMULIBONLY)

    ComplexProgramTarget(xnetrekm)
    InstallAppDefaults(XNetrekM)
    ---8<--- cut here


  4. Re: need help with Motif 1.1 code compile!

    Thanks! So where do I get mxmkmf from then? Maybe I must download
    and compile this seperately. I have Xfree86 4.2 installed but there is
    no mxmkmf.

    Regards,
    Zach


  5. Re: need help with Motif 1.1 code compile!

    mxmkmf used to be distributed with LessTif. It is (was)
    a modified version of xmkmf (a shell script) that runs
    imake forcing the loading of LessTif's versions of
    Motif.rules and Motif.tmpl. Ask about it in the LessTif
    mailing list (look at http://www.LessTif.org).

    --- Casantos


+ Reply to Thread