On Mon, Apr 10, 2023 at 9:07 PM Bram Moolenaar <[email protected]> wrote:
>
>
> Tony wrote:
>
> > > > Recently (but I'm not sure when) my supposedly Motif gvim started
> > > > getting compiled without GUI. Examination of the config log showed the
> > > > following lines:
> > > >
> > > > checking --enable-gui argument... Motif GUI support
> > > > checking for pkg-config... /usr/bin/pkg-config
> > > > checking for location of Motif GUI includes... in default path
> > > > checking --with-motif-lib argument... no
> > > > checking for location of Motif GUI libs... <not found>
> > > >
> > > > After some trial and error, I found out that by changing just one line
> > > > in my environment settings, as follows:
> > > >
> > > > from: export CONF_OPT_GUI='--enable-gui=motif'
> > > > to: export CONF_OPT_GUI='--enable-gui=motif --with-motif-lib=-lXm'
> > > >
> > > > (and doing no other changes), then sourcing the configure script again
> > > > in the same shell to overwrite the environment values set by the
> > > > previous version of the same script, and running "make reconfig", its
> > > > --version output told me this time "Tiny version with X11-Motif GUI".
> > > > The relevant lines in the config log are now
> > > >
> > > > checking --enable-gui argument... Motif GUI support
> > > > checking for pkg-config... /usr/bin/pkg-config
> > > > checking for location of Motif GUI includes... in default path
> > > > checking --with-motif-lib argument... -lXm
> > > >
> > > > Is this expected? If just specifying that the Motif lib is named libXm
> > > > (without mentioning a directory) makes configure find it, I would have
> > > > expected it to already know that. Or is that name nonstandard?
> > >
> > > It's not about the lib name, it's about finding the library to link
> > > with. A sequence of directories are checked for:
> > > libXm.a
> > > libXm.dll.a
> > > libXm.so*
> > > libXm.sl
> > > libXm.dylib
> > >
> > > Perhaps the name of the library changed? On my system I can find
> > > /usr/lib/x86_64-linux-gnu/libXm.a
> > >
> > > The check hasn't changed for a long time. It can be found in
> > > src/configure.ac around line 2960.
> >
> > According to the YaST installer, openSUSE Tumbleweed package libXm4
> > titled "Motif runtime library" installs (only) files
> > /usr/lib64/libXm.so.4 and /usr/lib64/libXm.so.4.0.4
> >
> > so I did
> >
> > pushd /usr/lib64
> > ls -l libXm*
> >
> > which answered
> >
> > lrwxrwxrwx 1 root root 14 Mar 19 23:38 libXm.so -> libXm.so.4.0.4
> > lrwxrwxrwx 1 root root 14 Mar 19 23:38 libXm.so.4 -> libXm.so.4.0.4
> > -rwxr-xr-x 1 root root 3021784 Mar 19 23:38 libXm.so.4.0.4
> > lrwxrwxrwx 1 root root 15 Mar 19 23:28 libXmu.so -> libXmu.so.6.2.0
> > lrwxrwxrwx 1 root root 15 Mar 19 23:28 libXmu.so.6 -> libXmu.so.6.2.0
> > -rwxr-xr-x 1 root root 113936 Mar 19 23:28 libXmu.so.6.2.0
> > lrwxrwxrwx 1 root root 16 Mar 19 23:28 libXmuu.so -> libXmuu.so.1.0.0
> > lrwxrwxrwx 1 root root 16 Mar 19 23:28 libXmuu.so.1 -> libXmuu.so.1.0.0
> > -rwxr-xr-x 1 root root 22568 Mar 19 23:28 libXmuu.so.1.0.0
> >
> > I think only the first three lines in this list are relevant. IOW on
> > my system there are three files answering to /usr/lib64/libXm.so* in
> > your list, two of which are soft links to the third one. IIUC by
> > giving configure the argument --with-motif-lib=-lXm it doesn't search
> > for the lib but just passes -lXm to the linker, which finds
> > /usr/lib64/libXm.so -> libXm.so.4.0.4 and happily uses that (as it
> > should) to find the Motif entry points.
>
> So perhaps it's because configure doesn't check /usr/lib64, and the
> library was moved there recently? You can try by editing
> src/auto/configure and around line 10221; add "/usr/lib64" before
> "/usr/lib/i386-linux-gnu" in the assignment to "gui_libs".
>
AFAIK on openSUSE /usr/lib has always been the 32-bit library (here
with interfaces for 32-bit executables running on this 64-bit system)
and /usr/lib64 the "purely" 64-bit library.
IIUC the relevant lines are the following (src/auto/configure lines
10220-10235):
$as_echo_n "checking for location of Motif GUI libs... " >&6; }
gui_libs="`echo $x_libraries|sed 's%/^/^/*$%%'` `echo "$gui_XXX" |
sed s/XXX/lib/g` /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu
`echo "$GUI_INC_LOC" | sed s/include/lib/` $GUI_LIB_LOC"
GUI_LIB_LOC=
for try in $gui_libs; do
for libtry in "$try"/libXm.a "$try"/libXm.dll.a "$try"/libXm.so*
"$try"/libXm.sl "$try"/libXm.dylib; do
if test -f "$libtry"; then
GUI_LIB_LOC=$try
fi
done
done
if test -n "$GUI_LIB_LOC"; then
if test "$GUI_LIB_LOC" = /usr/lib \
-o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
-o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
GUI_LIB_LOC=
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
Indeed /usr/lib and a couple of others are looked for but /usr/lib64 isn't.
As I'm loath to meddle with distributed files unless it is absolutely
necessary, and I've found a temporary solution without altering them,
I'll leave it as-is for the time being so if and when you decide to
change the relevant line(s) in the master repository the change will
be taken up in my clone with no patching conflicts.
Best regards,
Tony.
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/CAJkCKXtobvb%2Bw0drybKcxGvnmZS%2BOvgVNw1-%2Bhjjpyj6kZefPg%40mail.gmail.com.