Tk Source Code

View Ticket
Login
Ticket UUID: 1121156
Title: requirement for 'lib64' checks
Type: Bug Version: obsolete: 8.4.9
Submitter: hobbs Created on: 2005-02-12 00:41:10
Subsystem: 84. Unix Build Assigned To: rmax
Priority: 7 High Severity:
Status: Pending Last Modified: 2026-09-25 11:30:54
Resolution: Out of Date Closed By:
    Closed on:
Description:
When you build Tk on SuSE 9.2 x86_64 with "standard"
settings, if you don't have xmkmf (/usr/X11R6/bin) in
your path, it will end up picking the wrong X11 libpath
and dying at link time.

The xmkmf usage is injected by AC_PATH_X, part of
tcl.m4:SC_PATH_X.  When found, it will correctly show:

checking for X... libraries /usr/X11R6/lib64, headers
/usr/X11R6/include

when you don't have it on your path, you get:

checking for X... libraries /usr/X11/lib, headers
checking for X11 header files...

This is because it falls back to other checks in
SC_PATH_X, which don't account for lib64.  What happens
is that when you get to the link step, it fails with:

/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../../../x86_64-suse-linux/bin/ld:
skipping incompatible /usr/X11/lib/libX11.so when
searching for -lX11
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../../../x86_64-suse-linux/bin/ld:
skipping incompatible /usr/X11/lib/libX11.a when
searching for -lX11
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../../../x86_64-suse-linux/bin/ld:
cannot find -lX11

So obviously, lib64 is the default correct version. 
Should SC_PATH_X look in /usr/X11R6/lib64 first?  That
would apply to all platforms.  Also, what about
non-64-bit builds?  IIUC, those are the default on
x86_64 Linux platforms, but that it may be possible to
build 32-bit on those machines with gcc.

In another bug report, someone mentioned that
SC_PATH_TCLCONFIG and SC_PATH_TKCONFIG might also look
in /usr/lib64 as well.

Basically, lib64 is throwing some wrenches into the
usual build.  What upgrades to the m4 are the "correct"
ones?
User Comments: serhiy.storchaka added on 2026-09-25 11:30:54:

On current systems libX11 is in a directory the linker searches by default, so AC_PATH_X succeeds and the fallback directory list in SC_PATH_X (which has no lib64 directories) is not used. With an old /usr/X11R6 layout, --x-libraries=/usr/X11R6/lib64 works around it.


dgp added on 2006-03-11 03:34:15:
Logged In: YES 
user_id=80530


is this fixable for 8.4.13?

hobbs added on 2005-02-15 00:34:35:
Logged In: YES 
user_id=72656

The other point being, should xmkmf reasonably be expected
to be in the user's path when building Tk?