If you can’t possibly put the stack through the roof, you may do it using the wall. However, there are certain conditions for vent plumbing. The most important is a smart ventilation system, so the air could circulate.