Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
produce .deb with cpack #165
base: main
Are you sure you want to change the base?
produce .deb with cpack #165
Changes from 7 commits
da72d8b
1d6bba7
40be3cb
2bbd119
e36a88d
82c5fb2
e7aa793
8f501a5
60550da
b6b1da2
c6a3cf7
6c73a95
70bacb1
82b6883
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better to use
cmake
as the driver, like:Also, do you need to
install
before youcpack
? I'd sort of expect so, but I could be wrong. If so, thats acmake --install
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmake command changes done in c6a3cf7 and 70bacb1
it seems to work without --install, but it's possible some of my workarounds are caused by not doing an install
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the complete list of debs that gets made for a given matrix entry look like right now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single .deb for viam-cpp-sdk
https://github.com/viamrobotics/viam-cpp-sdk/actions/runs/6593088962/job/17914991253#step:10:15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, these need to remain. Otherwise, projects using
pkg-config
to consume the SDK will fail to link.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just read your comment that said "remove Requires line -- it adds like a minute of CPU-bound processing inside the consumer's cmake config". I don't see how that could be true. These files aren't consumed by cmake, only by
pkg-config
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
example run with
Requires
in pkg-config (last line has time):There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. But why are you using
pkg-config
to obtain the SDK rather than usingfind_pacakge
, which will use the cmake infra that the SDK provides?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be using
CPACK_COMPONENTS_GROUPING
to get separate debs for different roles?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
roles = development vs runtime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, typically on a deb based platform, a library ships at least three packages:
libfoo
package which contains the runtime role components (typically the explicitly versioned library filelibfoo.so.x.y.z
and its soname symlinklibfoo.so.x
).libfoo-dev
development role package which contains the headers and the dev time lib symlinklibfoo.so
so that-lfoo
finds the library.libfoo-dbg
debug role package which contains debug info.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list looks pretty incomplete. We definitely have dependencies on other development libraries. Also, I'd be hoping to see a split between dependencies required for build, for runtime, and for development. Does cpack let us express those? I'd also be interested to know if cpack has any ability to auto-detect these package dependencies rather than requiring us to explicitly enumerate them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the viam-cpp-sdk .deb is a development library; we'll presumably give it a -dev suffix if we release. we're not creating a runtime library yet I think. given that, are -dev deps okay for now?
This change would generate deps automatically ... in theory:
But it detects runtime deps instead of -dev libraries:
My downstream module fails with:
added libboost-log-dev in 82b6883
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why this was changed. The
viam/api
tacked onto the include path for thelibviamapi.pc.in
is peculiar to theviamapi
library, and is a side effect of some unfortunate naming issues in ourapi
repository. But thesdk
library doesn't have those problems, and the intended include root for thesdk
library is definitely theINSTALL_INCLUDEDIR
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requires
can or should be removed.libviamapi
version should remain as well, but looking more closely it looks slightly wrong, in that it doesn't exactly match the name at src/viam/api/config/viam-cpp-sdk-libviamapi.pc.in. I think maybe that.pc.in
should haveName: @PROJECT_NAME@-lib**viam**api
instead.