Not able to build openCV from source

Ram=>1 Gb
storage=>15 Gb
you are right, I could install and use opencv in other ways but i just wanted to know why i can’t build opencv using normal method.