Matthew Palmer wrote:
On Wed, Aug 25, 2004 at 12:45:36AM +1000, Rocci wrote:Yep, the short answer was easier, but the Long answer was very helpful and informative.
Hi folks,
I'm trying to compile source for the wpa supplicant but the linker complains about ssl.
I've got openssl installed (deb package) and I'm not sure exactly which library it's looking for.
Ideas/suggestions/clues that may point this newb to the right direction would be greatly appreciated.
Short answer:
Building programs typically requires the 'dev' version of the necessary packages to be installed. In this instance, you need to install libssl-dev.
Long answer:
The -l flag is essentially a shorthand for "look for lib<whatever>.so || lib<whatever>.a in all the configured library directories". "Configured library directories" are whatever has been configured in your linker, plus the arguments to any -L options you might have.
So, putting -lssl on the linker command line will make the linker look for (for instance) /lib/libssl.so, /lib/libssl.a, /usr/lib/libssl.so, /usr/lib/libssl.a, /usr/lib/i586-linux/libssl.so, /usr/lib/i586-linux/libssl.a, /usr/local/lib/libssl.so, /usr/local/lib/libssl.a, and so forth. (The system may start looking for .a (static libraries) only after it's finished looking for .so's in all places, I can't really remember).
So, since the linker is looking for a file called libssl.so in one of the usual library directories, you can wander over to http://packages.debian.org/, scroll to the bottom ("Search the contents of packages"), type 'libssl.so' in the keyword box, pick your distribution, and click 'Search'. That'll tell you that the libssl-dev package contains the file usr/lib/libssl.so, which solves your problem and makes everything cool.
Wasn't the short answer easier... <grin>
- Matt
Thanks for that Matt.
Rocci. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
