Regarding the unfortunate stack size - isn't there a setting that says
something like "use half of available memory for stack"? That could be
better than trying 32, 64, 96 kB...
It is but in the mint.cnf you can limit the amount of that available memory per process -- if this is too low, bad crashes occur. But I personally think this is not a g++ stack issue.