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

explicitly install needed build tools rather than installing build-essential #86

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikaelarguedas
Copy link
Contributor

Based on feedback from docker-library/official-images#8031 (comment)

Impact on current images:
For all ubuntu images -> no impact as pkg-config depends on dpkg-dev on xenial and bionic
For debian stretch images:

The following NEW packages will be installed:
  build-essential bzip2 dpkg-dev patch xz-utils
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 2028 kB of archives.
After this operation, 2876 kB of additional disk space will be used.

For future images -> expected impact is minor as ROS 1 and ROS 2 rely on libconsole-bridge-dev that depends on pkg-config.


It should be safe to do this change, it will have the advantage of being explicit on the packages we expect people to need for building packages.
We could potentially significant space in the future by requesting console_bridge to make the dependency on pkg-config optional.

@ruffsl
Copy link
Member

ruffsl commented May 21, 2020

What is console_bridge using pkg-config for originally?

@mikaelarguedas
Copy link
Contributor Author

As far as I can tell it's not used by the package. my guess is that it was added by the debian maintainers because the package provides a .pc file.
I'm planning on opening an issue on the console_bridge repo and tagging the debian maintainer to get a clearer answer.

This should not impact this PR much though

@ruffsl
Copy link
Member

ruffsl commented May 21, 2020

Looks like we only save two or three megabytes. Won't we also have to parameterize the libc version based on what distro the template is applied to, rather than hard-coding it to 6? How much more worth while would this be if we were able to prune pkg-config downstream in ros?

@mikaelarguedas
Copy link
Contributor Author

Looks like we only save two or three megabytes

Yeah the value of it is more by being explicit on what we want installed than saving space, I also roped in cmake that was not explicitly installed before this PR (though always pulled in).

How much more worth while would this be if we were able to prune pkg-config downstream in ros?

It's hard to say given that it's brought in by such low level packages so we dont know how many of pkg-config dependencies will be installed by other packages. I originally thought we could save up to 50MB but that was before I realized git is using perl...
So now I think it's never going to save us more than ~15MB

rather than hard-coding it to 6?

This is just the name used for glibc in debian. I don't think it changed in the last 20 years and don't know (though didnt look much) of any plan to change it in the near future, so I wouldnt see this one as a concern.

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.

2 participants