Bug 19098 - linker failures with XFree compiling fvwm2-2.3.21
Summary: linker failures with XFree compiling fvwm2-2.3.21
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 7.0
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-14 05:21 UTC by Need Real Name
Modified: 2016-11-24 14:55 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-10-14 18:11:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2000-10-14 05:21:58 UTC
While compiling the most recent version of the fvwm2 window manager I had
the following failure:

egcs -DFVWM_MODULEDIR=\"/usr/libexec/fvwm/2.3.21\" 
-DFVWM_DATADIR=\"/usr/share/fvwm\" 	-DFVWM_CONFDIR=\"/usr/etc\" -g -O2  -o
fvwm2  menus.o move_resize.o builtins.o style.o events.o add_window.o
fvwm.o borders.o icons.o module_interface.o functions.o virtual.o session.o
gnome.o placement.o stack.o conditional.o decorations.o cursor.o
windowlist.o geometry.o misc.o focus.o colormaps.o bindings.o update.o
icccm2.o modconf.o read.o fvwmdebug.o repeat.o colors.o -L../libs
-L/usr/X11R6/lib -lfvwm   	-lSM -lICE -lXext -lX11  -lm 
/usr/X11R6/lib/libX11.so: undefined reference to `getpwuid_r.2'
/usr/X11R6/lib/libX11.so: undefined reference to `shmctl'
/usr/X11R6/lib/libX11.so: undefined reference to `getpwnam_r.2'
collect2: ld returned 1 exit status
make[2]: *** [fvwm2] Error 1
make[2]: Leaving directory `/source/fvwm-2.3.21/fvwm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/source/fvwm-2.3.21'
make: *** [all-recursive-am] Error 2


This version of fvwm2 compiled fine under RH6.2.  The configure line I
used is

./configure  --with-gnome --prefix=/usr

I have installed all of the most recent patches to 7.0. A check of libc
provides the following info:

nm /lib/libc.so.6 | grep getpwuid_r

000b7a54 t __getpwuid_r
0010a0e0 t __nscd_getpwuid_r
000b7bd0 t __old_getpwuid_r
000b7a54 T getpwuid_r@@GLIBC_2.1.2
000b7bd0 T getpwuid_r

nm /lib/libc.so.6 | grep shmctl

000e22d4 t __new_shmctl
000e24f0 t __old_shmctl
000e22d4 T shmctl@@GLIBC_2.2
000e24f0 T shmctl

nm /lib/libc.so.6 | grep getpwnam_r

000b7884 t __getpwnam_r
0010a090 t __nscd_getpwnam_r
000b7a00 t __old_getpwnam_r
000b7884 T getpwnam_r@@GLIBC_2.1.2
000b7a00 T getpwnam_r

Notice that in the library the only references to getpwnam_r and getpwuid_r
as they relate to GLIBC_2.1.2 contain 2 '@' signs in the library, however
libX11.so expects the symbol to have only 1 '@' sign.

Comment 1 Jakub Jelinek 2000-10-20 15:56:07 UTC
The issue is different. egcs is the RHL 6.2 compatibility C compiler, which
links against /usr/i386-glibc21-linux/lib/ libc.so.6 (that directory also
contains libX11.so* etc., but as you requested -L/usr/X11R6/lib, the X11
standard non-compatibility libraries (which are linked against glibc 2.2)
were used together with glibc 2.1. So, you have basically 3 options:
- Use gcc instead of egcs (the best option IMHO)
- Pass -L/usr/X11R6/lib -L/usr/lib on the command line instead of
  just -L/usr/X11R6/lib (then the program will be linked against glibc2.2)
- Don't pass -L/usr/X11R6/lib or pass -L/usr/*-glibc21-linux/lib before it
  (but then you should use glibc2.1 headers as well)


Note You need to log in before you can comment on or make changes to this bug.