Skip to content

[swss build error]checkout master and build centec platform, got swss build errors, same on branch 201803 #1643

@yangbashuang

Description

@yangbashuang

Description

Steps to reproduce the issue:
1.http_proxy=http://192.168.25.29:3128 https_proxy=http://192.168.25.29:3128 make configure PLATFORM=centec
2.http_proxy=http://192.168.25.29:3128 https_proxy=http://192.168.25.29:3128 make
or
1.http_proxy=http://192.168.25.29:3128 https_proxy=http://192.168.25.29:3128 make configure PLATFORM=centec
2.http_proxy=http://192.168.25.29:3128 https_proxy=http://192.168.25.29:3128 make clean
3.http_proxy=http://192.168.25.29:3128 https_proxy=http://192.168.25.29:3128 make

yangbs@centec-OSP:~/sonic/master/sonic-buildimage$ http_proxy=http://192.168.25.29:3128 https_proxy=http://192.168.25.29:3128 make
SONiC Build System

Build Configuration
"CONFIGURED_PLATFORM" : "centec"
"SONIC_CONFIG_PRINT_DEPENDENCIES" : ""
"SONIC_BUILD_JOBS" : "1"
"SONIC_CONFIG_MAKE_JOBS" : "12"
"DEFAULT_USERNAME" : "admin"
"DEFAULT_PASSWORD" : "x"
"ENABLE_DHCP_GRAPH_SERVICE" : ""
"SHUTDOWN_BGP_ON_START" : ""
"ENABLE_PFCWD_ON_START" : ""
"SONIC_CONFIG_DEBUG" : ""
"ROUTING_STACK" : "quagga"
"ENABLE_SYNCD_RPC" : ""
"ENABLE_ORGANIZATION_EXTENSIONS" : "y"
"HTTP_PROXY" : "http://192.168.25.29:3128"
"HTTPS_PROXY" : "http://192.168.25.29:3128"
"ENABLE_SYSTEM_TELEMETRY" : ""

Describe the results you received:
Making all in portsyncd
make[4]: Entering directory '/sonic/src/sonic-swss/portsyncd'
g++ -DHAVE_CONFIG_H -I. -I.. -I .. -g -std=c++11 -Wall -fPIC -Wno-write-strings -I/usr/include/libnl3 -I/usr/include/swss -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o portsyncd-portsyncd.o test -f 'portsyncd.cpp' || echo './'portsyncd.cpp
g++ -DHAVE_CONFIG_H -I. -I.. -I .. -g -std=c++11 -Wall -fPIC -Wno-write-strings -I/usr/include/libnl3 -I/usr/include/swss -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o portsyncd-linksync.o test -f 'linksync.cpp' || echo './'linksync.cpp
/bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -o portsyncd portsyncd-portsyncd.o portsyncd-linksync.o -lnl-3 -lnl-route-3 -lswsscommon -lnl-genl-3 -lhiredis
libtool: link: g++ -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z -Wl,relro -o portsyncd portsyncd-portsyncd.o portsyncd-linksync.o -lnl-3 -lnl-route-3 -lswsscommon -lnl-genl-3 -lhiredis
make[4]: Leaving directory '/sonic/src/sonic-swss/portsyncd'
Making all in orchagent
make[4]: Entering directory '/sonic/src/sonic-swss/orchagent'
g++ -DHAVE_CONFIG_H -I. -I.. -I .. -g -DNDEBUG -std=c++11 -Wall -fPIC -Wno-write-strings -I/usr/include/libnl3 -I/usr/include/swss -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls -I /usr/include/sai -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o orchagent-main.o test -f 'main.cpp' || echo './'main.cpp
g++ -DHAVE_CONFIG_H -I. -I.. -I .. -g -DNDEBUG -std=c++11 -Wall -fPIC -Wno-write-strings -I/usr/include/libnl3 -I/usr/include/swss -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls -I /usr/include/sai -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o orchagent-orchdaemon.o test -f 'orchdaemon.cpp' || echo './'orchdaemon.cpp
g++ -DHAVE_CONFIG_H -I. -I.. -I .. -g -DNDEBUG -std=c++11 -Wall -fPIC -Wno-write-strings -I/usr/include/libnl3 -I/usr/include/swss -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls -I /usr/include/sai -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o orchagent-orch.o test -f 'orch.cpp' || echo './'orch.cpp
g++ -DHAVE_CONFIG_H -I. -I.. -I .. -g -DNDEBUG -std=c++11 -Wall -fPIC -Wno-write-strings -I/usr/include/libnl3 -I/usr/include/swss -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls -I /usr/include/sai -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o orchagent-notifications.o test -f 'notifications.cpp' || echo './'notifications.cpp
g++ -DHAVE_CONFIG_H -I. -I.. -I .. -g -DNDEBUG -std=c++11 -Wall -fPIC -Wno-write-strings -I/usr/include/libnl3 -I/usr/include/swss -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls -I /usr/include/sai -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o orchagent-routeorch.o test -f 'routeorch.cpp' || echo './'routeorch.cpp
g++ -DHAVE_CONFIG_H -I. -I.. -I .. -g -DNDEBUG -std=c++11 -Wall -fPIC -Wno-write-strings -I/usr/include/libnl3 -I/usr/include/swss -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls -I /usr/include/sai -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o orchagent-neighorch.o test -f 'neighorch.cpp' || echo './'neighorch.cpp
g++ -DHAVE_CONFIG_H -I. -I.. -I .. -g -DNDEBUG -std=c++11 -Wall -fPIC -Wno-write-strings -I/usr/include/libnl3 -I/usr/include/swss -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls -I /usr/include/sai -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o orchagent-intfsorch.o test -f 'intfsorch.cpp' || echo './'intfsorch.cpp
g++ -DHAVE_CONFIG_H -I. -I.. -I .. -g -DNDEBUG -std=c++11 -Wall -fPIC -Wno-write-strings -I/usr/include/libnl3 -I/usr/include/swss -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls -I /usr/include/sai -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o orchagent-portsorch.o test -f 'portsorch.cpp' || echo './'portsorch.cpp
In file included from /usr/include/sai/sai_meta.h:6:0,
from /usr/include/sai/sai_serialize.h:18,
from portsorch.cpp:18:
/usr/include/sai/saimetadata.h:402:14: error: 'sai_metadata_get_port_priority_flow_control_mode_name' initialized and declared 'extern' [-Werror]
In sai_port_priority_flow_control_mode_t value);
^
/usr/include/sai/saimetadata.h:402:14: error: 'sai_port_priority_flow_control_mode_t' was not declared in this scope
/usr/include/sai/saimetadata.h:883:14: error: 'sai_port_priority_flow_control_mode_t' has not been declared
In sai_port_priority_flow_control_mode_t port_priority_flow_control_mode);
^
cc1plus: all warnings being treated as errors
Makefile:659: recipe for target 'orchagent-portsorch.o' failed
make[4]: *** [orchagent-portsorch.o] Error 1
make[4]: Leaving directory '/sonic/src/sonic-swss/orchagent'
Makefile:394: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/sonic/src/sonic-swss'
Makefile:325: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/sonic/src/sonic-swss'
dh_auto_build: make -j1 returned exit code 2
debian/rules:22: recipe for target 'build' failed
make[1]: *** [build] Error 2
make[1]: Leaving directory '/sonic/src/sonic-swss'
dpkg-buildpackage: error: debian/rules build gave error exit status 2
[ FAIL LOG END ] [ target/debs/swss_1.0.0_amd64.deb ]
slave.mk:214: recipe for target 'target/debs/swss_1.0.0_amd64.deb' failed
make: *** [target/debs/swss_1.0.0_amd64.deb] Error 1
make: *** [all] Error 2

Describe the results you expected:
build success

Additional information you deem important (e.g. issue happens only occasionally):

**Output of `show version`:**
checkout code yesterday
```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions