Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build] Always use -j1 for libsnmp to avoid race condition #8324

Merged
merged 1 commit into from
Aug 4, 2021

Conversation

jusherma
Copy link
Contributor

@jusherma jusherma commented Aug 3, 2021

Signed-off-by: Justin Sherman jusherma@cisco.com

Why I did it

I have been seeing intermittent (~40%) build failures with the same error described in PR #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

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

Always use -j1 for libsnmp to avoid libtool race condition

A picture of a cute animal (not mandatory but encouraged)

image

@jusherma jusherma requested a review from lguohan as a code owner August 3, 2021 23:55
Signed-off-by: Justin Sherman <jusherma@cisco.com>
@jusherma jusherma force-pushed the jusherma/libtool-build branch from c36050e to d06644d Compare August 4, 2021 00:33
@lguohan lguohan merged commit e13f524 into sonic-net:master Aug 4, 2021
qiluo-msft pushed a commit that referenced this pull request Aug 5, 2021
I have been seeing intermittent (~40%) build failures with the same error described in PR #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 <jusherma@cisco.com>
judyjoseph pushed a commit that referenced this pull request Aug 7, 2021
I have been seeing intermittent (~40%) build failures with the same error described in PR #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 <jusherma@cisco.com>
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
…#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 <jusherma@cisco.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants