第一句是正确的.
首先 by the end of+将来的某个时间点 要用将来完成时.
例句 He'll have finished all his work by the end of next week.
就类似于我们高中所学的by the end of+过去某个时间点用过去完成时一样道理.
比如he had finished the task by the end of last month.
其次 桥是被建造的 所以为被动.
故整句话既要有will have done的时态 也要有sth be done的结构
所以是will have been built