I need to build software via command line in a container to ensure that the process will remain "pure". Our build system at Oracle is naturally done from a linux OL8 server.
I was able to install CCS1210 on a OL8 system and import via command line an example project that I initially built via the CCS IDE. I then built that project using CCS via command line with no errors
~ $ cd /opt/ti/ccs1210/ccs/eclipse
/opt/ti/ccs1210/ccs/eclipse $ ./eclipse -noSplash -data ~/workspace_ccs/gpio_led_blink -application com.ti.ccstudio.apps.projectImport -ccs.location ~/workspace_ccs/gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang
/opt/ti/ccs1210/ccs/eclipse $ ./eclipse -noSplash -data ~/workspace_ccs/gpio_led_blink -application com.ti.ccstudio.apps.projectBuild -ccs.workspace
I then tried to create a podman container to run those same three lines of code, but ran into roadblock after roadblock of thing missing, or simply hanging. I was reminded by TI in my questions to them that they did not support OL8. So now I am trying the same thing based on a Ubuntu 22.10 image.
Again I started by creating VM, this time with Ubuntu and installing CCS on it and testing both the IDE and command line builds for the same example project before attempting to creating a podman container. I tarballed the install directory for CCS and copied that to a fresh Ubuntu VM and extracted it. After installing a few required packages (libc6-i386 libusb-0.1-4 libgconf-2-4 libncurses5 libpython2.7 libtinfo5) I was then able to run CCS again both with the GUI and command line.
I then created a podman container (nearly identical to Docker) where I extracted the tarball of the CCS install directory added the same package installs to the Dockerfile and tried to run the command line import and build.
Again I ran into failures of missing packages, which I have iteratively installed and retested. Now I am to a point were I am not seeing errors, but the import command hangs. Please help me to know what I need to do to get this working. My Dockerfile has gone through many steps of evolution, some of which probably didn't add to my success.
My Dockerfile:
FROM ubuntu:22.10
RUN apt -y update
RUN apt install -y libc6-i386 libusb-0.1-4 libgconf-2-4 libncurses5 libpython2.7 libtinfo5
RUN apt install -y libswt-gtk-4-jni
RUN apt install -y x xvfb
RUN apt install -y xdg-utils
RUN apt install -y slirp4netns openssh-client iputil-ping
COPY ti.ccs1210.ubuntu22_10.tar.gz .
RUN tar xafz ti.ccs1210.ubuntu22_10.tar.gz -C /
RUN rm ti.ccs1210.ubuntu22_10.tar.gz
Add build-proj.sh /
My script to do the build: /workspace_ccs/gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang is a copy of the example project imported and built in CCS IDE.
#!/bin/bash
#echo ">>> Setup dumby graphics display for eclipse output"
Xvfb :1 -ac -screen 0 1024x768x8 & export DISPLAY=:1
echo ">>>> Remove any existing tmp project file"
rm -rf /workspace_ccs/gpio_led_blink
echo ">>>> Change to eclipe directory"
cd /opt/ti/ccs1220/ccs/eclipse
echo ">>>> Import gpio led blink project"
./eclipse -noSplash -data /workspace_ccs/gpio_led_blink --application com.ti.ccstudio.app.projectImport -cccs.location /workspace_ccs/gpio_led_blink_am243x-lp_r5fss0-0_nortos_ti-arm-clang
echo ">>>> Build gpio led blink project"
./eclipse -noSplash -data /workspace_ccs/gpio_led_blink --application com.ti.ccsstudio.app.projectBuild -ccs.workspace
Run command for the container: Instead of running the my script directly I entered the container and executed the script commands manually.
$ podman run -ti -v workspace_ccs:/workspace_ccs:Z ubuntu22.10-ccs1210 bash
root@46d4c944984b:/# ./build-proj.sh
Output seen on the console for just the CCS project import :
root@cc196f4fa8c3:/opt/ti/ccs1220/ccs/eclipse# ./eclipse -noSplash -data /workspace_ccs/gpio_led_blink --application com.ti.c cstudio.app.projectImport -cccs.location /workspace_ccs/gpio_led_blink_am243x- lp_r5fss0-0_nortos_ti-arm-clang
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See www.slf4j.org/codes.html for further details.
SWT SessionManagerDBus: Failed to connect to org.gnome.SessionManager: Failed to execute child process ?dbus-launch? (No such file or directory)
SWT SessionManagerDBus: Failed to connect to org.xfce.SessionManager: Failed to execute child process ?dbus-launch? (No such file or directory)
SWT Webkit: Warning, You are using an old version of webkitgtk. (pre 2.4) BrowserFunction functionality will not be available
SWT WebKit: error initializing DBus server, dBusServer == 0
(Eclipse:7056): Gtk-WARNING **: 23:33:30.008: Negative content width -12 (allocation 1, extents 6x7) while allocating gadget (node separator, owner GtkSeparatorToolItem)
(Eclipse:7056): Gtk-WARNING **: 23:33:30.009: Negative content width -12 (allocation 1, extents 6x7) while allocating gadget (node separator, owner GtkSeparatorToolItem)
(Eclipse:7056): Gtk-WARNING **: 23:33:30.013: Negative content width -12 (allocation 1, extents 6x7) while allocating gadget (node separator, owner GtkSeparatorToolItem)
(Eclipse:7056): Gtk-WARNING **: 23:33:30.026: Negative content width -7 (allocation 6, extents 6x7) while allocating gadget (node separator, owner GtkSeparatorToolItem)
(Eclipse:7056): Gtk-WARNING **: 23:33:30.027: Negative content width -7 (allocation 6, extents 6x7) while allocating gadget (node separator, owner GtkSeparatorToolItem)
(Eclipse:7056): Gtk-WARNING **: 23:33:30.033: Negative content width -7 (allocation 6, extents 6x7) while allocating gadget (node separator, owner GtkSeparatorToolItem)
Warning: Nashorn engine is planned to be removed from a future JDK release
Warning: Nashorn engine is planned to be removed from a future JDK release
Warning: Nashorn engine is planned to be removed from a future JDK release
Warning: Nashorn engine is planned to be removed from a future JDK release
Warning: Nashorn engine is planned to be removed from a future JDK release
com.ti.rov: baseDir = /opt/ti/ccs1220/ccs/eclipse/plugins/com.ti.rov_1.0.0.202108240702/webcontents/, url = file:/opt/ti/ccs1220/ccs/eclipse/plugins/com.ti.rov_1.0.0.202108240702/webcontents/
com.ti.rov: globalRoots = []
CCS HTTP adapter started! [ccs.port:41117] - Open 'localhost:41117/ide' in web browser to see listing of available APIs...
^C
/workspace_ccs/gpio_led_blink/.metadata/.log after hung import was stopped:
!SESSION 2023-01-17 23:33:25.421 -----------------------------------------------
eclipse.buildId=4.23.0.I20220308-0310
java.version=11.0.13
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: --application com.ti.c cstudio.app.projectImport -cccs.location /workspace_ccs/gpio_led_blink_am243x- lp_r5fss0-0_nortos_ti-arm-clang
Command-line arguments: -os linux -ws gtk -arch x86_64 -data /workspace_ccs/gpio_led_blink --application com.ti.c cstudio.app.projectImport -cccs.location /workspace_ccs/gpio_led_blink_am243x- lp_r5fss0-0_nortos_ti-arm-clang
!ENTRY com.ti.common.core 1 0 2023-01-17 23:33:28.973
!MESSAGE path=ccs_base/DebugServer
!ENTRY com.ti.common.core 1 0 2023-01-17 23:33:28.974
!MESSAGE debugServerDir=/opt/ti/ccs1220/ccs/ccs_base/DebugServer
!ENTRY com.ti.ccstudio.ui 1 0 2023-01-17 23:33:32.620
!MESSAGE CCS IDE session started!
CCS build: 12.2.0.00009
CCS location: /opt/ti/ccs1220/ccs
Workspace location: /workspace_ccs/gpio_led_blink
!ENTRY com.ti.ccstudio.debug.server 4 214294189 2023-01-17 23:33:32.680
!MESSAGE Unexpected CCS exit detected [1/17/23, 5:03 PM]!!!
!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.760
!MESSAGE constructor
!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.760
!MESSAGE done with directories
!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.761
!MESSAGE loading ti_logger
!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.762
!MESSAGE Platform os: linux
!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.762
!MESSAGE loading cTools
!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.764
!MESSAGE loading TraceFactory
!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.765
!MESSAGE loading sqlite3
!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.765
!MESSAGE loading CloudTrace
!ENTRY com.ti.dbgtrc.webapp.CloudTraceInterface 0 0 2023-01-17 23:33:32.771
!MESSAGE CloudTrace interface loaded
!ENTRY com.ti.ccstudio.project.ui.webcontent 1 0 2023-01-17 23:33:32.857
!MESSAGE CCS HTTP adapter started! [ccs.port:41117] - Open 'localhost:41117/ide' in web browser to see listing of available APIs...
!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:33.452
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.
!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:34.159
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.
!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:34.971
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.
!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:35.482
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../, see CVE-2021-41033. Consider using https instead.
!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:35.589
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.
!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:36.223
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.
!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:36.836
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.
!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:36.981
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../, see CVE-2021-41033. Consider using https instead.
!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:37.682
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.
!ENTRY org.eclipse.equinox.p2.repository 2 0 2023-01-17 23:33:38.208
!MESSAGE Using unsafe http transport to retrieve software-dl.ti.com/.../content.xml.xz, see CVE-2021-41033. Consider using https instead.