There are a few issues you would need to look at when you are building/constructing a rooftop garden. If you do construct one you will need to have a structural engineer come to have a look to see if your roof is able to hold the weight of the soil. Also you will need water, there might not be enough water to water all the plants. The water might be too acidic or too alkaline.
You also need to think about the weather and how it will affect your plants. One day it could be too sunny and hot or even to cold then all your plants all die. But you have this issue as well in a normal farm, so it doesn’t contribute a major issue. What you can do to fix to much sun is put a shade cloth on your roof. You can’t put a shade cloth on a massive farm, so that can benefit you.You will have to think about pests and diseases, but you can avoid this by using methods that is used on normal farms or just general methods.