From owner-freebsd-current@FreeBSD.ORG Thu Oct 19 19:48:50 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 994E216A407 for ; Thu, 19 Oct 2006 19:48:50 +0000 (UTC) (envelope-from amogilny@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 142EC43D58 for ; Thu, 19 Oct 2006 19:48:48 +0000 (GMT) (envelope-from amogilny@gmail.com) Received: by nf-out-0910.google.com with SMTP id p77so1160121nfc for ; Thu, 19 Oct 2006 12:48:47 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=EJxy7eSEwg4jRjDGmn7a+Dq89xpF35TaEuowVyOOp25P7O/XGDT5m3jaj0LPqhIcyouHELuxD3NM6/lXEvVylEF28Um4oXgjbwWO8XBGo8D3iEL4VgDTgO1bHQT7VIzYg9EkDB72Lt2Pcb8wVm7NC/3qN+2bXoiZedKT7HIWJD0= Received: by 10.49.8.15 with SMTP id l15mr6574556nfi; Thu, 19 Oct 2006 12:48:47 -0700 (PDT) Received: from localhost ( [85.202.168.142]) by mx.google.com with ESMTP id r33sm2063700nfc.2006.10.19.12.48.45; Thu, 19 Oct 2006 12:48:46 -0700 (PDT) Date: Thu, 19 Oct 2006 22:48:43 +0300 From: "Alexander I. Mogilny" To: freebsd-current@freebsd.org Message-ID: <20061019194843.GA72274@sg.intra> References: <20061018104103.GA34707@sg.intra> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline In-Reply-To: <20061018104103.GA34707@sg.intra> User-Agent: Mutt/1.4.2.2i Subject: Re: buildworld failure on i386 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2006 19:48:50 -0000 --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=koi8-r Content-Disposition: inline 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 +---------------------+ --VS++wcV0S1rZb1Fb Content-Type: application/octet-stream Content-Disposition: attachment; filename="Makefile.patch.bz2" Content-Transfer-Encoding: base64 QlpoOTFBWSZTWS06CjgAAF1fgAAwXA//8n/338S/797qQAInAAAlRJkxDTQ0ANGQAADI0BkA OaYmTJowmCYmmATAIYIwIwHNMTJk0YTBMTTAJgEMEYEYAqppATJhJiZE1P0U9J5T1NqBtQbK aPE1B+qKVRAokISAUNkcELtNLbX4GrloWaZErRJiyLjgUUqvPtlxsQOAueQeYeGQXqPMIR6B MyRx2Ou+lMntWwawdZOaVh1IYJkyl8pJUpd33RGkoVIRoIShBH950FBN6ZIxe53u9xOy7d7T odDZK2ImtdHA7uB2U/gp0boiekt99nPSKqpec64X9lqiukoXxEHGm62alPSlwiISjGMO93E3 S8vIl7fj2vI+aXyeaEPbNpe5Dxqv8p8CxWp5lq5J6IWkMqZ3YdMUMUEIdhUyJauVR887F6Ut j+ta8yt9YJOeywluelvaZyl6oxjI+ij6c2BtiosZQdSEpYktHPLm3ZmMKTDwMFpZjvz5yqSL 6GzDVlXh8fycYdZxeHr9b4vHi/X94hCXwreKFmCpi6OsmqN8eKD1azzdPBe0S1MUSybf4LtK hQ4llcVtfvUcqHGppbdmTMykhVCnWqU6X3lzkkamFXI0Fa98FGGQzXuY1s3+w5LkFKhY34wv lSmQ3qLlFsT44rEo2ym0a1g7XW2scWLw6icsGqbBnTRlKERypTbkrzJYbyK0LqkQclbZ7G9g uYdUNHOcZSO86UnhB/4u5IpwoSBadBRw --VS++wcV0S1rZb1Fb--