OVS doesn't do anything special when it comes to arithmetic.  I haven't
heard of Clang having trouble with this before.  You should probably
make sure that these kinds of arithmetic operations work OK in trivial
test cases with "clang -m32".

On Mon, Aug 19, 2019 at 09:09:49AM +0000, Sirvys, Andrius wrote:
> Had a go at your suggestion, however exact same issue.
> Included the full failure.
> 
>       lib/.libs/libopenvswitch.a(rconn.o): In function `llsat_mul':
>       rconn.c:(.text+0x3c0): undefined reference to `__mulodi4'
>       clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)
>       Makefile:4623: recipe for target 'utilities/ovs-testcontroller' failed
>       make[2]: *** [utilities/ovs-testcontroller] Error 1
>       make[2]: *** Waiting for unfinished jobs....
>       lib/.libs/libopenvswitch.a(rconn.o): In function `llsat_mul':
>       rconn.c:(.text+0x3c0): undefined reference to `__mulodi4'
>       lib/.libs/libopenvswitch.a(rconn.o): In function `llsat_mul':
>       rconn.c:(.text+0x3c0): undefined reference to `__mulodi4'
>       clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)
>       Makefile:4341: recipe for target 'ovn/controller/ovn-controller' failed
>       make[2]: *** [ovn/controller/ovn-controller] Error 1
>       clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)
>       Makefile:4653: recipe for target 'vswitchd/ovs-vswitchd' failed
>       make[2]: *** [vswitchd/ovs-vswitchd] Error 1
>       tests/test-util.o: In function `llsat_mul':
>       test-util.c:(.text+0xd3f0): undefined reference to `__mulodi4'
>       clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)
>       Makefile:4543: recipe for target 'tests/ovstest' failed
>       make[2]: *** [tests/ovstest] Error 1
>       make[2]: Leaving directory '/root/ovsClang'
>       Makefile:6058: recipe for target 'all-recursive' failed
>       make[1]: *** [all-recursive] Error 1
>       make[1]: Leaving directory '/root/ovsClang'
>       Makefile:3625: recipe for target 'all' failed
>       make: *** [all] Error 2
>       
> 
> Thanks again.
> 
> > -----Original Message-----
> > From: Ben Pfaff [mailto:b...@ovn.org]
> > Sent: Friday, August 16, 2019 8:25 PM
> > To: Sirvys, Andrius <andrius.sir...@intel.com>
> > Cc: ovs-discuss@openvswitch.org
> > Subject: Re: [ovs-discuss] Building OvS with clang 32bit - shared and not 
> > shared
> > libraries
> > 
> > On Tue, Aug 06, 2019 at 04:06:53PM +0000, Sirvys, Andrius wrote:
> > > Hi.
> > >
> > > I'm trying to build 32 bit OvS using clang. It's on Ubuntu 18.04 LTS
> > > I'm on commit a8f005cf26fd16f77133d67fe4b205409fc444db (HEAD ->
> > > master, origin/master, origin/HEAD)
> > > Author: John Hurley <john.hur...@netronome.com>
> > > Date:   Tue Jul 30 12:05:17 2019 +0100
> > >
> > >
> > > The configuration I'm using is
> > >                ./configure CC=clang --enable-Werror 
> > > --enable-ssl/--disable-ssl
> > >       make -j CFLAGS=-m32
> > >
> > >
> > > No matter if I build with shared libraries enabled or disabled I keep 
> > > running into
> > the same issue
> > >       lib/.libs/libopenvswitch.a(rconn.o): In function `llsat_mul':
> > > rconn.c:(.text+0x3c0): undefined reference to `__mulodi4'
> > >
> > > I'm thinking it could possibly be that this 32bit build is trying to link 
> > > with some
> > 64bit library? Not exactly sure what's going on.
> > > Would appreciate any advice or pointers on where to go or how to fix this.
> > 
> > It's probably a bad idea to add CFLAGS that change the architecture after
> > running "configure".  Try adding CFLAGS=-m32 to the configure command line
> > instead.
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to