In most cases, roof racks will be compatible with a vehicle with a sunroof. Sometimes fitting racks to the car means you can no longer use the sunroof but most of the time this is not the case.
Most sunroofs will not be impeded by either roof racks or platforms as most sunroofs move back inside the roof rather than popping up above the roof. For the sunroofs that do pop above the roof, some vehicles even have the option of shorter platforms that leave the sunroof unobstructed, as below.
Please exercise caution when using the sunroof for the first time after the rack is installed to ensure the rack does not make contact with the sunroof. Make sure you check the clearance on the bar itself and the legs/mounting hardware. Opening the sunroof with roof racks installed will likely be quite noisy at high speeds due to the increased wind noise produced by the racks.