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

deepstream-tlt-apps: add recipe #4

Merged

Conversation

bcis93
Copy link

@bcis93 bcis93 commented Sep 28, 2021

This PR adds a recipe that builds several deepstream tlt sample apps as well as the libnvds_infercustomparser_tlt.so custom parser library from NVIDIA's deepstream_tao_apps repository.

I separated the samples and custom parser into separate packages so that the custom parser can be built by itself if desired.

I'm targeting the dunfell-l4t-r32.4.3 branch since that's what my image is based on, but I can also open another PR targeting the master branch once this one gets approved.

Copy link
Member

@madisongh madisongh left a comment

Choose a reason for hiding this comment

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

We're getting there. I'll post an alternative patch that fixes all of the remaining issues with host path leakage and missing compiler/linker flags in the main thread.

inherit pkgconfig cuda
COMPATIBLE_MACHINE = "(tegra)"

TARGET_LDFLAGS += " -L${RECIPE_SYSROOT}/opt/nvidia/deepstream/deepstream-${DS_VERSION}/lib"
Copy link
Member

Choose a reason for hiding this comment

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

I'll post an alternative patch for the makefiles that works better and doesn't require you to add anything the LDFLAGS.

TARGET_LDFLAGS += " -L${RECIPE_SYSROOT}/opt/nvidia/deepstream/deepstream-${DS_VERSION}/lib"
EXTRA_OEMAKE += " CC='${CXX}' CUDA_VER=${CUDA_VERSION} DS_VER=${DS_VERSION} TARGET_DEVICE=${TARGET_ARCH}"

TARGET_CC_ARCH += "${LDFLAGS}"
Copy link
Member

Choose a reason for hiding this comment

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

My alternative makefile patches also eliminate the need to modify TARGET_CC_ARCH.

COMPATIBLE_MACHINE = "(tegra)"

TARGET_LDFLAGS += " -L${RECIPE_SYSROOT}/opt/nvidia/deepstream/deepstream-${DS_VERSION}/lib"
EXTRA_OEMAKE += " CC='${CXX}' CUDA_VER=${CUDA_VERSION} DS_VER=${DS_VERSION} TARGET_DEVICE=${TARGET_ARCH}"
Copy link
Member

Choose a reason for hiding this comment

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

The += operator automatically inserts a blank for you, so you don't need to put one at the beginning of the string.

@madisongh
Copy link
Member

I took a closer look at the build, and found a few more issues. Here's an alternative patch to use:
0001-Cross-build-fixups.patch.txt

With this patch, no more compiler, linker, or packaging warnings, as the right flags and paths get used throughout.

And don't worry about the automated check failure, it was failing because I hadn't yet back-ported some fixes to the 32.4.3 branch from later branches. I've done that now, so rebase to the latest on the branch and the automated check should pass.

This commit adds a recipe that builds several deepstream tlt sample apps as well as the libnvds_infercustomparser_tlt.so custom parser library from NVIDIA's https://github.com/NVIDIA-AI-IOT/deepstream_tao_apps repository.

Signed-off-by: Bryan Cisneros <[email protected]>
@bcis93
Copy link
Author

bcis93 commented Sep 29, 2021

Thanks @madisongh for the new patch and the feedback. I made all the requested changes, so take a look again and let me know if there's anything else!

@madisongh madisongh merged commit 884e0c2 into OE4T:dunfell-l4t-r32.4.3 Sep 30, 2021
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