[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] C++ Stuff

Vincent Rivière wrote:
Mark Duckworth wrote:
It simply just kills aranym with a bus error no matter what I set the stack to (32K, 64, etc).

On my ARAnyM setup, I have g++ 2.95.3 and binutils 2.18.
I reproduced more or less the same bug as you. Instead of displaying the substring, the programs displays the whole memory, so obviously the string we want to display contains a bad pointer. That looks like a g++ bug, they are usually very hard to isolate (and I'm not going to spend my time on gcc 2.95.3).

> Maybe I should just upgrade to the later versions and we should stop
> using 2.95.3 already.

Personally, I feel very comfortable with cross-compilation. From Windows, you can edit your C/C++ programs with Visual Studio, then compile in a Cygwin window, and if your build dir is mounted in the ARAnyM filesystem, you just have to do Alt+TAB to switch to ARAnyM and run your program inside TOSWIN/bash.

Furthermore, a cross-compiler running on a supported gcc host (Cygwin or Linux) has potentially less bugs than a native gcc running on unsupported host (MiNT). Hopefully, compilers use very few system functions (mainly file I/O), so the potential bugs due to the unsupported host are somehow limited.

The problem is that we didn't manage to make a clean native build of GCC 4.X, with RPM packages. Some experimental binaries have been built by some people. As far as I remember, MiKRO managed to build a native gcc 4.3.2 on 04/10/2008. He will certainly share his binaries with you if you want to experiment.

Note: the problem with the gcc is the size of its sourcecode. It takes literally hours to build a cross-compiler on a recent machine. For building it from ARAnyM, it takes more, more time... So debugging the build scripts and fixing build problems requires to have a huge amount of time and patience.

Ok, well I guess I will work on it. Since we don't even have a working g++ compiler right now even though this 2.95.3 setup has been around for years, obviously we can suitably replace it without worrying. Binutils has been updated years ago to 2.18 by Keith Scroggins and I. Somehow though it's not in sparemint. I'm not sure why. I think we need a formal submission process for sparemint. Right now we upload packages and Frank if he's available goes over them but this really isn't working now nor was it back then. It's part of the reason I got discouraged and didn't bother anymore. I can find all my build scripts but I trust yours better. I'm pretty good at making RPM's from these though, and there are a number of ways to cheat the RPM build process so that you can fix bugs incrementally rather than restarting the build process. Building rpm's of things like gcc mainly involves sending alerts to yourself so hours later when something finishes you get an SMS letting you know. Makes it easier.