Subject: Re: -current cross build fails on Red Hat Linux 9.0
To: Giles Lean <giles@nemeton.com.au>
From: Brian A. Seklecki <lavalamp@spiritual-machines.org>
List: current-users
Date: 10/08/2003 11:08:23
On Sat, 2003-07-26 at 03:14, Giles Lean wrote:
> Hi all,
> 
> Trying to build -current for i386 on a Red Hat Linux 9 machine
> fails.  The source tree was checked out from a CVS tree updated
> via cvsup from cvsup.pasta.cs.uit.no.  The same source tree will
> build on NetBSD (OK, it failed on checkflist) so this problem is
> (I think) cross build specific.
> 
> ===> build.sh command: ./build.sh -u -U -D /home/unpriv/distribution -M /home/unpriv/obj distribution
> ...
> dependall ===> bin/rm
> dependall ===> bin/rmdir
> dependall ===> bin/sh
> cc -O   -o mkinit /home/giles/netbsd/src/bin/sh/mkinit.c
> /tmp/ccOUNoXW.o(.text+0x192): In function `readfile':
> : undefined reference to `strlcpy'

I was confused by this.  strlcpy is called w/o any #ifdef's.  It's
definitely not in -lc on any linux system I have access to.  Using the
$TOOLSDIR compiler causes breakage.

$OBJDIR/lib/libc has all the symbols needed:

-rw-------    1 lavalamp lavalamp     4565 Oct  8 10:15 strlcpy.cat3
-rw-------    1 lavalamp lavalamp     1266 Oct  8 10:11 strlcpy.d
-rw-------    1 lavalamp lavalamp     2653 Oct  8 10:14 strlcpy.ln
-rw-------    1 lavalamp lavalamp      818 Oct  8 10:14 strlcpy.o
-rw-------    1 lavalamp lavalamp      941 Oct  8 10:14 strlcpy.po
-rw-------    1 lavalamp lavalamp      814 Oct  8 10:14 strlcpy.so

...but since the above is using the system-compiler it's NG.

-lava 

> collect2: ld returned 1 exit status
> *** Error code 1
> 
> Regards,
> 
> Giles