I have seen cast iron successfully welded, but the chances for success are much better if you have a large heat treat oven for both pre-heat and after welding slow cool down. High nickel rods are needed, but the exact best rod depends on what grade of cast iron it is, and cast irons differ quite a bit.

Brazing broken cast iron parts often works better,
and the repair has more "give" under tensile stress
when bolted back in place so re-cracking is less likely.