[Xorp-users] Builing xorp with --enable-shared vs --with-pic

Bruce M Simpson bms at incunabulum.net
Mon Oct 6 08:32:27 PDT 2008


Jose Manuel dos Santos Calhariz wrote:
> What is the diference of building xorp using switch --enable-shared vs
> --with-pic in a Linux system.
>   

Please don't pass these options to top-level configure as they are not 
supported, this is why configure.in contains AC_DISABLE_SHARED.

[They MAY be supported in future, though I've had more success in this 
regard with non-GNU build systems i.e. Boost.BuildV2.]

The mibs/ directory was broken out into a separate Autoconf package with 
libtoolization for this reason, it is the only part of XORP which should 
currently be building with shared library support, as the Net-SNMP 
extension modules specifically need to be ".so" files.

> If building xorp with snmp support it will generate shared libraries
> for mibs that are made with objects compiled without -fPIC.  This is a
> problem in Linux and even breaks on x86_84 systems.  
>   

We do use various static libraries to build XORP objects in the mibs 
directory.

To date, I haven't been aware of any problems with this, as we don't try 
to expose symbols in those objects outside of the .so libraries we have 
built, and this has worked on the primary development platform, FreeBSD.

If this is now causing problems with how amd64 platforms implement -fPIC 
relocations, then we probably need to revisit the shared library issue 
on a tree-wide basis.

thanks
BMS



More information about the Xorp-users mailing list