[uClibc]Compiling fetchmail.

henri_vanriel uclibc at vanriel.xs4all.nl
Mon Jan 6 20:31:49 UTC 2003


On Monday 06 January 2003 19:22, Erik Andersen wrote:
> On Mon Jan 06, 2003 at 05:32:42PM +0100, Henri van Riel wrote:
> > Hello,
> >
> > I'm trying to compile fetchmail (5.9.6) against uClibc but I'm running
> > into link problems. Can anyone tell me if I need to set certain
> > options or if I need a certain patch?
>
> Please paste the compile error here so we know what the problem
> is.  Proper error reports save everyone time and effort,

Sorry, I should have known better. Here's the 'extended' version of my 
problem:

I'm new to uClibc so forgive me if I overlooked something.

I need fetchmail for a uClibc based router/gateway project (www.fli4l.de). I 
installed uClibc on my RedHat7.3 workstation, I think the installation is ok 
and I have added /usr/i386-linux-uclibc/usr/bin to my path (symlinks to gcc, 
ldd and ld are there).

I saw in the list of working applications that fetchmail-5.9.6 should compile 
against uClibc-0.9.16. I thought I'd try that before attempting to compile 
the new 6.2.0. I got the 5.9.6 source, configured it and compiled it 
'out-of-the-box' and this is the result:

/usr/i386-linux-uclibc/lib/crt0.o: In function `_start':
/usr/i386-linux-uclibc/lib/crt0.o(.text+0x20): undefined reference to 
`__uClibc_start_main'
collect2: ld returned 1 exit status
make: *** [fetchmail] Error 1

Obviously it is missing a library so I changed LDEFLAGS in the Makefile:
  
  LDEFLAGS =  -L/usr/i386-linux-uclibc/lib -L/usr/lib

Fetchmail does compile now but I get the following warning:

fetchmail.o: In function `timestamp':
fetchmail.o(.text+0x1a): the 'setlocale' function supports only C|POSIX 
locales
/usr/bin/ld: warning: libc.so.6, needed by /usr/lib/libhesiod.so, may conflict 
with libc.so.0
/usr/bin/ld: BFD 2.11.93.0.2 20020207 assertion fail elflink.h:4057

When I print the shared library dependencies (ldd) I get this result:

libcrypt.so.0 => /usr/i386-linux-uclibc/lib/libcrypt.so.0
libhesiod.so.0 => /usr/lib/libhesiod.so.0
libc.so.0 => /usr/i386-linux-uclibc/lib/libc.so.0
libc.so.6 => /lib/libc.so.6
libresolv.so.2 => /lib/libresolv.so.2
ld-linux.so.2 => /lib/ld-linux.so.2
/usr/i386-linux-uclibc/lib/ld-uClibc.so.0 => 
/usr/i386-linux-uclibc/lib/ld-uClibc.so.0

For some reason fetchmail still needs libc6 (=glibc) and that's exactly what I 
don't want.

I hope I have clarified the problem better now, sorry again for the 'shortcut' 
earlier on.

-- 
Henri.






More information about the uClibc mailing list