跳转到内容

ROSE 编译器框架/Jenkins 失败

来自维基教科书,开放世界中的开放书籍

各种失败

[编辑 | 编辑源代码]

问题 失败于astFileIOTests:

     filename = /getcwd: : No such file or directory
...
Error preDeleteTests(): classType->get_declaration() = 0x25492af0 = SgClassDeclaration 
make[5]: *** [test-read-medium] Aborted
make[4]: *** [check-local] Error 2

解决方案:这通常是由于系统错误导致的,因此解决方案是简单地重新启动失败的作业。


问题 失败于git-clone:

ERROR: Error cloning remote repo 'origin' : Could not clone [email protected]:rose/edg4x/rose-sh.git
hudson.plugins.git.GitException: Could not clone [email protected]:rose/edg4x/rose-sh.git
	at hudson.plugins.git.GitAPI.clone(GitAPI.java:271)
	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1040)
	at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:982)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2273)
	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:270)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
...

解决方案:这通常是由于系统错误导致的,因此解决方案是简单地重新启动失败的作业。


问题 失败于git-clone或者ssh:

ControlSocket /tmp/[email protected]:22 already exists
fatal: The remote end hung up unexpectedly

	at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:863)
	at hudson.plugins.git.GitAPI.access$000(GitAPI.java:40)
	at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:267)
	at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:246)
	at hudson.FilePath.act(FilePath.java:852)
	at hudson.FilePath.act(FilePath.java:825)
	at hudson.plugins.git.GitAPI.clone(GitAPI.java:246)
	... 12 more
Trying next repository
ERROR: Could not clone repository
FATAL: Could not clone

解决方案:此处的错误与 SSH 配置有关 (~/.ssh/config),特别是ControlSocket设置。解决方案可能是删除此可选 (方便) 配置。


问题 失败于git-submodule-update:

Commencing build of Revision 1d4fd18f6d17dd66553a248496026ceb88773fac (detached)
Merging Revision 1d4fd18f6d17dd66553a248496026ceb88773fac (detached) onto master
FATAL: Command "git submodule update" returned status code 1:
fatal: reference is not a tree: d19d03c5d63860f0e9cc1c35afc4f8b8ca682afd
Unable to checkout 'd19d03c5d63860f0e9cc1c35afc4f8b8ca682afd' in submodule path 'src/frontend/CxxFrontend/EDG'


解决方案:确保您已推送了伴随的子模块提交。


问题 执行脚本时出现输入/输出错误

/tmp/hudson2706138848682410422.sh: line 29: /home/hudson-rose/Applications/jenkins/scripts/tests/rose-test.sh: Input/output error
Build step 'Execute shell' marked build as failure


解决方案:重新启动作业;这是一个可能与 NFS 相关的 I/O 错误。


问题' 从 origin / origin 获取失败 - 可能不可用。继续执行。

Fetching upstream changes from [email protected]:rose/edg4x/rose-sh.git
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway.
hudson.plugins.git.GitException: Command "git fetch -t [email protected]:rose/edg4x/rose-sh.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: ssh_exchange_identification: Connection closed by remote host
fatal: The remote end hung up unexpectedly

	at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:863)


解决方案:重新启动作业;这是由于 ?。


问题' $ROSE_INSTALL 不存在

$ROSE_INSTALL does not exist: '/home/hudson-rose/opt/rose/edg4x//frontend/EDG_4_4/gcc/4.2.4'
+ exit 1

解决方案:确保在给定的 GIT_COMMIT 和 GCC 版本下,make-install 作业已完成。然后,您可以重新启动作业。


问题 rsync 错误:一些文件/属性未传输

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

解决方案:重新启动作业可以解决问题。这通常是由于在复制 ROSE 工作区时遇到了一些 NFS、SSH 或权限问题。


问题 ../../scripts/dotgenLetterPDF inputCode_wholeAST_1_WholeAST.dot inputCode_ASTWholeGraphGenerator_small.pdf 无法在用户的路径中找到 GraphViz dot 程序,忽略转换为 PostScript 文件 (不是问题) ... 如果 ! test -e inputCode_ASTWholeGraphGenerator_small.pdf; 然后退出 1; fi

http://hudson-rose-30:8080/job/C0-Start/

1. 问题无法干净地合并您的分支


解决方案:运行git-merge在您的本地机器上,以解决与 master 的合并冲突。

例如,


2. 问题失败 有新的提交?


解决方案:确保您已提交了更改,然后再次推送您的更改集。否则,忽略消息,也许您已经集成的分支只是被错误地测试了。


3. 问题无制表符字符策略检测到错误。现在中止。

The following C/C++ source files contain TAB characters, which can be fixed
    in a variety of ways. Perhaps the easiest is to run this script again with
    the "--fix" switch (see "./scripts/policies/NoTabCharacters.pl --help" for details).
        src/midend/programAnalysis/genericDataflow/analysis/analysis.C
        src/midend/programAnalysis/genericDataflow/analysis/dataflow.C
        src/midend/programAnalysis/genericDataflow/simpleAnalyses/liveDeadVarAnalysis.C
Errors detected by the no tab characters policy. Aborting now.
Build step 'Execute shell' marked build as failure
Project C0-Start still waiting for 12 builds to complete
Notifying upstream projects of job completion
Finished: FAILURE


解决方案:按照说明从您的源文件中删除制表符字符

  $ cd $ROSE_SOURCE
  $ ./scripts/policies/NoTabCharacters.pl --fix

下次,请在推送之前在本地运行测试!(策略检查是make all的一部分。您也可以单独运行./scripts/policies-checker.sh从 ROSE 源代码树的顶层执行。)


4. 问题Unix 行结束策略检测到错误。现在中止。

POLICY Checking unix line termination policy (./scripts/policies/UnixLineTermination.pl)
    ROSE developers predominantly use Unix-like systems for development. These
    systems use the ASCII LF (line feed, '\n') character for line termination.
    Some other operating systems insert a CR (carriage return, '\r') in front of
    the LF.  Insertion of the extra CR causes problems for revision management
    software and some Unix-based text editors which developers then have to work
    around and/or correct.  To convert a file from any mixture of CR+LF or
    LF-only line endings to LF-only line endings, use:
      * the unix command "dos2unix"
      * vim 7.0 and later commands ':update', ':setlocal ff=unix'.
      * in XEmacs use the "M-x set-buffer-file-coding-system RET" and
        enter "undecided-unix".
    The following source files have CR+LF line termination:
           3 ( 100%) lines in ./tests/CompileTests/Fortran_tests/test2011_Rice_function-no-result-1.f90
           6 ( 100%) lines in ./tests/CompileTests/Fortran_tests/test2011_Rice_function-no-result-2.f90
           3 ( 100%) lines in ./tests/CompileTests/Fortran_tests/test2011_Rice_function-result-1.f90
Errors detected by the unix line termination policy. Aborting now.
...
Finished: FAILURE


解决方案:按照说明从您的源文件中删除 CR+LF 行结束符字符

  $ man dos2unix

  $ dos2unix ${ROSE_SOURCE}/path/to/culprit/file_1
  $ dos2unix ${ROSE_SOURCE}/path/to/culprit/file_2
  ...
  $ dos2unix ${ROSE_SOURCE}/path/to/culprit/file_N

下次,请在推送之前在本地运行测试!(策略检查是make all的一部分。您也可以单独运行./scripts/policies-checker.sh从 ROSE 源代码树的顶层执行。)


5. 问题未使用源代码策略检测到错误。现在中止。

Number of remaining unused source files: 1482.
Errors detected by the unused sources policy. Aborting now.
...
Finished: FAILURE

“未使用源代码策略”将通过“剩余未使用的源文件数量:1481。”。因此,您将看到至少 1481 行输出源文件。不,这不是您的问题。简单来说,当此策略首次实施时,已经存在违规文件。此策略的意义仅仅是不降低门槛,即不要超过 1481 个未使用的源代码。(也许有一天我们真的会修复这个问题)。


解决方案:确保您的源文件在与以下正则表达式匹配的某种 Makefile 中被提及/\/(Makefile\.am|Makefile_variables|CMakeList\.txt|make_rule\.inc|Makefile-.*\.inc)$/(截至提交213fd5d72,2012 年 7 月 26 日)。

下次,请在推送之前在本地运行测试!(策略检查是make all的一部分。您也可以单独运行./scripts/policies-checker.sh从 ROSE 源代码树的顶层执行。)

C6-ROSE-distcheck

[编辑 | 编辑源代码]

http://hudson-rose-30:8080/job/C6-ROSE-distcheck/

问题:

make[3]: *** No rule to make target `README', needed by `distdir'.  Stop.
...
make: *** [distdir] Error 1

********************************************************************************
*** FAILED make distcheck step
********************************************************************************

问题在于,在执行“make dist” 时,某些文件不会自动添加到软件分发中。例如,输入测试代码文件,README文件和配置文件。

预后:

make distcheck":

1. "make dist” 的概述:确保您可以成功创建软件包的 tarball 分发。

2. tarball 分发被解压缩(解包),然后对该分发源代码树执行测试。

3. "$ROSE/configure”:使用 GNU Autoconf 配置软件包。

4. "make all”:使用 GNU Automake 构建软件包。

5. "make check”:使用 GNU Automake 执行软件包的回归测试check-local规则。

文件并不总是自动添加到分发 tarball 中(在“make dist” 期间)。但是,如果大多数源代码和头文件用于构建库和可执行文件(在 Automake Makefile 中指定,Makefile.am).

),则它们会自动添加。:

  • 解决方案将违规文件添加到EXTRA_DISTMakefile.am中,该变量位于适当的
EXTRA_DIST = README project.config
  • 文件中。make distcheck下次推送之前,在您的本地机器上测试“

” !

  • 参考


问题: 分发基础知识:http://www.delorie.com/gnu/docs/automake/automake_91.html

config.status: error: cannot find input file: projects/RTC/docs/Makefile.in
make: *** [distcheck] Error 1

找不到输入文件 Makefile.inMakefile.am问题是,make dist没有列出项目的所有子目录。结果是,

无法创建完整的分发,因为它不知道要进入项目的子目录,因为这些目录没有被列出。$ROSE/projects/RTC/Makefile.am

SUBDIRS = src

看起来像这样但是,除了:

$ ls projects/RTC/
docs/  include/  libs/  Makefile.am  Makefile.in  Makefile.in~  RTC.C  src/  tests/

),则它们会自动添加。:

src/:

SUBDIRS = \
  docs \
  include \
  libs \
  src \
  tests

之外,还有更多子目录。

make[4]: *** No rule to make target `../../../src/librose.la', needed by `vectorization'.  Stop.
make[4]: *** Waiting for unfinished jobs....
...
make: *** [distdir] Error 1

********************************************************************************
*** FAILED make distcheck step
********************************************************************************

将所有子目录添加到问题:没有为 librose.la 指定规则以下 Makefile.am 用于项目的 tests 目录中。翻译器只将

TESTCODES = \
   simpleArithmetic.c \
   simpleIntegerArithmetic.c \
   multiDimensionArray.c 

 ../src/vectorization:
   $(MAKE) -C $(top_builddir)/projects/vectorization/src

...

$(TESTCODES): ../src/vectorization
  ../src/vectorization $(srcdir)/$@

 check-local:
  @$(MAKE) $(TESTCODES)

EXTRA_DIST = $(TESTCODES)


TESTCODES问题:没有为 librose.la 指定规则中的代码作为输入并执行翻译。将违规文件添加到问题是,将违规文件添加到


),则它们会自动添加。:

  • 中被列为分发对象,并且也用作 Makefile 中的目标规则。目前尚不清楚 Make distdir 如何处理这种情况。但是,避免在
TESTCODES = \
   simpleArithmetic.c \
   simpleIntegerArithmetic.c \
   multiDimensionArray.c 

+TEST_OUTPUTS = $(TESTCODES:.c=)

 ../src/vectorization:
   $(MAKE) -C $(top_builddir)/projects/vectorization/src

...

$(TEST_OUTPUTS): ../src/vectorization
  ../src/vectorization $(srcdir)/$(@:=.c)
 
check-local:
  @$(MAKE) $(TEST_OUTPUTS)

EXTRA_DIST = $(TESTCODES)

中使用该变量作为 Makefile 规则可以消除此问题。

C6-ROSE-distcheck


       ********************************************************************************
       *** Starting ROSE-build setup step
       ********************************************************************************
   
       chmod: changing permissions of `./ROSE-build/rose-0.9.5a': Operation not permitted
       chmod: changing permissions of `./ROSE-build/rose-0.9.5a/docs': Operation not permitted
       chmod: cannot read directory `./ROSE-build/rose-0.9.5a/docs': Permission denied
       chmod: changing permissions of `./ROSE-build/rose-0.9.5a/rose_config.h': Operation not permitted
       chmod: changing permissions of `./ROSE-build/rose-0.9.5a/rose_config.h.in': Operation not permitted
       chmod: changing permissions of `./ROSE-build/rose-0.9.5a/ROSE_ResearchPapers': Operation not permitted
       chmod: changing permissions of `./ROSE-build/rose-0.9.5a/ROSE_ResearchPapers/2008-09-SignatureVisualizationOfSoftwareBinaries-SoftVis.pdf': Operation not permitted
       chmod: changing permissions of `./ROSE-build/rose-0.9.5a/ROSE_ResearchPapers/2009-TechniquesForSoftwareQualityAnalysisOfBinaries-ISTA.pdf': Operation not permitted
       chmod: changing permissions of `./ROSE-build/rose-0.9.5a/ROSE_ResearchPapers/lcpc03_qsys_final.tgz': Operation not permitted
       chmod: changing permissions of `./ROSE-build/rose-0.9.5a/ROSE_ResearchPapers/2007-CommunicatingSoftwareArchitectureUsingAUnifiedSingle-ViewVisualization-ICECCS.pdf': Operation not permitted
       chmod: changing permissions of `./ROSE-build/rose-0.9.5a/ROSE_ResearchPapers/2003-ParallelObject-OrientedFrameworkOptimization-CPC.pdf': Operation not permitted
       chmod: changing permissions of `./ROSE-build/rose-0.9.5a/ROSE_ResearchPapers/2007-AnalyzingAndVisualizingWholeProgramArchitectures-Aerose-ICSE.pdf': Operation not permitted
       [many more similar lines omitted...]

添加另一个变量以用于 makefile 规则。

问题 操作不被允许

C2-ROSE-language-matrix-linux

[编辑 | 编辑源代码]http://hudson-rose-30:8080/job/C2-ROSE-language-matrix-linux/ http://hudson-rose-30:8080/job/C2-ROSE-language-matrix-osx/问题: ROSE 具有配置选项(例如,--enable-only-java) 来切换 (编译器前端) 语言支持(有关详细信息,请参见

$ROSE/configure --help

...: Assertion `! "[FATAL] [ROSE] [frontend] [C/C++] " "ROSE was not configured to support the C/C++ frontend."' failed.

)。Makefile.am许多新开发者对此并不了解,因此他们的工作经常在这些测试中失败,因为他们对启用或禁用的前端有错误的假设。

解决方案:要通过这些测试,请确保您的 条件块GNU Automake

if ROSE_BUILD_FORTRAN_LANGUAGE_SUPPORT
check-local:
  echo "Fortran (compiler frontend) language support is ENABLED!"
else
  echo "Fortran (compiler frontend) language support is DISABLED!"
endif


打开 (编译器前端) 语言特定逻辑。示例:在您特定于 Fortran 的工作中,使用以下条件:

与语言无关的测试代码 可以在

# TODO: add CUDA and OpenCL

##------------------------------------------------------------------------------
## Minimal input codes (just enough to be 'compiled')

#ROSE_BUILD_C_LANGUAGE_SUPPORT and ROSE_BUILD_CXX_LANGUAGE_SUPPORT are equivalent in ROSE due to the same EDG C++ frontend used. 
if ROSE_BUILD_C_LANGUAGE_SUPPORT
  __minimal_input_code = $(top_srcdir)/tests/input_codes/minimal/minimal.cpp
else
if ROSE_BUILD_FORTRAN_LANGUAGE_SUPPORT
  __minimal_input_code = $(top_srcdir)/tests/input_codes/minimal/minimal.f90
else
if ROSE_BUILD_JAVA_LANGUAGE_SUPPORT
  __minimal_input_code = $(top_srcdir)/tests/input_codes/minimal/minimal.java
else
if ROSE_BUILD_PHP_LANGUAGE_SUPPORT
  __minimal_input_code = $(top_srcdir)/tests/input_codes/minimal/minimal.php
else
if ROSE_BUILD_PYTHON_LANGUAGE_SUPPORT
  __minimal_input_code = $(top_srcdir)/tests/input_codes/minimal/minimal.py
else
if ROSE_BUILD_BINARY_ANALYSIS_SUPPORT
  __minimal_input_code = $(top_srcdir)/tests/input_codes/minimal/minimal.binary
endif # Binary analysis
endif # Python
endif # PHP
endif # Java
endif # Fortran
endif # C

${ROSE}tests/input_codes/Makefile.for.input.codes

中找到。
../../testTranslator -rose:java:d javac-output-classes -rose:verbose 0 ../../../../tests/CompileTests/Java_tests/test2011_02.java
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00002b2e79c63961, pid=24881, tid=47481965754688
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b16 mixed mode linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x484961]
#
# An error report file with more information is saved as:
# /export/tmp.hudson-rose/hudson/workspace/C1-ROSE-from-scratch-linux/ROSE_TEST_BUILD_STYLE/make-check-install-minimal/ROSE_TEST_GCC_VERSION/4.0.4/label/amd64-linux/ROSE-build/tests/CompileTests/Java_tests/hs_err_pid24881.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
make[5]: *** [test2011_02.o] Error 1 make[5]: *** Waiting for unfinished jobs.... Test using Java 1.4 version support.


这些条件的完整示例在 此文件 中给出。

#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00d38750, pid=12219, tid=3012402064
#
# Java VM: Java HotSpot(TM) Server VM (11.0-b16 mixed mode linux-x86)
# Problematic frame:
# C  [libstdc++.so.6+0xb5750]  __dynamic_cast+0x20
#
# An error report file with more information is saved as:
# /export/tmp.hudson-rose/hudson/workspace/C1-ROSE-from-scratch-linux/ROSE_TEST_BUILD_STYLE/make-check-install-minimal/ROSE_TEST_GCC_VERSION/4.1.2/label/i686-linux/ROSE-build/tests/CompileTests/Fortran_tests/hs_err_pid12219.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Note: astNode = 0x98dc790 = SgBasicBlock parent = 0x98fdad8 
Note: parentNode = 0x98dc790 = SgBasicBlock 
<font style="color:red">ERROR: <b>building test2011_Rice_A-cant-assert-keyword-nonnull.o</b></font>

Hide Details
make[6]: *** [test2011_Rice_A-cant-assert-keyword-nonnull.o] Aborted make[6]: *** Waiting for unfinished jobs....

Java 意外错误
华夏公益教科书