Chad’s president says at least 40 soldiers were killed in attack on a military base on Sunday night.