Why do old books smell so damn good?
Lignin is found in wood, and as such is the second most common organic polymer found on Earth, second only to cellulose. In any lump of dry wood lies somewhere between 25% and 33% lignin.
Since Lignin is found in wood, it is hence found in paper- therefore also in books. But it is not what gives secondhand bookshops their warming fragrance.
The monomers that make up lignin are very closely related to Vanillin- the organic compound that gives vanilla beans their scent.
Over time, the lignin found in book paper degrades into its monomers that resemble vanillin, and they adopt the withered-book scent as such.