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.

[参考译文] 使用 Docker 在命令行中编译 CCS

Guru**** 2020320 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1191401/ccs-compilation-in-command-line-issue-using-a-docker

您好!

尝试在 Docker 中编译 CCS 项目。 在 PC 上的命令行中编译它可以正常工作(使用此文档: https://software-dl.ti.com/ccs/esd/documents/ccs_projects-command-line.html#working-with-ccs-linux )

 但是,当在备文档中尝试它时 ,会出现以下错误:

------------------

无法初始化服务器:无法连接:连接被拒绝

Eclipse:

发生错误。

------------------

在日志消息下方:

----------------------------------

Eclipse.buildId=4.14.0.I20191210-0610

java.version=1.8.0_112

java.vendor=Oracle Corporation

引导加载程序常量:os=linux、arch=x86_64、ws=gtk、NL=en_US

命令行参数: -OS Linux -ws gtk -arch x86_64

 

!Entry org.eclipse.OSGi 4 0 2023-01-30 15:32:07.388

!消息应用程序错误

!堆栈1

org.eclipse.SWT.SWTError:不再有句柄[gtk_init_check()失败]

    在 org.eclipse.swt.swt.error (swt.java:4746)

    在 org.eclipse.swt.widget.Display.createDisplay(Display.java:1117)

    在 org.eclipse.swt.widget.Display.create (Display.java:1057)

    请访问 org.eclipse.swt.graphics.Device。 (device.java:175)

    在 org.eclipse.swt.widget.Display。 (Display.Java:623)

    在 org.eclipse.swt.widget.Display。 (Display.Java:614)

    org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:778)

    在 org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.Java:166)

    org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:180)

    org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)

    org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)

    org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)

    org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)

    org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)

    org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)

    sun.reflect.NativeMethodAccessorImpl.invoke0(Native 方法)

    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    java.lang.reflect.Method.invoke(Method.java:498)

    org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)

    在 org.eclipse.equinox.launcher.Main.basicRun (Main.java:594)

    org.eclipse.equinox.launcher.Main.run(Main.java:1465)

    在 org.eclipse.equinox.launcher.main.main (Main.java:1438)

----------------

出现此问题的原因是 Docker 中没有 X11服务器。 当 PC 上的命令运行时、不会显示任何 GUI 显示、因此无法理解它尝试 创建显示的原因。

 是否有避免使用图形命令的选项?

谢谢!

此致、

纪尧姆

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Guillaume、

    使用安装在 Docker 映像上的 CCS 并通过命令行连接是一个相当常见的用例。 CCS 命令行工程编译系统依赖于基本的 CCS 工程管理组件、这些组件可能在 x11上具有一些默认依赖项(无论是否实际需要)。  

    请尝试安装中列出的所有必需依赖项:

    https://dev.ti.com/tirex/explore/node?node=A__ACNSXwPXVPPbZiadtPhz9g__ccs_devtools__FUz-xrs__LATEST

    谢谢

    Ki