[lsb-discuss] Lesstif and libXt.a
archer at eskimo.com
Wed Nov 22 07:00:15 PST 2006
On Wed, 22 Nov 2006, Wichmann, Mats D wrote:
> You can't use the shared LSB libXt?
No. I can explain further as it's all fresh in my mind this week.
This is my third attempt at doing this, with several months
in-between each attempt. Started into it again last week.
> >I'm currently using LSB-3.0 on SuSE 10.0 and using the lsbcc method.
> >Is there a better way to attempt to get Lesstif compiled?
> This should be a reasonable setup. However, I think lesstif has
> actually been built successfully in the alternative build setup
> (the chroot environment known as lsb-buildenv). Rajesh, Marvin,
> do either of you have details on this?
I've talked to Rajesh a bit on e-mail very recently.
Here's the deal, and let me know if I'm doing something terribly
First, I'm not really that good with Makefiles, autoconf, or
automake, though our open-source app uses autoconf/automake. I
hack the files here and there at times though.
Because of the above I take a different approach to the compile
which you'll probably shudder at, but still works: I copy
/opt/lsb/lib to lib.orig and /opt/lsb/include to include.orig, then
make symlinks from lib and include to copies of the originals that
I've munged. This lets me do things like add /opt/lsb/includes/Xm/
to my munged version for building, then change the symlinks back to
the originals for running, plus lets me avoid changing the Makefiles
drastically. I'm also trying to script these builds of Lesstif and
Xastir so that I can do future Xastir releases more quickly.
On to the problems:
First, I don't have libXt.a in LSB, only libXt.so. The Lesstif
build required some very minor patches (that I got from Rajesh), but
even after patching it uses some private interfaces of libXt. This
requires one to statically link the library with Lesstif. Since I
didn't have a ".a" file for it, I attempted to use the OS'es
libXt.a. Initial results were that the compile succeeded and I
_thought_ I had obtained an LSB-Lesstif package.
Now, compile it against _any_ Motif application. I tried it
initially with Xastir (the app that I'm trying to port), but then
tried it with a tiny HelloWorld.c Motif app with the same results.
It broke at the linker stage: There are symbols defined in
/usr/X11R6/lib/libXt.a which are defined differently in LSB.
"Synchronize" is the first one of these. I had to statically link
in libX11.a from the OS as well. This resulted in further symbols
that couldn't be resolved by the linker. You get the picture. I'm
in a circular compile/link loop that gets further away from LSB with
Again, the way that I'm doing this is:
/opt/lsb/lib -> lib.lesstiff
/opt/lsb/include -> include.lesstiff
Where lib.lesstiff and include.lesstif are direct copies of the lib
and include directories, then tweaked to add/delete files for the
particular build that I'm doing at the time. Shared libraries I
don't want to link with are either deleted from these directories or
chmod 000. Again, it saves me from munging Makefiles.
I believe that if I only had a the static library for libXt.a that
matched the LSB libXt.so, I could get past my current problem.
I can provide the scripts I'm using if anyone wishes to duplicate my
Curt, WE7U. APRS Client Comparisons: http://www.eskimo.com/~archer
"Lotto: A tax on people who are bad at math." -- unknown
"Windows: Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me: I picked the coordinate system!"
More information about the lsb-discuss