Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jun 2010 14:14:42 -0700
From:      Garrett Cooper <yanefbsd@gmail.com>
To:        FreeBSD-Hackers <hackers@freebsd.org>
Cc:        Warner Losh <imp@freebsd.org>, Dag-Erling Smorgrav <des@freebsd.org>
Subject:   [PATCH] Build error with buildworld and -j1 on a memory backed  /usr/obj
Message-ID:  <AANLkTildcwTnUiCNReWDoCm9Hf9d1JEmV4t4K-40HYSC@mail.gmail.com>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
    The build for r209530 failed with a clean workspace and a clean
/usr/obj/scratch. I was building with a memory-disk backed /usr/obj.
Here's the error:

===> usr.bin/ar (depend)
lex -t  /scratch/freebsd/current/usr.bin/ar/acplex.l > acplex.c
yacc -d /scratch/freebsd/current/usr.bin/ar/acpyacc.y
cp y.tab.c acpyacc.c
rm -f .depend
mkdep -f .depend -a    -I. -I/scratch/freebsd/current/usr.bin/ar
/scratch/freebsd/current/usr.bin/ar/ar.c acplex.c acpyacc.c
/scratch/freebsd/current/usr.bin/ar/read.c
/scratch/freebsd/current/usr.bin/ar/util.c
/scratch/freebsd/current/usr.bin/ar/write.c
/scratch/freebsd/current/usr.bin/ar/ar.c:66:21: error: archive.h: No
such file or directory
/scratch/freebsd/current/usr.bin/ar/acpyacc.y:35:21: error: archive.h:
No such file or directory
/scratch/freebsd/current/usr.bin/ar/acpyacc.y:36:27: error:
archive_entry.h: No such file or directory
/scratch/freebsd/current/usr.bin/ar/read.c:33:21: error: archive.h: No
such file or directory
/scratch/freebsd/current/usr.bin/ar/read.c:34:27: error:
archive_entry.h: No such file or directory
/scratch/freebsd/current/usr.bin/ar/write.c:34:21: error: archive.h:
No such file or directory
/scratch/freebsd/current/usr.bin/ar/write.c:35:27: error:
archive_entry.h: No such file or directory
mkdep: compile failed
*** Error code 1

Stop in /scratch/freebsd/current/usr.bin/ar.
*** Error code 1

Stop in /scratch/freebsd/current/usr.bin.
*** Error code 1

Stop in /scratch/freebsd/current.
*** Error code 1

Stop in /scratch/freebsd/current.
*** Error code 1

Stop in /scratch/freebsd/current.

    I think this is due to dependency issues with libarchive. I had
some changes in my p4 workspace to address the libarchive dependency
for libpkg (for work that's incoming in the next couple of months)
that Warner helped me out with, and once I applied the change things
worked. The patch is attached.

Thanks,
-Garrett

PS This might also resolve some other outstanding issues related to
build dependencies with libarchive, like with the ia64 lzma issue that
DES and a few other folks have been munging over for a while now.

[-- Attachment #2 --]
--- Makefile.inc1	2010-06-25 21:13:35.000000000 -0700
+++ ../perforce/pkg_install-enhancements/Makefile.inc1	2010-06-26 13:11:02.000000000 -0700
@@ -1,5 +1,5 @@
 #
-# $FreeBSD$
+# $FreeBSD: src/Makefile.inc1,v 1.656 2010/06/24 17:53:25 imp Exp $
 #
 # Make command line options:
 #	-DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
@@ -1017,10 +1017,6 @@
 _rescue= rescue/rescue
 .endif
 
-.if ${MK_SYSINSTALL} != "no"
-_sysinstall=		usr.sbin/sysinstall
-.endif
-
 build-tools:
 .for _tool in \
     bin/csh \
@@ -1032,7 +1028,7 @@
     ${_aicasm} \
     usr.bin/awk \
     lib/libmagic \
-    ${_sysinstall}
+    usr.sbin/sysinstall
 	${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \
 		cd ${.CURDIR}/${_tool}; \
 		${MAKE} DIRPRFX=${_tool}/ obj; \
@@ -1125,16 +1121,15 @@
 _prebuild_libs=	${_kerberos5_lib_libasn1} ${_kerberos5_lib_libheimntlm} \
 		${_kerberos5_lib_libhx509} ${_kerberos5_lib_libkrb5} \
 		${_kerberos5_lib_libroken} \
-		lib/libbz2 lib/libcom_err lib/libcrypt \
-		lib/libexpat lib/libfetch \
-		${_lib_libgssapi} ${_lib_libipx} \
+		lib/libarchive lib/libbz2 lib/libcom_err lib/libcrypt \
+		lib/libexpat lib/libfetch ${_lib_libgssapi} ${_lib_libipx} \
 		lib/libkiconv lib/libkvm lib/liblzma lib/libmd \
 		lib/ncurses/ncurses lib/ncurses/ncursesw \
-		lib/libopie lib/libpam ${_lib_libthr} \
+		lib/libopie lib/libpam ${_lib_libpkg} ${_lib_libthr} \
 		lib/libradius lib/libsbuf lib/libtacplus \
 		lib/libutil ${_lib_libypclnt} lib/libz lib/msun \
 		${_secure_lib_libcrypto} ${_secure_lib_libssh} \
-		${_secure_lib_libssl}
+		${_secure_lib_libssl} \
 
 .if ${MK_LIBTHR} != "no"
 _lib_libthr=	lib/libthr
@@ -1142,6 +1137,13 @@
 
 _generic_libs=	${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib
 
+.if ${MK_CRYPT} == no
+lib/libarchive__L: lib/libbz2__L lib/liblzma__L lib/libmd__L lib/libz__L
+.else
+lib/libarchive__L: lib/libbz2__L lib/liblzma__L lib/libmd__L lib/libz__L \
+		   secure/lib/libcrypto__L
+.endif
+
 lib/libopie__L lib/libtacplus__L: lib/libmd__L
 
 .if ${MK_CDDL} != "no"
@@ -1192,6 +1194,12 @@
 lib/libfetch__L lib/libradius__L: lib/libmd__L
 .endif
 
+.if ${MK_PKGTOOLS} != "no"
+_lib_libpkg=	lib/libpkg
+# Only listing direct dependencies of libpkg.
+lib/libpkg__L: lib/libarchive__L lib/libfetch__L lib/libmd__L lib/libutil__L
+.endif
+
 .for _lib in ${_prereq_libs}
 ${_lib}__PL: .PHONY
 .if exists(${.CURDIR}/${_lib})

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