This sentence is pretty tricky but its content is nice :D :
Philosophers from the ancient world declare that fortune/happiness is the aim of every human being and, themselves, they wracked their brains about how to get there.
So basically what it means is: Even a thousand of years ago people knew that happiness is the key to everything but nobody knew how to achieve happiness.