[openib-general] Static linking with libibverbs

Jeff Squyres jsquyres at cisco.com
Thu Nov 2 04:40:50 PST 2006


On Nov 2, 2006, at 3:19 AM, Michael S. Tsirkin wrote:

>>> static linking actually can be made to work even with older  
>>> library versions.
>>> See this HowTo (written on 02 of November, 2005).
>>> https://openib.org/tiki/tiki-index.php?page=HowToFAQ
>>
>> That's not really static linking.
>
> OK, its a difference of terms then :)

Static linking means making an executable that does not link to  
dynamic libraries at all (e.g., run "ldd a.out" and it says "not a  
dynamic executable").  Linking to static libraries is simply that --  
linking to static libraries.

>> If you try to build a true static
>> executable, which contains static libc and in particular static  
>> libdl,
>> there's no way the old code can work, for multiple reasons.  For one
>> thing, dlopen(NULL, RTLD_NOW) doesn't work on static executables so
>> libibverbs couldn't find a low-level driver that is statically linked
>> in.
>
> Does linking in low level driver work now even with -static?

Yes.  See the FAQ items on the OMPI web site from my first mail.

-- 
Jeff Squyres
Server Virtualization Business Unit
Cisco Systems





More information about the general mailing list