[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: groff 1.23.0.rc4 on AIX
From: |
Bruno Haible |
Subject: |
Re: groff 1.23.0.rc4 on AIX |
Date: |
Sun, 16 Apr 2023 14:26:01 +0200 |
G. Branden Robinson wrote:
> I question whether there should in fact be any "checking for Xpm"
> configuration test in groff for the Xpm library or for the SHAPE
> extension client library interface (which is in Xext).
Indeed, adding -lXpm and -lXext to the link options makes the
creation of 'gxditview' succeed:
$ xlc -q64 -qthreaded -qtls -g -L/home/haible/prefix64/lib -o gxditview
src/devices/xditview/gxditview-device.o src/devices/xditview/gxditview-draw.o
src/devices/xditview/gxditview-Dvi.o src/devices/xditview/gxditview-font.o
src/devices/xditview/gxditview-lex.o src/devices/xditview/gxditview-page.o
src/devices/xditview/gxditview-parse.o
src/devices/xditview/gxditview-xditview.o -lSM -lICE -lXaw -lXmu -lXt -lXpm
-lXext -lX11 -lm libxutil.a lib/libgnu.a
<succeeds>
> It sounds like one of AIX's versions of the standard X11 libraries links
> to these (my money's on Xaw, a popular site for vendor extensions since
> its defaults are so minimalistic and ugly).
You are right: The offenders are libXaw and libXmu.
$ xlc -q64 -qthreaded -qtls -g -L/home/haible/prefix64/lib -o gxditview
src/devices/xditview/gxditview-device.o src/devices/xditview/gxditview-draw.o
src/devices/xditview/gxditview-Dvi.o src/devices/xditview/gxditview-font.o
src/devices/xditview/gxditview-lex.o src/devices/xditview/gxditview-page.o
src/devices/xditview/gxditview-parse.o
src/devices/xditview/gxditview-xditview.o -lSM -lICE -lXaw -lXmu -lXt -lX11
-lm libxutil.a lib/libgnu.a -bnoquiet
...
ld: 0711-318 ERROR: Undefined symbols were found.
The following symbols are in error:
Symbol Inpndx TY CL Source-File(Object-File) OR
Import-File{Shared-object}
RLD: Address Section Rld-type Referencing Symbol
----------------------------------------------------------------------------------------------
.XpmReadFileToPixmap [168] ER PR
../../../../../../../../src/gos/2d/XTOP_R7/lib/libXaw/src/Pixmap.c(/usr/lib/libXaw.a[Pixmap_64.o])
00000d34 .text R_RBR [28]
<.XPixmapLoader>
00000e3c .text R_RBR [28]
<.XPixmapLoader>
.XShapeCombineMask [34] ER PR
../../../../../../../../src/gos/2d/XTOP_R7/lib/libXmu/src/ShapeWidg.c(/usr/lib/libXmu.a[ShapeWidg_64.o])
0000021c .text R_RBR [12]
.XmuReshapeWidget
00000244 .text R_RBR [12]
.XmuReshapeWidget
000003e0 .text R_RBR [14]
<.ShapeOval@AF6_2>
0000049c .text R_RBR [14]
<.ShapeOval@AF6_2>
000005d8 .text R_RBR [14]
<.ShapeOval@AF6_2>
0000062c .text R_RBR [14]
<.ShapeOval@AF6_2>
0000069c .text R_RBR [14]
<.ShapeOval@AF6_2>
00000894 .text R_RBR [16]
<.ShapeEllipseOrRoundedRectangle@AF7_4>
00000924 .text R_RBR [16]
<.ShapeEllipseOrRoundedRectangle@AF7_4>
000009e0 .text R_RBR [16]
<.ShapeEllipseOrRoundedRectangle@AF7_4>
00000a28 .text R_RBR [16]
<.ShapeEllipseOrRoundedRectangle@AF7_4>
00000a9c .text R_RBR [16]
<.ShapeEllipseOrRoundedRectangle@AF7_4>
.XShapeCombineMask [206] ER PR
../../../../../../../../src/gos/2d/XTOP_R7/lib/libXaw/src/Pixmap.c(/usr/lib/libXaw.a[Pixmap_64.o])
00001b9c .text R_RBR [34]
.XawReshapeWidget
00001bcc .text R_RBR [34]
.XawReshapeWidget
.XShapeQueryExtension [182] ER PR
../../../../../../../../src/gos/2d/XTOP_R7/lib/libXaw/src/Command.c(/usr/lib/libXaw.a[Command_64.o])
0000107c .text R_RBR [40]
<.XawCommandInitialize>
ER: The return code is 8.
> I don't know anything about how linking on AIX works. I'm vaguely aware
> that, on many Unix systems historically, shared objects and dynamic
> linking _don't_ work all that well.
Yes, in the old ages when the X libraries were created, dependencies
did not exist/work, and Makefiles had to list all relevant X libraries
explicitly.
> I gather libtool is the GNU
> solution to this problem. But groff doesn't use libtool.
No, GNU libtool cannot help when the dependencies are not stored in the
libraries nor in .la files.
$ ls -l /usr/lib/libX*.la
ls: 0653-341 The file /usr/lib/libX*.la does not exist.
$ dump -H /usr/lib/libXaw.a
<no relevant output>
> Another solution, albeit one that is GNU/Linux-centric as far as I know,
> is pkg-config.
pkg-config is meant to solve this problem, but
- The vendor has not shipped any .pc files in /usr/lib/pkg*, thus
pkg-config would not have the needed dependency lists.
- pkg-config comes with its own set of problems, see
https://gitlab.com/ghwiki/gnow-how/-/wikis/Discussion-about-pkg-config
> Unless you have an Automake-friendly suggestion for how to easily get
> AIX to report dependencies of its own X libraries, I propose to make
> this another caveat: on AIX, you must build "--without-x".
You can just hardcode the fact that on AIX -lXpm and -lXext are needed.
Like it was done in the old days.
I see that in groff/src/devices/xditview/xditview.am you have this
definition:
gxditview_LDADD = $(X_LIBS) $(X_PRE_LIBS) -lXaw -lXmu -lXt -lX11 \
$(X_EXTRA_LIBS) $(LIBM) libxutil.a lib/libgnu.a
I would do the following:
- Change this rule to add a reference to $(X_AW_DEPS):
gxditview_LDADD = $(X_LIBS) $(X_PRE_LIBS) -lXaw -lXmu $(X_AW_DEPS) -lXt
-lX11 \
$(X_EXTRA_LIBS) $(LIBM) libxutil.a lib/libgnu.a
- in groff.m4, macro GROFF_X11, add:
AC_REQUIRE([AC_CANONICAL_HOST])
X_AW_DEPS=
case $host_os in
aix*) X_AW_DEPS="-lXpm -lXext" ;;
esac
AC_SUBST([X_AW_DEPS])
Yes, this is an ad-hoc solution, not in the "Auto" philosophy, but it's easy
enough to put in place and easy enough to understand.
Bruno
- Re: groff 1.23.0.rc4 on GNU systems, (continued)
Re: groff 1.23.0.rc4 on Solaris 10, Bruno Haible, 2023/04/15
Re: groff 1.23.0.rc4 on mingw, Bruno Haible, 2023/04/15
Re: groff 1.23.0.rc4 on Alpine Linux, Bruno Haible, 2023/04/15