Skip to content

Commit 808d688

Browse files
jushermaCarl Keene
authored andcommitted
[build] Always use -j1 for libsnmp to avoid race condition (sonic-net#8324)
I have been seeing intermittent (~40%) build failures with the same error described in PR sonic-net#6592, even with that fix present ``` /usr/bin/ld: mibgroup/ip-forward-mib/ipCidrRouteTable/.libs/ipCidrRouteTable_interface.o: file not recognized: file truncated ... libtool: error: 'mibgroup/ip-forward-mib/inetCidrRouteTable/inetCidrRouteTable_interface.lo' is not a valid libtool object make[5]: *** [Makefile:1020: libnetsnmpmibs.la] Error 1 make[5]: *** Waiting for unfinished jobs.... ``` #### How I did it Use `-j1` for the libsnmp build regardless of the value of `$(MULTIARCH_QEMU_ENVIRON)` #### How to verify it Performed 10 builds of the libsnmp target (`target/debs/buster/libsnmp-base_5.7.3+dfsg-5_all.deb`) with and without this change. Without the change, hit the error 40% of the time. With the change did not see the error at all Signed-off-by: Justin Sherman <[email protected]>
1 parent 3861d30 commit 808d688

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

src/snmpd/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
2929
stg init
3030
stg import -s ../patch-$(SNMPD_VERSION)/series
3131

32-
ifeq ($(MULTIARCH_QEMU_ENVIRON), y)
3332
dpkg-buildpackage -rfakeroot -b -d -us -uc -j1 --admindir $(SONIC_DPKG_ADMINDIR)
34-
else
35-
dpkg-buildpackage -rfakeroot -b -d -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
36-
endif
3733
popd
3834

3935
mv $(DERIVED_TARGETS) $* $(DEST)/

0 commit comments

Comments
 (0)