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.
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)