24 January 2008
Librarian-NG: Solve your unresolved linkage dependancies FAST.
Posted by aastaneh under: Uncategorized .
We at Research Computing build and manage many kinds of software written in all kinds of languages (C, Fortran, R), and built with many types of compilers (gcc, Intel, PGI). Consequently, we have a ton of libraries. When building software to install on our systems, it usually takes a long time. Not all developers use automake, and therefore, it makes the process hard on us. Usually, during the linking stage of the build, the build system(make, usually) will abort, kicking and screaming about some function call whose library is not present.
If there was only a way to speed up the process..
It would be great to just ask the computer:
“Hey, You got function foobar installed?”
And it would be even greater if the computer replied:
“Yea, I got it, and here’s the library that has it!”
Guess what? In the nineties a professor at USF named David Rabson implemented such a solution called Librarian. It was written in C, used ndbm as it’s database backend, and did the job. You gave it the symbol/function name, and it gave you a list of possible candidates to link against. Good times.
But then Brian and I looked at it. We both agreed, it did the job. But there were some key features that we wanted that were missing, primarily being able to query using the all-powerful regular expression. Since ndbm didn’t support regexes, and after some research I found that MySQL did.. one thing led to another and..
Enter Librarian-NG. I ended up reimplementing the whole sucker in Perl. Even edited the man pages.
Example:
[aastaneh@host ~]$ lbnlookup malloc
Symbol Name Location
---------------------------------------
malloc: /usr/lib/libc.a
malloc: /usr/lib/syslinux/com32/libcom32.a
malloc: /usr/lib64/libc.a
malloc: /opt/priv/openmpi-1.2.4/pgi-7.0-7/lib/libopen-pal.a
malloc: /opt/priv/openmpi-1.2.3-pgi-7.0-i386/lib/libopen-pal.a
Download: librarian-ng-1.0.0.tar.gz
2 Comments so far...
aastaneh Says:
28 January 2008 at 12:07 pm.
Yes it does, as of last Friday. I’ll create one more update to it and that should be sufficient for a informal distribution. Packaging for Sourceforge will come later when more things are sorted out.
Leave a Reply
You must be logged in to post a comment.