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

Make changes to building and packaging sairedis #1116

Merged
merged 5 commits into from
Oct 25, 2022

Conversation

saiarcot895
Copy link
Contributor

@saiarcot895 saiarcot895 commented Aug 29, 2022

This PR makes the following changes:

  1. Use Debian build profiles instead of custom build targets to build
    different configurations of sairedis. Build profiles were designed for
    this purpose. This also makes the debian/rules file a bit cleaner.
  2. Rely on the debug packages being automatically created, instead of us
    explicitly specifying it in debian/control.
  3. Add actual support for excluding Python 2 binding build.
  4. Make sure the compile flags used for building Python 2 and Python 3
    are actually correct.

This commit includes the following changes:
1. Use Debian build profiles instead of custom build targets to build
different configurations of sairedis. Build profiles were designed for
this purpose. This also makes the debian/rules file a bit cleaner.
2. Rely on the debug packages being automatically created, instead of us
explicitly specifying it in debian/control.
3. Add actual support for excluding Python 2 binding build.
4. Make sure the compile flags used for building Python 2 and Python 3
are actually correct.

Signed-off-by: Saikrishna Arcot <[email protected]>
Signed-off-by: Saikrishna Arcot <[email protected]>
Signed-off-by: Saikrishna Arcot <[email protected]>
@saiarcot895 saiarcot895 force-pushed the build-packaging-changes branch from 62f6309 to 90c59f7 Compare October 12, 2022 00:12
@saiarcot895 saiarcot895 requested a review from kcudnik October 19, 2022 00:07
Comment on lines +4 to +5
usr/lib/*/libsaimetadata.so
usr/lib/*/libsaimeta.so
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should those be in non-dev package?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, these files are only needed at linking time, not during runtime. At linking time, the SONAME of these libraries (which, I believe, are libsaimetadata.so.0.0.0 and libsaimeta.so.0.0.0 for these two libraries) gets recorded in the binary/library, and that file instead gets loaded.

@saiarcot895 saiarcot895 merged commit 7b39fc4 into sonic-net:master Oct 25, 2022
@saiarcot895 saiarcot895 deleted the build-packaging-changes branch October 25, 2022 16:58
@liuh-80
Copy link
Contributor

liuh-80 commented Oct 26, 2022

@saiarcot895 , sonic-swss-common validation break because debian/rules remove 'binary-syncd-vs' in this PR:

https://github.com/sonic-net/sonic-swss-common/blob/master/.azure-pipelines/build-sairedis-template.yml
DEB_BUILD_OPTIONS=nocheck fakeroot dpkg-buildpackage -b -us -uc -Tbinary-syncd-vs -j$(nproc)

Build error:
https://dev.azure.com/mssonic/build/_build/results?buildId=165515&view=logs&j=61b7eb0d-78fa-5af5-6df0-b6f82d3891a8&t=f575074c-f5f7-5116-3e48-4a11a237643a

dpkg-buildpackage: info: host architecture amd64
debian/rules binary-syncd-vs
dh binary-syncd-vs
dh: Unknown sequence binary-syncd-vs (choose from: binary binary-arch binary-indep build build-arch build-indep clean install install-arch install-indep)
make: *** [debian/rules:51: binary-syncd-vs] Error 255
dpkg-buildpackage: error: debian/rules binary-syncd-vs subprocess returned exit status 2

saiarcot895 added a commit to saiarcot895/sonic-swss-common that referenced this pull request Oct 26, 2022
The build rules for sairedis have been simplified in
sonic-net/sonic-sairedis#1116. As a result, build targets have changed.
Update the build step here accordingly.

Signed-off-by: Saikrishna Arcot <[email protected]>
saiarcot895 added a commit to saiarcot895/sonic-sairedis that referenced this pull request Oct 27, 2022
…)"

This may be causing or exposing some issues during tests.

This reverts commit 7b39fc4.
saiarcot895 added a commit that referenced this pull request Oct 27, 2022
This may be causing or exposing some issues during tests.

This reverts commit 7b39fc4.
richardyu-ms pushed a commit to richardyu-ms/sonic-sairedis that referenced this pull request Nov 15, 2022
* Make changes to building and packaging sairedis

This commit includes the following changes:
1. Use Debian build profiles instead of custom build targets to build
different configurations of sairedis. Build profiles were designed for
this purpose. This also makes the debian/rules file a bit cleaner.
2. Rely on the debug packages being automatically created, instead of us
explicitly specifying it in debian/control.
3. Add actual support for excluding Python 2 binding build.
4. Make sure the compile flags used for building Python 2 and Python 3
are actually correct.

Signed-off-by: Saikrishna Arcot <[email protected]>

* Update pipeline file

Signed-off-by: Saikrishna Arcot <[email protected]>

* Fix argument for profile

Signed-off-by: Saikrishna Arcot <[email protected]>

* Exclude libsai package from the list of dependencies

Signed-off-by: Saikrishna Arcot <[email protected]>

* Allow multiple syslog artifacts during tests

Signed-off-by: Saikrishna Arcot <[email protected]>
richardyu-ms pushed a commit to richardyu-ms/sonic-sairedis that referenced this pull request Nov 15, 2022
…)" (sonic-net#1141)

This may be causing or exposing some issues during tests.

This reverts commit 7b39fc4.
richardyu-ms pushed a commit that referenced this pull request Nov 16, 2022
* Make changes to building and packaging sairedis

This commit includes the following changes:
1. Use Debian build profiles instead of custom build targets to build
different configurations of sairedis. Build profiles were designed for
this purpose. This also makes the debian/rules file a bit cleaner.
2. Rely on the debug packages being automatically created, instead of us
explicitly specifying it in debian/control.
3. Add actual support for excluding Python 2 binding build.
4. Make sure the compile flags used for building Python 2 and Python 3
are actually correct.

Signed-off-by: Saikrishna Arcot <[email protected]>

* Update pipeline file

Signed-off-by: Saikrishna Arcot <[email protected]>

* Fix argument for profile

Signed-off-by: Saikrishna Arcot <[email protected]>

* Exclude libsai package from the list of dependencies

Signed-off-by: Saikrishna Arcot <[email protected]>

* Allow multiple syslog artifacts during tests

Signed-off-by: Saikrishna Arcot <[email protected]>
richardyu-ms pushed a commit that referenced this pull request Nov 16, 2022
This may be causing or exposing some issues during tests.

This reverts commit 7b39fc4.
pettershao-ragilenetworks pushed a commit to pettershao-ragilenetworks/sonic-sairedis that referenced this pull request Nov 18, 2022
* Make changes to building and packaging sairedis

This commit includes the following changes:
1. Use Debian build profiles instead of custom build targets to build
different configurations of sairedis. Build profiles were designed for
this purpose. This also makes the debian/rules file a bit cleaner.
2. Rely on the debug packages being automatically created, instead of us
explicitly specifying it in debian/control.
3. Add actual support for excluding Python 2 binding build.
4. Make sure the compile flags used for building Python 2 and Python 3
are actually correct.

Signed-off-by: Saikrishna Arcot <[email protected]>

* Update pipeline file

Signed-off-by: Saikrishna Arcot <[email protected]>

* Fix argument for profile

Signed-off-by: Saikrishna Arcot <[email protected]>

* Exclude libsai package from the list of dependencies

Signed-off-by: Saikrishna Arcot <[email protected]>

* Allow multiple syslog artifacts during tests

Signed-off-by: Saikrishna Arcot <[email protected]>
pettershao-ragilenetworks pushed a commit to pettershao-ragilenetworks/sonic-sairedis that referenced this pull request Nov 18, 2022
…)" (sonic-net#1141)

This may be causing or exposing some issues during tests.

This reverts commit 7b39fc4.
saiarcot895 added a commit to saiarcot895/sonic-sairedis that referenced this pull request Jan 5, 2023
…)'

* Make changes to building and packaging sairedis

This commit includes the following changes:
1. Use Debian build profiles instead of custom build targets to build
different configurations of sairedis. Build profiles were designed for
this purpose. This also makes the debian/rules file a bit cleaner.
2. Rely on the debug packages being automatically created, instead of us
explicitly specifying it in debian/control.
3. Add actual support for excluding Python 2 binding during build.
4. Make sure the compile flags used for building Python 2 and Python 3
are actually correct.

Signed-off-by: Saikrishna Arcot <[email protected]>

* Update pipeline file

Signed-off-by: Saikrishna Arcot <[email protected]>

* Fix argument for profile

Signed-off-by: Saikrishna Arcot <[email protected]>

* Exclude libsai package from the list of dependencies

Signed-off-by: Saikrishna Arcot <[email protected]>

* Allow multiple syslog artifacts during tests

Signed-off-by: Saikrishna Arcot <[email protected]>
saiarcot895 added a commit that referenced this pull request Jun 30, 2023
* Reland 'Make changes to building and packaging sairedis (#1116)'

* Make changes to building and packaging sairedis

This commit includes the following changes:
1. Use Debian build profiles instead of custom build targets to build
different configurations of sairedis. Build profiles were designed for
this purpose. This also makes the debian/rules file a bit cleaner.
2. Rely on the debug packages being automatically created, instead of us
explicitly specifying it in debian/control.
3. Add actual support for excluding Python 2 binding during build.
4. Make sure the compile flags used for building Python 2 and Python 3
are actually correct.

Signed-off-by: Saikrishna Arcot <[email protected]>

* Update pipeline file

Signed-off-by: Saikrishna Arcot <[email protected]>

* Fix argument for profile

Signed-off-by: Saikrishna Arcot <[email protected]>

* Exclude libsai package from the list of dependencies

Signed-off-by: Saikrishna Arcot <[email protected]>

* Allow multiple syslog artifacts during tests

Signed-off-by: Saikrishna Arcot <[email protected]>

* Fix debug poackage name in dockerfile

Signed-off-by: Saikrishna Arcot <[email protected]>

* Fix armhf build due to python binary not existing

Signed-off-by: Saikrishna Arcot <[email protected]>

---------

Signed-off-by: Saikrishna Arcot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants