This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/CCSTUDIO: CCStudio CLI silently exist after delay in Ubuntu 17.10 Docker

Part Number: CCSTUDIO

Tool/software: Code Composer Studio

root@24b3494566fe:/wd/grid-tied# /opt/ti/ccsv8/eclipse/ccstudio -noSplash -data ../workspace -application com.ti.ccstudio.apps.projectImport -ccs.help                                                                                                
root@24b3494566fe:/wd/grid-tied# /opt/ti/ccsv8/eclipse/ccstudio
Ccstudio: Cannot open display:                                                                                                                                                                                                                        
root@24b3494566fe:/wd/grid-tied#

I am working on a Docker container for CCStudio v8 to build our project.  I have the command line build working locally under Debian but in the Docker it isn't working.  Each command above runs for roughly 7 seconds before terminating.  The display error comes up immediately.  Should logs be being written somewhere?  How should I debug the issue?  My blind guess (what else can I do? :] ) is that I'm missing some deps.  I don't know that they are all required but I do have the following being installed (plus some other utilities).

RUN dpkg --add-architecture i386 && apt-get update && apt-get install -y \
  libc6:i386                    \
  libx11-6:i386                 \
  libasound2:i386               \
  libatk1.0-0:i386              \
  libcairo2:i386                \
  libcups2:i386                 \
  libdbus-glib-1-2:i386         \
  libgconf-2-4:i386             \
  libgcrypt20:i386              \
  libgdk-pixbuf2.0-0:i386       \
  libgtk-3-0:i386               \
  libice6:i386                  \
  libncurses5:i386              \
  libsm6:i386                   \
  liborbit2:i386                \
  libudev1:i386                 \
  libusb-0.1-4:i386             \
  libstdc++6:i386               \
  libstdc++6					\
  libxt6						\
  libxt6:i386                   \
  libxtst6:i386                 \
  libgnomeui-0:i386             \
  libusb-1.0-0-dev:i386         \
  libcanberra-gtk-module:i386   \
  gtk2-engines-murrine:i386     \
  libpython2.7				    \
  unzip

Thanks for any guidance you can offer.

Cheers,

-kyle

  • Kyle,

    I personally don't have experience with docker containers so I can't provide specific guidance on whether the issue has to do with missing dependencies (although that is a possible reason).

    Hopefully others in the community that have worked with docker containers and CCS may be able to chime in with suggestions.
  • Hi Aarti,

    Do you know the full package dependency list for Ubuntu 17.10?  This is my first Docker container but I'd start by assuming it's a regular problem unrelated to Docker itself.  That said, the Ubuntu Docker image is pretty minimal so packages that would normally be present are not.

    Cheers,

    -kyle

  • The Linux host support/dependencies for CCSv8 are listed in this page.

  • I had seen that page but it only lists the one required package that is not included in a 'default' install. The docker image is a minimal Ubuntu install so I would need the full list of dependencies to make sure they are covered. I see that only LTS versions are officially supported and I happen to be on 17.10 right now, but that could easily change or I could probably figure it out from either a 16.04 or 18.04 complete dependency list (or both).

    I'm going to see if I can build a list of all files that CCStudio loads on my desktop Linux install and from there identify packages.
  • Kyle Altendorf said:
    How should I debug the issue?  My blind guess (what else can I do? :] ) is that I'm missing some deps. 

    If you try running the 1st command under strace, the strace output might identify a missing dependency. You have to search the strace log looking for errors failing to load .so files, and then identify which package the missing .so file is from.

  • Hi Chester,

    Thanks for the suggestion.  I'll have to build a new Ubuntu VM (really?  i made a 10gb drive?  :[ )  and I'll give that a shot.

  • I'll take another stab at diffing packages/failed loads in the strace, but I made a bit of progress.  CCStudio runs until I install C2000 6.4.  I did switch to 18.04.  This should be using github.com/.../820ad02a565094f209fd029fa64b49b386486494.

     /home/epc/g/20/docker   develop  sudo docker images altendky/ccstudio8
    REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
    altendky/ccstudio8   latest              f2942ef4898e        18 minutes ago      3.38GB
    altendky/ccstudio8   <none>              102a84b604dd        5 days ago          4.45GB
     /home/epc/g/20/docker   develop  sudo docker run --rm --security-opt seccomp:unconfined -it altendky/ccstudio8 bash
    root@95690ff572cb:/wd# /opt/ti/ccsv8/eclipse/ccstudio -noSplash -data ../workspace -application com.ti.ccstudio.apps.projectImport -ccs.help
    Usage:
            eclipse -noSplash -data "<workspace_dir>"
                    -application com.ti.ccstudio.apps.importProject
                    -ccs.location <path> [<options>]
    
    where options include:
            -ccs.location <path>
                    Absolute or relative path to the location containing the project.
                    Relative paths will be assumed to be relative to the working directory.
    
            -ccs.device <id>
                    The device-variant ID. Applicable only when '-ccs.location' flag resolves to a .projectspec file.
    
            -ccs.definePathVariable <name> <value> [@scope (global|project)]
                    Defines the given path-variable for resolving portable linked file paths (optional)
                    (also defines a global build-macro with the same name and value).
                    Optionally, specify the scope (defaults to 'global').
    
            -ccs.copyIntoWorkspace
                    Copy project folder and contents into the workspace directory (optional).
                    Defaults to 'false'.
    
            -ccs.overwrite
                    Forces overwrite of existing file-system resources (optional).
    
            -ccs.renameTo                                                                                                                                                                                    
                    Rename the imported project to the specified name.                                                                                                                                       
                                                                                                                                                                                                             
            -ccs.autoBuild                                                                                                                                                                                   
                    Performs an incremental build on the imported/created project (optional).                                                                                                                
                                                                                                                                                                                                             
            -ccs.autoImportReferencedProjects                                                                                                                                                                
                    If 'true', an attempt is made to automatically import any referenced projects found in the same parent directory as the main project.                                                    
                                                                                                                                                                                                             
            -ccs.autoRenameReferencedProjects
                    If 'true', and iff the '-ccs.renameTo' flag is present, any imported referenced projects will also be renamed automatically.
    
            -ccs.referencedProjectSearchDirectory
                    Directory to search for referenced projects. Applicable only when '-ccs.autoImportReferencedProjects' flag is present.
    
            -ccs.captureCopiedFileOrigins
                    Capture the original locations of all resources copied into the project during the import. These will be captured into a text file named 'copiedFileOrigins.txt'.
    
            -ccs.captureProjectspecApplicability
                    Capture the list of devices that the imported projectspec is applicable to. These will be captured into a text file named 'projectSpecApplicability.txt'.
    
            -ccs.args <file>
                    File containing any extra arguments (optional).
    
            -ccs.help
                    Print this help message.
    
    root@95690ff572cb:/wd# /opt/ti/ccsv8/eclipse/ccstudio -application org.eclipse.equinox.p2.director -noSplash -repository http://software-dl.ti.com/dsps/dsps_public_sw/sdo_ccstudio/codegen/Updates/p2linux -installIUs com.ti.cgt.c2000.6.4.linux.feature.group
    Installing com.ti.cgt.c2000.6.4.linux.feature.group 6.4.12.
    Operation completed in 10419 ms.
    root@95690ff572cb:/wd# /opt/ti/ccsv8/eclipse/ccstudio -noSplash -data ../workspace -application com.ti.ccstudio.apps.projectImport -ccs.help
    root@95690ff572cb:/wd#

  • Below is the little script I used to process the strace log taken in the working Ubuntu 18.04 VM.  It resulted in `libc6:amd64 libgcc1:amd64 libpython2.7:amd64 libstdc++6:amd64 locales zlib1g:amd64` and installing those in the docker did not fix the issue.

    import pathlib
    import re
    import subprocess
    import sys
    
    paths = set()
    packages = set()
    
    for line in sys.stdin:
        if line.startswith('open'):
            if 'no such file' in line.casefold():
                continue
    
            p, = re.finditer('"([^"]+)"', line)
            path = p[1]
    
            if path in paths or path.startswith(('/opt/ti/', '/home/')) or not path.startswith('/'):
                continue
    
            paths.add(path)
    
            package = subprocess.run(
                [
                    'dpkg',
                    '-S', p[1],
                ],
                stdout=subprocess.PIPE,
                encoding='UTF-8',
            ).stdout
            if len(package) > 100:
                print('ack', p[1])
                break
            package, _, _ = package.rpartition(':')
            packages.add(package)
    
    print(' '.join(sorted(packages)))
    

  • Kyle,

    I'm not sure if you've already made more progress on this, but a colleague was recently able to help me test a similar scenario on a Ubuntu 18.04 system here by running the same commands as yours.

    Based on your post above, it seems that you are able to run CCS on command line fine until you install the C2000 compiler tools v6.4. 

    We observed the same behavior in that prior to installing the compiler, the projectImport command line works similar yours. After issuing the command to install compiler what happens is that the installation actually completes only during the next restart of CCS. So when the projectImport command is issued the second time, it only then starts the compiler installation as in the screenshot below. 

    However, the installation never completed. We think this might be due to incompatibility between the installer for this older version of compiler tools and newer Ubuntu versions. In your case I suspect the lack of a GUI prevented you from seeing that the installer was running (or trying to run). 

    If you have a need to use this specific compiler version and have it already installed on another system, you could try copying over the entire folder to this system to bypass the installation from repository. Besides that though, it seems that you do have the command line interface successfully running on your system.

  • Thanks for the follow up.  It turns out we could update to 18.1 just by getting rid of a couple improper `#include <cmath>`.  It still bugs me that I didn't get this working but adding enough that I could see the GUI would probably be good.  I never have liked dealing with stuff integrated into Eclipse like this.  It's much easier to just have a standard external build system.