When building on a:
>>> import platform
>>> platform.linux_distribution()
('Red Hat Enterprise Linux Server', '7.2', 'Maipo')
system, two functions within contrail-build/rules.py does not evaluate to True, that should probably do so (given Centos is there):
- UseSystemBoost()
- UseSystemTBB()
This lack apparently leads to a build failure on ovs_tor_agent, as per:
g++ -o build/debug/vnsw/agent/ovs_tor_agent/contrail-tor-agent -Wl,--whole-archive -rdynamic -lcpuinfo -lport_ipc -lvnswoperdb -lvnswcmn -Wl,--no-whole-archive -g build/debug/vnsw/agent/ovs_tor_agent/buildinfo.o build/debug/vnsw/agent/ovs_tor_agent/main.o build/debug/vnsw/agent/ovs_tor_agent/tor_agent_init.o build/debug/vnsw/agent/ovs_tor_agent/tor_agent_param.o -Lbuild/lib -Lbuild/debug/base -Lcontroller/src/base -Lbuild/debug/bgp -Lcontroller/src/bgp -Lbuild/debug/db -Lcontroller/src/db -Lbuild/debug/discovery/client -Lcontroller/src/discovery/client -Lbuild/debug/dns/bind -Lcontroller/src/dns/bind -Lbuild/debug/http/client -Lcontroller/src/http/client -Lbuild/debug/ifmap -Lcontroller/src/ifmap -Lbuild/debug/io -Lcontroller/src/io -Lbuild/debug/ksync -Lcontroller/src/ksync -Lbuild/debug/net -Lcontroller/src/net -Lbuild/debug/route -Lcontroller/src/route -Lbuild/debug/schema -Lcontroller/src/schema -Lbuild/debug/vnsw/agent -Lcontroller/src/vnsw/agent -Lbuild/debug/vnsw/agent/cfg -Lcontroller/src/vnsw/agent/cfg -Lbuild/debug/vnsw/agent/cmn -Lcontroller/src/vnsw/agent/cmn -Lbuild/debug/vnsw/agent/controller -Lcontroller/src/vnsw/agent/controller -Lbuild/debug/vnsw/agent/diag -Lcontroller/src/vnsw/agent/diag -Lbuild/debug/vnsw/agent/filter -Lcontroller/src/vnsw/agent/filter -Lbuild/debug/vnsw/agent/init -Lcontroller/src/vnsw/agent/init -Lbuild/debug/vnsw/agent/kstate -Lcontroller/src/vnsw/agent/kstate -Lbuild/debug/vnsw/agent/openstack -Lcontroller/src/vnsw/agent/openstack -Lbuild/debug/vnsw/agent/port_ipc -Lcontroller/src/vnsw/agent/port_ipc -Lbuild/debug/vnsw/agent/oper -Lcontroller/src/vnsw/agent/oper -Lbuild/debug/vnsw/agent/pkt -Lcontroller/src/vnsw/agent/pkt -Lbuild/debug/vnsw/agent/services -Lcontroller/src/vnsw/agent/services -Lbuild/debug/vnsw/agent/uve -Lcontroller/src/vnsw/agent/uve -Lbuild/debug/vnsw/agent/vgw -Lcontroller/src/vnsw/agent/vgw -Lbuild/debug/vnsw/agent/vrouter/flow_stats -Lcontroller/src/vnsw/agent/vrouter/flow_stats -Lbuild/debug/vnsw/agent/vrouter/ksync -Lcontroller/src/vnsw/agent/vrouter/ksync -Lbuild/debug/vnsw/agent/vrouter/stats_collector -Lcontroller/src/vnsw/agent/vrouter/stats_collector -Lbuild/debug/vrouter/utils -Lvrouter/utils -Lbuild/debug/xml -Lcontroller/src/xml -Lbuild/debug/xmpp -Lcontroller/src/xmpp -Lbuild/debug/third_party/bind-9.9.2-P1/lib/isc -Lbuild/debug/vnsw/agent/nexthop_server -Lcontroller/src/vnsw/agent/nexthop_server -Lbuild/debug/vnsw/agent/tables -Lcontroller/src/vnsw/agent/tables -Lbuild/debug/vnsw/agent/ovs_tor_agent/ovsdb_client -Lcontroller/src/vnsw/agent/ovs_tor_agent/ovsdb_client -lovsdbclient -lopenvswitch -lvnswinit -lcpuinfo -lport_ipc -lvnswoperdb -lvnswcmn -lvnswctrl -lcfg -lfilter -lksync -lnova_ins -lnova_ins_thrift -luve -lvgw -lvnswnhserver -lxmpp -lpeer_sandesh -lxmpp_multicast -lxmpp_enet -lxmpp_unicast -lxml2 -lds -lxml -lpugixml -lcurl -lbind_interface -lbgp_schema -lifmap_vnc -lifmap_agent -lifmap_common -lnet -lsandeshflow -lsandeshvns -lfilter -lhttpc -lroute -ldb -lcpuinfo -lio -lssl -lcrypto -lsandesh -lprocess_info -lhttp -lhttp_parser -lbase -lthriftasio -lthrift -lboost_filesystem -lboost_program_options -lboost_regex -lrt -lboost_system -llog4cplus -lpthread -ltbb_debug -lssl -lcrypto
/usr/bin/ld: cannot find -ltbb_debug
collect2: error: ld returned 1 exit status
scons: *** [build/debug/vnsw/agent/ovs_tor_agent/contrail-tor-agent] Error 1
scons: building terminated because of errors.
error: Bad exit status from /var/tmp/rpm-tmp.2CNb2G (%install)
As per contrail-controller/src/SConscript:
108f633b (Karl Klashinsky 2014-10-21 19:15:47 +0000 52) if common['OPT'] == 'production' or common.UseSystemTBB():
e201e369 (Pedro Marques 2014-08-26 13:23:11 -0700 53) libs.append('tbb')
e201e369 (Pedro Marques 2014-08-26 13:23:11 -0700 54) else:
e201e369 (Pedro Marques 2014-08-26 13:23:11 -0700 55) libs.append('tbb_debug')
tbb is to be used based on UseSystemTBB().
I haven't yet been able to locate the recent change -- definitely not prior to 2016-02-29 that introduced this error for our nightlies.
At any rate, adding RHEL with e.g. version 7.0 into contrai-build/rules.py appears to have solved this particular problem.
Remains to see if this affects https://bugs.launchpad.net/juniperopenstack/+bug/1554553
Adding RHEL in resolved the build error, as well as the build error reported in https:/ /bugs.launchpad .net/juniperope nstack/ +bug/1554553 .
Will prepare change with this addition to rules.py.