sonic-net / sonic-swss

SONiC Switch State Service (SwSS)
https://azure.github.io/SONiC
Other
176 stars 529 forks source link

routesync.cpp compile issue #2887

Open kcudnik opened 1 year ago

kcudnik commented 1 year ago

I'm trying to compile sonic-swss (on master)

./autogen.sh
./configure
make

and i get this error:

routesync.cpp: In member function 'void swss::RouteSync::getNextHopList(rtnl_route*, std::string&, std::string&, std::string&)':
routesync.cpp:1130:25: error: 'rtnl_route_nh_get_encap_mpls_dst' was not declared in this scope; did you mean 'rtnl_route_nh_encap_mpls'?
 1130 |             if ((addr = rtnl_route_nh_get_encap_mpls_dst(nexthop)))
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                         rtnl_route_nh_encap_mpls
make[2]: *** [Makefile:482: fpmsyncd-routesync.o] Error 1
make[2]: Leaving directory '/root/sonic-swss/fpmsyncd'
make[1]: *** [Makefile:418: all-recursive] Error 1
make[1]: Leaving directory '/root/sonic-swss'
make: *** [Makefile:350: all] Error 2

on:

 $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal

 $ dpkg --list|grep libnl
ii  libnl-3-200:amd64                          3.5.0-1                               amd64        library for dealing with netlink sockets
ii  libnl-3-dev:amd64                          3.5.0-1                               amd64        development library and headers for libnl-3
ii  libnl-cli-3-200:amd64                      3.5.0-1                               amd64        library for dealing with netlink sockets - cli helpers
ii  libnl-cli-3-dev:amd64                      3.5.0-1                               amd64        development library and headers for libnl-cli-3
ii  libnl-genl-3-200:amd64                     3.5.0-1                               amd64        library for dealing with netlink sockets - generic netlink
ii  libnl-genl-3-dev:amd64                     3.5.0-1                               amd64        development library and headers for libnl-genl-3
ii  libnl-nf-3-200:amd64                       3.5.0-1                               amd64        library for dealing with netlink sockets - netfilter interface
ii  libnl-nf-3-dev:amd64                       3.5.0-1                               amd64        development library and headers for libnl-nf-3
ii  libnl-route-3-200:amd64                    3.5.0-1                               amd64        library for dealing with netlink sockets - route interface
ii  libnl-route-3-dev:amd64                    3.5.0-1                               amd64        development library and headers for libnl-route-3

seems like i have some incompatible libnl libs that have wrong export

please advise

kcudnik commented 1 year ago

u think my libnl-route is too old, it probably should be in 3.6.0 version

holyhgrenade commented 7 months ago

u think my libnl-route is too old, it probably should be in 3.6.0 version

Did upgrading to 3.6.0 solve your issue? I'm facing the same error now.

bilal-ismail commented 7 months ago

I have the same issue with this, has anyone found any solutions to this? I just tried it today. If I have any luck with this, I'll update here as well.

kcudnik commented 7 months ago

Yes, libnl needs to be compiled from commonlib azure pipeline, it's patched and have missing alis