Cross Compiling Driveworks on the PX2 with ROS

modified as following comments, thanks

hi all,
I met a new issue, I found PX 2(AutoChauffeur/P2379 with ubuntu16.04) already installed Driveworks after i received Drive PX 2, I tried to install ROS(kinetic) from terminal as the guides from @Steve NV, error message:

nvidia@nvidia:/etc/apt$ sudo apt-get install ros-kinetic-desktopReading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ros-kinetic-desktop : Depends: ros-kinetic-common-tutorials but it is not going to be installed
                       Depends: ros-kinetic-geometry-tutorials but it is not going to be installed
                       Depends: ros-kinetic-robot but it is not going to be installed
                       Depends: ros-kinetic-ros-tutorials but it is not going to be installed
                       Depends: ros-kinetic-visualization-tutorials but it is not going to be installed
                       Depends: ros-kinetic-viz but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

then I tried install the depends, similar error message showed, the final depends error is :

nvidia@nvidia:/etc/apt$ sudo apt-get install libgfortran3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libgfortran3 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.4) but 5.4.0-6ubuntu1~16.04.5 is to be installed
E: Unable to correct problems, you have held broken packages.

any suggestion? I don’t want remove gcc, because this operation will remove all packages which depends gcc , some package preinstalled by NVIDIA like cuda, Driveworks and i am not sure this is the root cause, like following prompt:

nvidia@nvidia:/etc/apt$ sudo apt-get remove gcc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apt-clone archdetect-deb cuda-cublas-dev-8-0 cuda-cufft-8-0
  cuda-cufft-dev-8-0 cuda-curand-8-0 cuda-curand-dev-8-0 cuda-cusolver-8-0
  cuda-cusolver-dev-8-0 cuda-cusparse-8-0 cuda-cusparse-dev-8-0
  cuda-misc-headers-8-0 cuda-nvgraph-8-0 cuda-nvgraph-dev-8-0
  cuda-nvml-dev-8-0 cuda-nvrtc-8-0 cuda-nvrtc-dev-8-0 dmeventd dmraid
  dpkg-repack g++-5 gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 kpartx kpartx-boot
  libappstream3 libdebian-installer4 libdevmapper-event1.02.1
  libdmraid1.0.0.rc16 liblockfile-bin liblockfile1 liblvm2app2.2
  liblvm2cmd2.02 libparted-fs-resize0 libreadline5 lockfile-progs lvm2
  os-prober pmount python3-icu python3-pam rdate ubiquity-casper
  ubiquity-ubuntu-artwork
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  build-essential cuda-command-line-tools-8-0 cuda-core-8-0
  cuda-documentation-8-0 cuda-samples-8-0 cuda-toolkit-8-0 g++ gcc
  nvidia-driveworks
0 upgraded, 0 newly installed, 9 to remove and 1 not upgraded.
After this operation, 1,300 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

someone may want see the source.list file:

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

# deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse

## Major bug fix updates produced after the final release of the
## distribution.
# deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
# deb http://archive.ubuntu.com/ubuntu/ xenial universe
# deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial universe
# deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates universe
# deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates universe

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
# deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted

deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security restricted multiverse main universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security restricted multiverse main universe #Added by software-properties
# deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security universe
# deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security universe
# deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse
# deb http://archive.ubuntu.com/ubuntu/ xenial main universe restricted multiverse
# deb http://packages.ros.org/ros/ubuntu xenial main
# deb-src http://packages.ros.org/ros/ubuntu xenial main
# deb http://archive.ubuntu.com/ubuntu/ xenial-updates universe restricted multiverse main
# deb http://archive.ubuntu.com/ubuntu/ xenial main universe restricted multiverse
# deb http://archive.ubuntu.com/ubuntu/ xenial main
# deb http://archive.ubuntu.com/ubuntu/ xenial main universe restricted multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ xenial multiverse restricted main universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial multiverse restricted main universe #Added by software-properties

## 'partner' repository.
deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

thanks

@llorenzds the guidance from your gist link did the trick. Thanks

@garyxiaopeng I’m happy to hear this still works. Next time I get back into this I want to figure out how to get a Docker image setup with a full Nvidia+ros build environment that could also be used for testing.