 Olegarius was born to a noble family of Barcelona.His father was a follower of Ramon Berenguer I, Count of Barcelona; his mother was Guilia.At the age of ten, Olegarius entered the guild of canon priests of the Cathedral of Barcelona.