[ovs-dev] [PATCH v3] Build: Shared libraries and versioning

Scott Mann sdmnix at gmail.com
Wed Nov 12 19:12:44 UTC 2014


Thank you. See (some of you?) next week!

On Wed, Nov 12, 2014 at 8:44 AM, Flavio Leitner <fbl at redhat.com> wrote:

> On Wed, Nov 12, 2014 at 08:38:44AM -0800, Ben Pfaff wrote:
> > On Wed, Nov 12, 2014 at 02:13:48PM -0200, Flavio Leitner wrote:
> > > On Tue, Nov 11, 2014 at 10:09:49PM -0800, Ben Pfaff wrote:
> > > > On Tue, Nov 11, 2014 at 07:28:50PM -0800, Scott Mann wrote:
> > > > > Let me know what you want me to change, if you want me to do it.
> I'm still
> > > > > paying attention :)
> > > >
> > > > I folded in the following change to improve the Autoconf quoting
> (see, I
> > > > said it was minor) and update AUTHORS, and applied this to master.
> > > >
> > > > diff --git a/configure.ac b/configure.ac
> > > > index 9fa94f3..c3b26ec 100644
> > > > --- a/configure.ac
> > > > +++ b/configure.ac
> > > > @@ -72,11 +72,11 @@ m4_define([libopenvswitch_lt_revision],   [0])
> > > >  m4_define([libopenvswitch_lt_age],        [0])
> > > >
> > > >  LT_CURRENT=libopenvswitch_lt_current
> > > > -AC_SUBST(LT_CURRENT)
> > > > +AC_SUBST([LT_CURRENT])
> > > >  LT_REVISION=libopenvswitch_lt_revision
> > > > -AC_SUBST(LT_REVISION)
> > > > +AC_SUBST([LT_REVISION])
> > > >  LT_AGE=libopenvswitch_lt_age
> > > > -AC_SUBST(LT_AGE)
> > > > +AC_SUBST([LT_AGE])
> > > >
> > > >  AC_SEARCH_LIBS([pow], [m])
> > > >  AC_SEARCH_LIBS([clock_gettime], [rt])
> > > > diff --git a/AUTHORS b/AUTHORS
> > > > index a15665a..2d30cb1 100644
> > > > --- a/AUTHORS
> > > > +++ b/AUTHORS
> > > > @@ -131,6 +131,7 @@ Samuel Ghinet
> sghinet at cloudbasesolutions.com
> > > >  Sanjay Sane             ssane at nicira.com
> > > >  Saurabh Shah            ssaurabh at nicira.com
> > > >  Scott Lowe              scott.lowe at scottlowe.org
> > > > +Scott Mann              sdmnix at gmail.com
> > > >  Selvamuthukumar         smkumar at merunetworks.com
> > > >  Shan Wei                davidshan at tencent.com
> > > >  Shih-Hao Li             shli at nicira.com
> > >
> > > It doesn't work here:
> > >
> > > master]$ git log --oneline -2
> > > 7f2f24e Build: Add support for shared libraries and versioning.
> > > 86f35fb util: Add be32_prefix_mask().
> > >
> > > master]$ ./boot.sh && ./configure --enable-shared && make
> > > [...]
> > > /bin/sh ./libtool  --tag=CC   --mode=link gcc -std=gnu99
> > > -Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith
> > > -Wno-format-zero-length -Wswitch-enum -Wunused-parameter
> > > -Wbad-function-cast -Wcast-align -Wmissing-prototypes
> > > -Wmissing-field-initializers -fno-strict-aliasing   -g -O2     -o
> > > utilities/ovs-appctl utilities/ovs-appctl.o lib/libopenvswitch.la
> > > -latomic -lpthread -lrt -lm
> > > libtool: link: gcc -std=gnu99 -Wstrict-prototypes -Wall -Wextra
> > > -Wno-sign-compare -Wpointer-arith -Wno-format-zero-length
> > > -Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align
> > > -Wmissing-prototypes -Wmissing-field-initializers -fno-strict-aliasing
> > > -g -O2 -o utilities/.libs/ovs-appctl utilities/ovs-appctl.o
> > > lib/.libs/libopenvswitch.so -lssl -lcrypto -latomic -lpthread -lrt -lm
> > > -Wl,-rpath -Wl,/usr/local/lib
> > > lib/.libs/libopenvswitch.so: undefined reference to `crc32c'
> > > lib/.libs/libopenvswitch.so: undefined reference to `sort'
> > > collect2: error: ld returned 1 exit status
> > > make[2]: *** [utilities/ovs-appctl] Error 1
> > >
> > > master]$ objdump -t lib/sort.o | grep .text
> > > 0000000000000000 l    d  .text      0000000000000000 .text
> > > 0000000000000000 l     F .text      0000000000000109 quicksort
> > > 0000000000000110 g     F .text      0000000000000013 sort
> > >
> > > master]$ objdump -t lib/crc32c.o | grep .text
> > > 0000000000000000 l    d  .text      0000000000000000 .text
> > > 0000000000000000 g     F .text      0000000000000031 crc32c
> > >
> > > I guess it's missing the shared version.
> > > Am I missing something?
> >
> > I get similar results for the same commands, with --enable-shared:
> >
> > blp at sigabrt:~/nicira/ovs/_build(130)$ objdump -t lib/sort.o | grep .text
> > 00000000 l    d  .text        00000000 .text
> > 00000000 l    d  .text.unlikely       00000000 .text.unlikely
> > 00000000 l     F .text        000000ef quicksort
> > 000000f0 g     F .text        0000001f sort
> > blp at sigabrt:~/nicira/ovs/_build(0)$ objdump -t lib/crc32c.o | grep .text
> > 00000000 l    d  .text        00000000 .text
> > 00000000 l    d  .text.unlikely       00000000 .text.unlikely
> > 00000000 g     F .text        00000039 crc32c
> > blp at sigabrt:~/nicira/ovs/_build(0)$
> >
> > except that mine works OK.
>
> Never mind, ``make clean创 fixed it.
>
> fbl
>



-- 
-Scott



More information about the dev mailing list