Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Apr 2013 16:56:37 -0700
From:      Jeremy Chadwick <jdc@koitsu.org>
To:        Brooks Davis <brooks@FreeBSD.org>
Cc:        svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-9@FreeBSD.org
Subject:   Re: svn commit: r249549 - in stable/9/sys: amd64/conf i386/conf
Message-ID:  <20130417235636.GA14262@icarus.home.lan>
In-Reply-To: <20130417225603.GA13720@icarus.home.lan>
References:  <201304161609.r3GG9SID009937@svn.freebsd.org> <20130416161919.GA80626@icarus.home.lan> <20130417125433.GC30222@caravan.chchile.org> <20130417193538.GB9331@icarus.home.lan> <20130417194706.GA30583@lor.one-eyed-alien.net> <20130417225603.GA13720@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 17, 2013 at 03:56:03PM -0700, Jeremy Chadwick wrote:
> {snipping for brevity; thread reference is below }
> { http://lists.freebsd.org/pipermail/svn-src-stable-9/2013-April/004258.html }
>
> I'll be doing the following to see where exactly the failure happens
> since as we know parallel make causes confusing output sometimes,
> 
> rm -fr /usr/obj/* && make -j2 buildworld && make buildkernel
> 
> I doubt the parallelism has anything to do with the issue, however -- it
> seems very clear cut to me that the issue is that buildkernel assumes
> ctfconvert is in one's $PATH, which is not true if you have an active
> system with WITHOUT_CDDL=true which you're trying to move *to* have
> CDDL.

Made no difference as I expected.  Here's the result:

--------------------------------------------------------------
>>> stage 3.2: building everything
--------------------------------------------------------------
cd /usr/obj/usr/src/sys/GENERIC; MAKEOBJDIRPREFIX=/usr/obj  MACHINE_ARCH=amd64  MACHINE=amd64  CPUTYPE= GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin  GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font  GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac  _SHLIBDIRPREFIX=/usr/obj/usr/src/tmp  _LDSCRIPTROOT=  VERSION="FreeBSD 9.1-STABLE amd64 901504"  INSTALL="sh /usr/src/tools/install.sh"  PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin COMPILER_TYPE=gcc make KERNEL=kernel all -DNO_MODULES_OBJ
cc -c -x assembler-with-cpp -DLOCORE -O2 -frename-registers -pipe -fno-strict-aliasing  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector  -Werror /usr/src/sys/amd64/amd64/locore.S
cc -c -O2 -frename-registers -pipe -fno-strict-aliasing  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option   -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror  aic7xxx_reg_print.c
ctfconvert -L VERSION -g aic7xxx_reg_print.o
ctfconvert: No such file or directory
*** [aic7xxx_reg_print.o] Error code 1

Stop in /usr/obj/usr/src/sys/GENERIC.
*** [buildkernel] Error code 1

Stop in /usr/src.
*** [buildkernel] Error code 1

Stop in /usr/src.


Apologies for the long paths and verbosity here, but...

I started digging through Makefile.inc1, as my first inclination was to
figure out why /usr/obj/usr/src/cddl/usr.bin (and usr.sbin) were missing
from the PATH definition.

I then realised that's not the proper solution, since all of those paths
refer to /usr/obj/usr/src/tmp (note the "tmp/" part), and there are no
cddl/CTF binaries in there anywhere.

All the "tmp" stuff is referred to as $WORLDTMP.

To me it looks like whatever populates ${WORLDTMP}/usr/bin and
${WORLDTMP}/usr/sbin is not properly handling (copying) binaries from
the /usr/obj/usr/src/cddl/usr.bin and /usr/obj/usr/src/cddl/usr.sbin
directory trees into the proper ${WORLDTMP} locations.

Confused yet?  :-)

I'm not even sure where to begin looking for this, nor am I even sure
doing that is the proper solution.

As an example/test, I've been trying to figure out how addr2line makes
it (gets copied**) from one tree/place to another:

root@testbox:/usr/src # find /usr/obj -type f -perm 0755 -name "addr2line" -ls
2409648     2112 -rwxr-xr-x    1 root     wheel    1033062 Apr 17 15:58 /usr/obj/usr/src/tmp/usr/bin/addr2line
 321764     2112 -rwxr-xr-x    1 root     wheel    1033062 Apr 17 15:58 /usr/obj/usr/src/tmp/usr/src/gnu/usr.bin/binutils/addr2line/addr2line
2422033     1472 -rwxr-xr-x    1 root     wheel     705589 Apr 17 16:08 /usr/obj/usr/src/gnu/usr.bin/binutils/addr2line/addr2line

And none of these are what's in /usr/bin (understandably),

root@testbox:/usr/src # md5 `find /usr/obj -type f -perm 0755 -name "addr2line" -print`
MD5 (/usr/obj/usr/src/tmp/usr/bin/addr2line) = 28d665ae81813d5e2a520498f7f03509
MD5 (/usr/obj/usr/src/tmp/usr/src/gnu/usr.bin/binutils/addr2line/addr2line) = 28d665ae81813d5e2a520498f7f03509
MD5 (/usr/obj/usr/src/gnu/usr.bin/binutils/addr2line/addr2line) = 71b2fde11947153c512617b496a65780

root@testbox:/usr/src # file `find /usr/obj -type f -perm 0755 -name "addr2line" -print`
/usr/obj/usr/src/tmp/usr/bin/addr2line:                                ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 9.1 (901504), not stripped
/usr/obj/usr/src/tmp/usr/src/gnu/usr.bin/binutils/addr2line/addr2line: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 9.1 (901504), not stripped
/usr/obj/usr/src/gnu/usr.bin/binutils/addr2line/addr2line:             ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 9.1 (901504), not stripped


** -- Footnote question: does anyone know why hardlinks aren't used for
the identical files?  Yes, I'm aware hardlinks can't cross filesystems,
but for the first 2 addr2line files I listed above I don't see that
being a problem.  That could save a lot of disk space, to be honest.

-- 
| Jeremy Chadwick                                   jdc@koitsu.org |
| UNIX Systems Administrator                http://jdc.koitsu.org/ |
| Mountain View, CA, US                                            |
| Making life hard for others since 1977.             PGP 4BD6C0CB |



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130417235636.GA14262>