[ovs-dev] [PATCH v2] openvswitch: Use libtool and allow building shared libs

Ben Pfaff blp at nicira.com
Mon Dec 9 19:19:21 UTC 2013


On Mon, Dec 09, 2013 at 10:32:06AM +0100, Helmut Schaa wrote:
> Currently openvswitch builds all libraries static only. However,
> libopenvswitch is linked into nearly all openvswitch executables
> making it hardly possible to run openvswitch on embedded devices
> (for example running OpenWrt).
> 
> Convert openvswitch to use libtool for building its internal libs.
> This allows "--enable-shared" and "--enable-static" as configure
> arguments. Default is "--disable-shared" thus keeping the current
> behavior with the only change that static libs are installed by
> "make install".
> 
> Since the openvswitch library interfaces are internal and thus not
> stable (yet) encode the openvswitch version into the library name:
> libopenvswitch-2.0.90.so

...

> Signed-off-by: Helmut Schaa <helmut.schaa at googlemail.com>

I'm inclined to apply this, but a few potential issues come to mind.

The Red Hat packaging tends to complain when new files get installed:
it has a whitelist of files that are supposed to be installed.  So,
did you check whether the RHEL packaging still works?

The OVS tree has a couple of features that use linker tricks.  You can
find these in the Makefiles and code by searching for
USE_LINKER_SECTIONS.  I suspect that these will break in a shared
library environment.  There are fallbacks that do not use linker
tricks, but I'm not sure that the fallbacks will be much better.  Do
you have any thoughts about what to do?  (If it's not obvious what
these features intend to do, then please ask and I will explain.)



More information about the dev mailing list