JetPack 3.0 tegra-multimedia-api sample cross compile issue

I am trying to cross compile the samples found within the tegra-multimedia-api package. I have followed the instructions provided within README and CROSS_PLATFORM_SUPPORT files that were found within the tegra-multimedia-api package.

Following the instruction from README:

  1. Change directory to
    $HOME/tegra_multimedia_api/samples

followed by:

  • This sample demonstrates how to decode H.264/H.265 video from a local file
    with supported decoding features.
    Build and run 00_video_decode with the following commands:

     $ cd 00_video_decode
     $ make
    

make returns an error:
/bin/sh: 1: aarch64-unknown-linux-gnu-g++: not found

Hi NobodyHere,
By installing the samples via Jetpack, it is automatically compiled on TX2.

All Makefiles are for compiling on TX2, not cross compiling.

Within the tegra_multimedia_api/samples/Rules.mk file the following lines perform a test to determine if locally compiling or cross compiling:

ifeq ($(shell uname -m), aarch64)
CROSS_COMPILE :=
else
CROSS_COMPILE := aarch64-unknown-linux-gnu-
endif

By modifying lines as noted below, this issue can be resolved…

ifeq ($(shell uname -m), aarch64)
CROSS_COMPILE :=
else
CROSS_COMPILE := aarch64-linux-gnu-
endif

or even better, since above ignores users defining CROSS_COMPILE:

ifeq ($(shell uname -m), aarch64)
CROSS_COMPILE :=
else
ifeq ($(CROSS_COMPILE),)
CROSS_COMPILE := aarch64-linux-gnu-
endif
endif

Hi Michael,
WE will clean the codes making confusion and add note in documentary. Thanks for your comment.