Tcl Source Code

View Ticket
Login
Ticket UUID: 3534990
Title: Configure tk 8.5.11 for 32-bit on x86_64 misleads linker
Type: Bug Version: None
Submitter: eriklns Created on: 2012-06-13 21:08:15
Subsystem: 53. Configuration and Build Tools Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2016-08-20 17:06:12
Resolution: Invalid Closed By: dkf
    Closed on: 2016-08-20 17:06:12
Description:
When compiling Tk8.5.11 on a x86_64 multilib linux system for a 32-bit native target, configuring the build (with a config.site script) to use CC="gcc -m32 -march i686", the resulting Makefile shows:

X11_LIB_SWITCHES= -L/usr/lib64 -lX11 $(XFT_LIBS)

The explicit search path /usr/lib64 is misleading because the linker will find 64-bit libraries only in that place. It doesn't break the build, but it produces a lot of messages like these:

gcc -m32 -march=i686 -g  -pipe    -Wl,--export-dynamic  tkAppInit.o -L/usr/local/src/BUILD/i686-linux/tk8.5.11 -ltk8.5 \
        -L/usr/local/src/BUILD/i686-linux/tcl8.5.11 -ltcl8.5  -L/usr/lib64 -lX11  -ldl  -lieee -lm  -Wl,-rpath,/usr/local/lib -o wish
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libX11.so when searching for -lX11
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libdl.so when searching for -ldl
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libdl.a when searching for -ldl
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libieee.a when searching for -lieee
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libm.so when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libm.a when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libc.so when searching for -lc
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libc.a when searching for -lc

The config.log for this build has been attached.
User Comments: dkf added on 2016-08-20 17:06:12:

This is a Tk issue


bgriffin added on 2013-01-28 05:00:22:
I've been having a similar problem on SuSE Enterprise 10.4 and here's what I learned.

To begin with, the --disable-64bit option doesn't work when it comes to just the basic compiler, which is why CC="gcc -m32" is required in the first place.  This shouldn't be necessary.

I found a missing link in /usr/lib  libfreetype.so -> libfreetype.so.6, libfontconfig.so -> libfontconfig.so.1
Because the linker was looking for lib<name>.so for -lfreetype -lfontconfig, it failed to find it and then tried /usr/lib64 which gives the misleading error message about incompatible libraries.

The xft-config script does not, and cannot, report the correct options for 32-bit xft library usage.  This causes the configure script to feed the wrong options to the test compiles.

There are more problems then I could sort out with the configure script and the underlying OS support for 32-bit development. 

Bottom line is the SuSE environment is screwed up when it comes to 32-bit development.  Much of the OS seems to make a base assumption that it's 64-bit all the time and 32-bit is reluctantly present for legacy support of existing programs.

eriklns added on 2012-06-14 04:08:17:

File Added - 446030: config.log

Attachments: