Subject: Re: Crosscompiling error in i386 linux host
To: Roberto Pereyra <pereyra.roberto@gmail.com>
From: John Clark <jclark@metricsystems.com>
List: netbsd-users
Date: 05/18/2005 10:53:21
Roberto Pereyra wrote:

>Again I have the same error with current, in the same linux host.
>
>Roberto
>
>#      link  pax/pax
>cc -O -I/home/admin/netbsd-current/src/tools/compat/obj
>-I/home/admin/netbsd-current/src/tools/compat/obj/include 
>-I/home/admin/netbsd-current/src/tools/pax/../compat
>-DHAVE_NBTOOL_CONFIG_H=1  -D_FILE_OFFSET_BITS=64 
>-I/home/admin/netbsd-current/src/usr.sbin/mtree 
>-I/home/admin/netbsd-current/src/sbin/mknod 
>-I/home/admin/netbsd-current/src/bin/ls -DHAVE_MTIO_H -DHOSTPROG   -o
>pax ar_io.lo ar_subs.lo buf_subs.lo cpio.lo file_subs.lo ftree.lo
>gen_subs.lo getoldopt.lo options.lo pat_rep.lo pax.lo sel_subs.lo
>tables.lo tar.lo tty_subs.lo getid.lo spec.lo misc.lo stat_flags.lo
>pack_dev.lo -L/home/admin/netbsd-current/src/tools/compat/obj
>-lnbcompat -lz
>ar_subs.lo(.text+0xd5): In function `fdochroot':
>: undefined reference to `fchroot'
>collect2: ld returned 1 exit status
>

This is a different type of error that the one you previously indicated. 
This error suggests that
the source you have refers to a variable/function 'fchroot', which is 
not found in some library
somewhere.

I've had these sorts of problems, and by repetatively performing a 'cvs 
co' on the src tree
gotten a source set that compiles cleanly.

I'll respond to your post about your environment variables here as well.

I can't recall which of these is the offending item, at the moment I 
think it is INFODIR.

INFODIR=/usr/local/info:/usr/share/info:/usr/info
INFOPATH=/usr/local/info:/usr/share/info:/usr/info

In any case, I would suggest setting both to:

INFODIR=/usr/share/info
INFOPATH=/usr/share/info

Since you are probably not going to want to do an 'info' from the command
shell you are using to build the NetBSD package, this should not be
a problem.

Since I don't have an active NetBSD project, I can't spend a lot of time
on this. But perhaps this will help.

John Clark