# standard directory for compiling scientific libraries

I'm trying to build HSL's MA57 library, and to do so, it requires METIS. I've downloaded the .tar files to my Downloads folder, but where do I actually "build" the libraries (and subsequently store the compiled files) on a Mac? Is there a best practices location, like usr/local?

• I would highly recommend using homebrew on the mac to build if you can for any standard science libraries and following their directory conventions as they seem to work well and are largely recognized. I was not aware of the distinction that @rchilton1980 mentioned which is interesting. – Kyle Mandli Jan 23 '18 at 14:58
• Thanks -- this project using homebrew seems to install them to usr/local – jjjjjj Jan 23 '18 at 16:16

I don't think there's any one right answer here. I tend to put non-system libraries in /opt, then add link directives for them manually to the Makefiles etc of whatever apps are looking for them (eg, add -L/opt/path/to/metis and -lmetis to the Makefile of MA57). It's a compromise between putting it somewhere easy to find, but trying to be hygienic and keep your installs out of the system packages. This is probably a little old school, so ymmv.
• Thanks, and to better understand nomenclature, does opt mean "optional"? I couldn't find additional detail under man hier but am getting that vibe from this Q – jjjjjj Jan 23 '18 at 3:10
• Last question: what's the -l mean in your path -l/opt/path...? – jjjjjj Jan 23 '18 at 3:14