Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 May 1995 02:30:07 -0700
From:      asami@CS.Berkeley.EDU (Satoshi Asami | =?ISO-2022-JP?B?GyRCQHUbKEI=?= =?ISO-2022-JP?B?GyRCOCsbKEIgGyRCOC0bKEI=?=)
To:        taob@gate.sinica.edu.tw
Cc:        freebsd-ports@FreeBSD.org
Subject:   Re: Statically-linked Motif binaries suck
Message-ID:  <199505090930.CAA28194@silvia.HIP.Berkeley.EDU>
In-Reply-To: <Pine.BSI.3.91.950507205731.9203A-100000@aries.ibms.sinica.edu.tw> (message from Brian Tao on Sun, 7 May 1995 21:03:35 %2B0800 (CST))

next in thread | previous in thread | raw e-mail | index | archive | help
 * -rwxr-xr-x  1 taob  taob    53248 May  7 03:17 mgdiff
 * -rwxr-xr-x  1 taob  taob  1110016 May  7 03:17 mgdiff-static
 * -rwxr-xr-x  1 taob  taob   192512 May  7 03:26 nedit
 * -rwxr-xr-x  1 taob  taob  1241088 May  7 03:24 nedit-static
 * -rwxr-xr-x  1 taob  taob    94208 May  7 04:08 yrolo
 * -rwxr-xr-x  1 taob  taob  1150976 May  7 04:08 yrolo-static

Oh my.... ;> :< (x_x)....

 *     All three are very nice programs but having to link in that Motif
 * library sort of puts a damper on things.  I wish those authors would
 * use something like Tk instead for their interface library.

I think so too.  I even converted a program I wrote (kp, joining the
ports collection soon) from Motif to Tcl/Tk. :)

 * 							       BTW, I
 * linked them with:
 * 
 * cc -o blah foo.o bar.o ... -Xlinker -Bstatic -lXm -Xlinker -Bdynamic
 *      -lX11 -lXt ...
 * 
 *     Correct?

I think so.  You can check it by "ldd *". :)

 *     On the bright side, the 2.0 libs on time.cdrom.com seemed to have
 * fixed the segfaulting the old Motif was having!  Should I go ahead and
 * create packages of these programs despite their size?

Yes, please.

By the way, I think we should think of a way of integrating this to
the current ports framework, we can't let Brian do all the work.
(Also, we want users who have Motif to be able to build it
themselves.)  What I think is:

(1) The ports that require Motif sets "NEEDS_MOTIF" in the Makefile.
    The top-down build will skip this package if the variable
    "HAS_MOTIF" is not set by the user.  (Or maybe bsd.port.mk can
    check ${X11BASE}/lib/libXm.a or something?)

(2) By default, the port will build shared versions.  If
    "MOTIF_STATIC" is set, it will build the static version.  The
    package name will then have "s" appended right before the ".tgz"
    suffix.

    Actually, I don't know how we can do the "build the static
    version" part automatically...can we hack the imake config file to
    do it?  From what I remember (I don't use Motif anymore), what you
    need to change is the definition of XmClientLibs....

(3) Now, the packages.  For the static versions, the CATEGORIES will
    be honored, and an additional link from the subdirectory
    "motif-static" will be added.  For the shared versions, the
    CATEGORIES will be ignored, and the only link created will be from
    the subdirectory "motif-shared".  Also, there will be a big fat
    README (and maybe .messages for the ftp sites) in that directory
    saying the packages in this directory is for Motif license holders 
    only.

    We can of course do this the other way around, and prepare to
    answer zillions of "help!  My package says `ld.so: libXm.6.0 not
    found'!" sort of questions.  Or hack pkg_add to spew out warnings
    (in English) for shared Motif packages.

What do people think?  These are off the top of my head, please feel
free to comment.  We'll need to decide what to do with these real soon 
though (i.e., before 2.0.5 -- we can put these on the CD, right?).

Satoshi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505090930.CAA28194>