From mint-bounce@lists.fishpool.fi Wed Feb 25 18:25:50 2009 Message-ID: <49A5D31E.3030101@atari-source.org> Date: Wed, 25 Feb 2009 18:24:14 -0500 From: Mark Duckworth User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Vincent_Rivi=E8re?= CC: mint@fishpool.com Subject: Re: [MiNT] Gcc 3.3.6 v 4.0.1 References: <20090225103817.swnyw26m0wgk8osc@pop.freeola.net> <373EB9E0-576D-4D59-B0A9-829AD39EB08F@gmail.com> <49A535ED.6000008@freesbee.fr> <49A56B1A.9050304@atari-source.org> <49A5C597.9030003@freesbee.fr> In-Reply-To: <49A5C597.9030003@freesbee.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-SA-Score: -1.4 X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: mduckworth@atari-source.org Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Vincent Rivière wrote: > Mark Duckworth wrote: >> I'm stuck on gmp right now. We can get past it by disabling gmp's >> use of obstack_vprintf > > I tried to cross-build libgmp with my latest GCC 4.3.3 on Cygwin, it > has built fine. I have tricked the Makefiles to cross-build the tests > (without running them), then I ran them on ARAnyM. (I don't know why > but the C++ tests don't seem to have been built). > > Most of the test have passed without intervention. > I had to adjust the stack for three of them: > stack -S 256K t-fdiv > stack -S 256K t-tdiv > stack -S 256K reuse > After that, they ran fine. > > Then I went to the t-printf test. > I guess I got the same output as you: > gmp_obstack_vprintf wrong > fmt |%Md| > got || > want |0| > got_len -1 > ob_len 0 > want_len 1 > > The test calls gmp_obstack_vprintf(), then it turns to call the > MiNTLib in obstack_vprintf() then vprintf(). > > vfprintf() returns -1, it means failure. > Look at the MiNTLib sources at mintlib/stdio/vfprintf.c > http://sparemint.org/cgi-bin/cvsweb/mintlib/stdio/vfprintf.c?rev=1.5 > > That source is quite horrible and not debugger friendly :-( > It seems that it fails very soon due to the macro ARGCHECK() (maybe > because a bad FILE status ??) > > So maybe gmp tries to use an unsupported feature of the MiNTLib, or > there is a bug in the MiNTLib, or something totally different. > > But I'm too tired for continuing now. > LOL, I didn't even manage to trace it into the mintlib. It seemed to be failing for me during gmp_allocate() which calls malloc(). It sounds more likely though that you're on the right track moreso than I was. I am not an expert debugger of this stuff ;) Thanks, Makr