Ugh. Okay, let's get your head around the vast amounts of heat required for a foundry so that you'll see why simply having "more solar panels" isn't going to do the trick.
a single 400-watt 1 sq meter solar panel on earth only produces 150-watts on mars. Therefore a single panel on Mars would produce ~750wh per day (martian day is only 37 mins longer than an earth one). To recycle (at industrial scale, while micro foundry would need more energy) Al takes 390wh for each kg of Al. Smelting Al takes 6kwh/kg. So to "grow" just the living space, you'll need 9 sq meters of additional solar cells to make 1kg of Al per day and more additional panels to run the machines to turn the Al into sheet goods. SpaceHab (the habitation module of the ISS) weighs 5,000 kgs and is mostly aluminium.
Producing silicon wafers (pre-requisite for making photovoltaic cells) takes 340wh per sq cm, and another 1.5kwh to turn that into a solar cell. So to produce a single solar panel (ignoring the energy it took to extract and mine for those raw materials and the production of clean water to run the process) a day, it would take 18.4 mwh of energy, or 30,700 panels (not to mention the conduits, conductors, and dc-dc converters to connect all those panels together). And you'll need batteries to buffer that power too. So just to double the size of the solar field to produce 2 solar panels a day instead of just 1, you'll need that field of panels dedicated to the task for over 80 years (MUCH longer in reality, because I still didn't calculate for the energy needed to keep the panels clean and water and other chemicals and minerals in the fabrication process). That field of panels will have stopped working well before they could even build their replacement panels!
Space isn't the issue (whether on mars or in space), lack of heat is!
As for the lack of gravity, that actually helps industrial processes and is a benefit for space colonies. I get that people need gravity, but that "should" be solvable through centripetal acceleration (space colonies have very large diameters, so vertigo "shouldn't" occur). I've put the "should" in quotes, because it's only true in theory, but yet to be verified in practice.