MAKEOBJDIRPREFIX and rsync/cp problem (was: Re: head && auditdistd)

From: Matthias Apitz <guru_at_unixarea.de>
Date: Thu, 16 May 2013 09:18:41 +0200
El día Wednesday, May 15, 2013 a las 09:11:11AM +0200, Matthias Apitz escribió:

> # newfs /dev/ad4s1a
> # mount /dev/ad4s1a /mnt
> # setenv  MAKEOBJDIRPREFIX /home/guru/head/obj
> # cd /home/guru/head/src
> # make installworld DESTDIR=/mnt
> 
> ...

> >>> Installing everything
> --------------------------------------------------------------
> cd /home/guru/head/src; make -f Makefile.inc1 install
> ===> share/info (install)
> ===> lib (install)
> ===> lib/csu/i386-elf (install)
> cc -O2 -pipe  -I/home/guru/head/src/lib/csu/i386-elf/../common  -I/home/guru/head/src/lib/csu/i386-elf/../../libc/include -std=gnu99 -Qunused-arguments  -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int  -c crti.S
> cc: not found
> *** [crti.o] Error code 127

Yesterday evening I investigated in detail why this was failing. It
failed for two reasons:

1)
On the host where world and kernel have been compiled the sources and
resulting obj files have been in

	/home/guru/head/src
	/home/guru/head/obj

and MAKEOBJDIRPREFIX=/home/guru/head/obj was used; later both trees have
been copied over to the USB stick to

	/mnt/home/guru/head/src
	/mnt/home/guru/head/obj
	
with the idea that when this was booted the trees would be again like
the original ones /home/....; and the same MAKEOBJDIRPREFIX would make
the "make installworld" (...) happy again; but not, it failed; the
installer was unable to locate the obj files and wanted to run
compilation again; the reason for this was
that on the original host /home was a symlink:

# ls -l /home
lrwxr-xr-x  1 root  wheel  8 28 abr 11:06 /home -> usr/home

while this was not the same on the USB system; after changing this the
installer could find the objects;

2)
But then a 2nd problem showed up: for the first time I copied "src"
and "obj" to the USB stick with rsync(1) this way

     # cd /home/guru/head/
     # rsync -av -q --cvs-exclude src /mnt/home/guru/head/
     # rsync -av -q --cvs-exclude obj /mnt/home/guru/head/

in the past I have used always the cp(1) command this way:
 
     # cp -Rp src /mnt/home/guru/head/
     # cp -Rp obj /mnt/home/guru/head/

I wanted to use rsync(1) with --cvs-exclude to not copy over all the .svn/.... 
files to the USB key; but silently this failed and a lot of files and
dirs have been missing on the target directory tree; until now I have no
idea why :-(

Any hints?

	matthias


-- 
Sent from my FreeBSD netbook

Matthias Apitz               |  - No system with backdoors like Apple/Android
E-mail: guru_at_unixarea.de     |  - Never being an iSlave
WWW: http://www.unixarea.de/ |  - No proprietary attachments, no HTML/RTF in E-mail
phone: +49-170-4527211       |  - Respect for open standards
Received on Thu May 16 2013 - 05:18:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:37 UTC