Date: Thu, 19 Oct 2006 22:48:43 +0300 From: "Alexander I. Mogilny" <amogilny@gmail.com> To: freebsd-current@freebsd.org Subject: Re: buildworld failure on i386 Message-ID: <20061019194843.GA72274@sg.intra> In-Reply-To: <20061018104103.GA34707@sg.intra> References: <20061018104103.GA34707@sg.intra>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Alexander I. Mogilny wrote me on Wed, Oct 18, 2006 at 01:41:03PM +0300
>
> Here is the error I get.
> Sources updated today (half an hour ago from cvsup5.freebsd.org)
>
> In file included from
> /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/eh_unex_handler.cc:30:
> /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: unwind.h: No such file or directory
> In file included from
> /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/pure.cc:31:
> /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: unwind.h: No such file or directory
> In file included from
> /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/vec.cc:37:
> /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: unwind.h: No such file or directory
> mkdep: compile failed
> *** Error code 1
>
> Stop in /usr/src/gnu/lib/libstdc++.
> *** Error code 1
>
Hi all, sorry for foolish error report. I have deeply explored into the
problem and found the root of issue.
While build of libstdc++ library depend target is executed first. This
target is executed in two stages due to list of sources contains .c
files and .cc files:
According to bsd.dep.mk:
1. first stage:
${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \
${MKDEP_CFLAGS} ${.ALLSRC:M*.[cS]}
2. second stage:
${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \
${MKDEP_CXXFLAGS} \
${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cpp} ${.ALLSRC:M*.cxx}
I would like to pay attention to MKDEP_CXXFLAGS and MKDEP_CFLAGS
variables. Here is the way they are initialized:
MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BID]*}
MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BID]*}
According to Makefiles in gnu/lib/libstdc++ and gnu/lib/libsupc++ we
have that only CFLAGS variable contains include directories. As a result
MKDEP_CXXFLAGS variable is empty and mkdep utility fails with error
desribed above.
The most proper solution here is to define variable containing include
directories and add it to CFLAGS and CXXFLAGS (I chosed this solution
because when simply define MKDEP options as a list of include
directories I also had an error on libstdc++ build stage as CXXFLAGS did not
contain inlude directories). It is very stange why nobody had this error
occured while buildworld procedure. Here are patches which fix the issue.
Please correct me if anything is wrong.
--- libstdc++/Makefile.orig Thu Oct 19 21:41:44 2006
+++ libstdc++/Makefile Thu Oct 19 22:25:12 2006
@@ -15,8 +15,10 @@
.if ${MACHINE_ARCH} == "arm"
CFLAGS+= -D_GLIBCXX_SJLJ_EXCEPTIONS=1
.endif
-CFLAGS+= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include
+INCDIRS= -I${.CURDIR} -I${SUPDIR} -I${GCCDIR} -I${SRCDIR}/include
+CFLAGS+= ${INCDIRS}
CFLAGS+= -frandom-seed=RepeatabilityConsideredGood
+CXXFLAGS+= ${INCDIRS}
CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections \
-Wno-deprecated
--- libsupc++//Makefile.orig Thu Oct 19 22:04:18 2006
+++ libsupc++//Makefile Thu Oct 19 22:34:52 2006
@@ -17,9 +17,11 @@
# from libiberty:
SRCS+= cp-demangle.c
+INCDIRS= -I${SRCDIR} -I${GCCDIR} -I${.CURDIR}/../libstdc++
CFLAGS+= -DIN_GLIBCPP_V3 -DHAVE_CONFIG_H
-CFLAGS+= -I${SRCDIR} -I${GCCDIR} -I${.CURDIR}/../libstdc++
+CFLAGS+= ${INCDIRS}
CFLAGS+= -frandom-seed=RepeatabilityConsideredGood
+CXXFLAGS+= ${INCDIRS}
CXXFLAGS+= -fno-implicit-templates -ffunction-sections -fdata-sections
HDRS= exception new typeinfo cxxabi.h exception_defines.h
--
AIM-UANIC +-----[ FreeBSD ]-----+
Alexander Mogilny | The Power to Serve! |
<> amogilny@gmail.com +---------------------+
[-- Attachment #2 --]
BZh91AY&SY-:
8 ]_ 0\Ŀ@' %D1
44 ѐ 9&L0&&!0#12dф14&i2a&&DSځh5U(PM-hYDbȸQJ>qa^!3$q뾔[uVH`2IRwRyPM1{ӡ+b&vS)Ѻ"zK}s*^sZJAƛ"cq7Kȗ>i|hC6jyI腤2wa1Av2%G;-Z+}` nz[g)z(s`mAԄ-ݙ)00ZYʤlVUaqxzoNj·`|xk<<KSK&J%m~qfL̤PZ:_ysFr4|a{ÒXߌ/)ޢ()kX;]mqb',4e(Dr62Xo".rVo`T4se#I.p Ztp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061019194843.GA72274>
