From owner-freebsd-ports@FreeBSD.ORG Thu Apr 15 12:17:44 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30A1916A4CE; Thu, 15 Apr 2004 12:17:44 -0700 (PDT) Received: from odot.okladot.state.ok.us (odot.okladot.state.ok.us [192.149.244.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B73443D2D; Thu, 15 Apr 2004 12:17:43 -0700 (PDT) (envelope-from root@techpc04.okladot.state.ok.us) Received: from notes9c.okladot.state.ok.us (notes9a.okladot.state.ok.us [10.36.36.31])OAA15304; Thu, 15 Apr 2004 14:17:42 -0500 Received: from techpc04.okladot.state.ok.us ([199.27.9.37]) by notes9c.okladot.state.ok.us (Lotus Domino Release 5.0.12) with ESMTP id 2004041514175821:97266 ; Thu, 15 Apr 2004 14:17:58 -0500 Received: by techpc04.okladot.state.ok.us (Postfix, from userid 0) id 6A8DF5C17; Thu, 15 Apr 2004 14:17:51 -0500 (CDT) To: , From: "Paul Seniura" Errors-To: "Paul Seniura" Sender: "Paul Seniura" Importance: High In-Reply-To: <20040412173224.F23905C54@techpc04.okladot.state.ok.us> References: <20040412173224.F23905C54@techpc04.okladot.state.ok.us> <20040402210539.70E945C3B@techpc04.okladot.state.ok.us> <20040408183258.10A7A5C43@techpc04.okladot.state.ok.us> <20040408194909.8AAD1790058@ws1-14.us4.outblaze.com> Message-Id: <20040415191751.6A8DF5C17@techpc04.okladot.state.ok.us> Date: Thu, 15 Apr 2004 14:17:51 -0500 (CDT) X-MIMETrack: Itemize by SMTP Server on Notes9c/ODOT(Release 5.0.12 |February 13, 2003) at 04/15/2004 02:17:58 PM,2003) at 04/15/2004 02:17:59 PM, Serialize complete at 04/15/2004 02:17:59 PM Subject: I Found What The Real Problem Is... (you're gonna hate me) (re: I *really* need help PLEASE - buildworld failing on mkdep libstdc++ can't find unwind.h but it *is* there) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Paul Seniura List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2004 19:17:44 -0000 I thank everyone who tried to help me on this problem. I'm 99% certain the problem stems from known compiler bugs when using the lang/gcc* ports. I can actually point to a few PRs in GCC's bug database that may be related. The timings of the commits that fix these bugs, together with the lang/gcc* snapshots, and the fact that the -Current system gcc has not been updated since 3.3.3-prerelease, all conspired to cause these glitches in the build process. That is my theory, anyway. The GCC-3.3.4 status page at begins a thread on some of these optimization bugs that have regressed back into the current lang/gcc33 snapshot. The consensus there seems to be that these bugs must be fixed before 3.3.4 is released as final. If you follow the previous-msg thread up from this post, I requested to update lang/gcc33 (aka 3.3.4) with a new snapshot. But I'm not certain we'd get all the regressed bugs fixed just yet. My previous msg was actually related to my trying to switch back to using system gcc. However, the 3.3.3 was released in mid-February, and these bugs were supposed to be fixed in it. At this time I'd like to find some way of using _this_ release as our system gcc, esp. if we cannot get a current snapshot of 3.3.4 (update lang/gcc33). How I got led to this discovery, for documentations's sake: I tried everything, esp. DES's cleandir procedure, several times. (That is a good thing to know how to do.) Besides that, I always blow away /usr/obj/* when building a fresh world or kernel. In my earlier msg, I'd stated I had run 'make installworld' using a /usr/obj bzip2ball from the jpsnap site, dated 20040410, which would've matched rather closely to my CTM status at that time. I felt my /usr/include was already 'fixed' by this action. To prove this, I needed a current 'live CD' to compare against. (The jpsnap server is terribly slow; I've e-mailed the sysop there. None of the ftp*.tw mirrors have any -Currents in April at all.) I was finally able to get a live-5.2-current ISO dated 20040410, close enough to the CTM deltas I'd applied when I posted my original plea for help. After installing world from the bzip2ball, and recreating the stuff in /usr/include with DES's proc, I ran 'diff -r' between my /usr/include and the one on the live-5.2-20040410 CD. The diffs therein could all be explained: some diffs were commits done since 20040410, other diffs (esp. files "only in" the CD) were from stuff not built due to NO_foo=yes set in /etc/make.conf. Absolutely no real differences at all. Also, the installworld from the bzip2ball *should* have fixed the libs so that I could run system gcc and skirt around the known lang/gcc* bugs. I previously mentioned that I'd cleaned out /lib and /libexec, and fixed ldconfig in rc.conf (some ports were built with lang/gcc33 and must continue to use libgcc from lang/gcc33, so that had to remain as the last entry in ldconfig). None of that fixed the problem. Okay. We need to treat this as tho we're using a buggy gcc. I still can't rule out bad C src as the real problem, but we need to find another way to skirt around these known bugs. One of the optimizing PRs on GCC mentioned -O[1] was affected as well as -Os, but -O2 was okay. So I changed make.conf to add -O2 to all CFLAGS and permutations thereof I could think-up. BINGO! We got thru a buildworld without a problem! The only thing I changed was to use -O2. Just for good measure, I installed that version with -O2 and a fresh kernel, rebooted, and started a whole new build process with _those_ libs active. I have installed that doubled-up whole fresh version and am running it now. I am testing builds of world & kernel as of this morning's CTM, setting -Os again, and so far we haven't hit a glitch; this slow Puny Pentium2 has already passed the point where building libstdc++ was broken, so we got a good -Os build of it, at least. I really need to urge to y'all the importance of using a good working compiler to do all testing & debugging. The final release of 3.3.3 was in February, and we have no ports or system gcc using it AFAIK. These bugs are supposed to be fixed in it. I'm tracking -Current via CTM, and 'gcc --version' now shows: gcc (GCC) 3.3.3 [FreeBSD] 20031106 Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. We desparately need the 200402xx final version, please. And: Unless the snapshots get updated, too, we cannot use them at all. Thank you for putting up with my long writeup. I'm hoping this will show the importance of getting gcc updated ASAP. -- Paul Seniura System Specialist State of Okla. D.O.T.