When installing Haeleth's RLdev I got the error:
$ ./configure && omake
........
File "pa_matches.ml", line 24, characters 2-6:
Parse error: Deprecated syntax, the grammar module is expected
Error while running external preprocessor
Command line: camlp4 pa_o.cmo pa_op.cmo pa_extend.cmo q_MLast.cmo pr_dump.cmo 'pa_matches.ml' > /home/.../tmp/ocamlpp4e8738
*** omake error:
File rlc/OMakefile: lines 26:4-27:88
command terminated with code 2: ocamlc -c -pp 'camlp4 pa_o.cmo pa_op.cmo pa_extend.cmo q_MLast.cmo pr_dump.cmo' -I /usr/lib/ocaml/camlp4 gramlib.cma pa_matches.ml -o pa_matches.cmo
File pa_matches.ml contains only following code:
Line 22: open Pcaml
Line 23: EXTEND
Line 24: expr: LEVEL "expr1"
Line 25: [[ v = expr; "matches"; p = patt -> <:expr< match $v$ with [ $p$ -> True | _ -> False ] >> ]];
Line 26: END
In the INSTALL file specified OCaml version 3.09 but 4.01 installed.
OCaml 3.09 is incompatible to OCaml 4.01. This especially applies to camlp4. With OCaml 3.10 a new, backward incompatible version of camlp4 was introduced.
That's probably the reason, why pa_matches.ml doesn't compile. It uses the old camlp4.
Related
I configured Coverity with
The build is successful, but I receive Recoverable errors in the system headers (see build-log.txt)
For me it’s not clear why these errors occur (build is successful) and how to configure Coverity that these errors don’t occur at all?
2022-10-20T13:38:11.227719Z|cov-build|66594|info|> cov-build 2022.3.3 (build d37b3c67c6 p-2022.3-push-69)
2022-10-20T13:38:11.227742Z|cov-build|66594|info|> Coverity Build Capture (64-bit) version 2022.3.3 on Linux 5.15.0-48-generic x86_64
2022-10-20T13:38:11.227742Z|cov-build|66594|info|> Internal version numbers: d37b3c67c6 p-2022.3-push-69
2022-10-20T13:38:11.227742Z|cov-build|66594|info|>
2022-10-20T13:38:11.227757Z|cov-build|66594|info|> Dumping from hostname : ci
2022-10-20T13:38:11.227757Z|cov-build|66594|info|>
2022-10-20T13:38:11.227764Z|cov-build|66594|info|> Platform info:
2022-10-20T13:38:11.227764Z|cov-build|66594|info|> Sysname = Linux
2022-10-20T13:38:11.227764Z|cov-build|66594|info|> Release = 5.15.0-48-generic
2022-10-20T13:38:11.227764Z|cov-build|66594|info|> Machine = x86_64
2022-10-20T13:38:11.227764Z|cov-build|66594|info|>
2022-10-20T13:38:11.227764Z|cov-build|66594|info|>
2022-10-20T13:38:11.227780Z|cov-build|66594|info|> cov-build command: cov-build --dir build/test/icc cmake --build .
2022-10-20T13:38:11.227786Z|cov-build|66594|info|> cov-build expanded command: cov-build --dir build/test/icc cmake --build .
2022-10-20T13:38:11.227957Z|cov-build|66594|info|> build command: /usr/bin/cmake --build .
2022-10-20T13:38:11.227966Z|cov-build|66594|info|> thunk command: /opt/coverity/cov-analysis-2022-3/bin/cov-internal-thunk.sh cmake --build .
2022-10-20T13:38:11.227966Z|cov-build|66594|info|>
2022-10-20T13:38:11.227974Z|cov-build|66594|info|> Set UseSharedCompilation to false.
2022-10-20T13:38:11.227982Z|cov-build|66594|info|> Set COVERITY_BIN to /opt/coverity/cov-analysis-2022-3/bin
2022-10-20T13:38:11.227993Z|cov-build|66594|info|> Set COVERITY_SITE_CC to iccarm
2022-10-20T13:38:11.227999Z|cov-build|66594|info|> Set COVERITY_SITE_CC_CAPTURE_DESCENDANTS to
2022-10-20T13:38:11.228005Z|cov-build|66594|info|> Set COVERITY_TEMP to /tmp/cov-repo/61cbee90e75bbbfcd24d03a3fa896a77
2022-10-20T13:38:11.228015Z|cov-build|66594|info|> Set COVERITY_COMMON_TEMP to /tmp
2022-10-20T13:38:11.228023Z|cov-build|66594|info|> Set COVERITY_IDIR to /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc
2022-10-20T13:38:11.228048Z|cov-build|66594|info|> Set COVERITY_OUTPUT to /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/build-log.txt
2022-10-20T13:38:11.228053Z|cov-build|66594|info|> Set COVERITY_LOG to /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/build-log.txt
2022-10-20T13:38:11.228061Z|cov-build|66594|info|> Set COVERITY_OUTPUT_ENCODING to US-ASCII
2022-10-20T13:38:11.228066Z|cov-build|66594|info|> Set COVERITY_SYSTEM_ENCODING to US-ASCII
2022-10-20T13:38:11.228073Z|cov-build|66594|info|> Set COVERITY_EMIT to /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/emit
2022-10-20T13:38:11.228095Z|cov-build|66594|info|> Set COVERITY_IS_COMPILER to 0
2022-10-20T13:38:11.228100Z|cov-build|66594|info|> Set COVERITY_TOP_PROCESS to 0
2022-10-20T13:38:11.228103Z|cov-build|66594|info|> Set COVERITY_IS_COMPILER_DESCENDANT to 0
2022-10-20T13:38:11.228107Z|cov-build|66594|info|> Set COVERITY_DISENGAGE_EXES to "qemuwrapper;qemu-aarch64;qemu-alpha;qemu-arm;qemu-armeb;qemu-cris;qemu-i386;qemu-m68k;qemu-microblaze;qemu-mips;qemu-mipsel;qemu-nios2;qemu-ppc;qemu-ppc64;qemu-ppc64abi32;qemu-sh4;qemu-sh4eb;qemu-sparc;qemu-sparc32plus;qemu-sparc64;qemu-x86_64"
2022-10-20T13:38:11.228123Z|cov-build|66594|info|>
2022-10-20T13:38:11.228123Z|cov-build|66594|info|>
2022-10-20T13:38:11.228123Z|cov-build|66594|info|> Dumping Environment Variables:
2022-10-20T13:38:11.228123Z|cov-build|66594|info|>
2022-10-20T13:38:11.228142Z|cov-build|66594|info|> JENKINS_HOME=/home/repo/.jenkins
2022-10-20T13:38:11.228146Z|cov-build|66594|info|> GIT_PREVIOUS_SUCCESSFUL_COMMIT=5ecdaedd1ad5f4173cc5aa22a7ff06a2d7aa659b
2022-10-20T13:38:11.228151Z|cov-build|66594|info|> CI=true
2022-10-20T13:38:11.228154Z|cov-build|66594|info|> RUN_CHANGES_DISPLAY_URL=http://unconfigured-jenkins-location/job/xxx/324/display/redirect?page=changes
2022-10-20T13:38:11.228158Z|cov-build|66594|info|> HOSTNAME=ci
2022-10-20T13:38:11.228167Z|cov-build|66594|info|> NODE_LABELS=built-in
2022-10-20T13:38:11.228171Z|cov-build|66594|info|> GIT_COMMIT=c8902b01612b12a90701b3949e8be64e65775ba7
2022-10-20T13:38:11.228175Z|cov-build|66594|info|> HOME=/home/repo
2022-10-20T13:38:11.228179Z|cov-build|66594|info|> HUDSON_COOKIE=94d36788-17b8-4a07-a30e-6e22a28d86dc
2022-10-20T13:38:11.228183Z|cov-build|66594|info|> JENKINS_SERVER_COOKIE=durable-d67ab9cc6fd15cde89a20cb1f752777478da5dc72dc942e65e59bab789c478c1
2022-10-20T13:38:11.228187Z|cov-build|66594|info|> WORKSPACE=/home/repo/.jenkins/workspace/xxx
2022-10-20T13:38:11.228190Z|cov-build|66594|info|> CROSS_ROOT=/opt/iarsystems/bxarm-9.30.1/arm
2022-10-20T13:38:11.228194Z|cov-build|66594|info|> NODE_NAME=built-in
2022-10-20T13:38:11.228198Z|cov-build|66594|info|> RUN_ARTIFACTS_DISPLAY_URL=http://unconfigured-jenkins-location/job/xxx/324/display/redirect?page=artifacts
2022-10-20T13:38:11.228201Z|cov-build|66594|info|> ASM=iasmarm
2022-10-20T13:38:11.228205Z|cov-build|66594|info|> STAGE_NAME=Icc Arm + Coverity
2022-10-20T13:38:11.228209Z|cov-build|66594|info|> EXECUTOR_NUMBER=0
2022-10-20T13:38:11.228213Z|cov-build|66594|info|> GIT_BRANCH=origin/master
2022-10-20T13:38:11.228217Z|cov-build|66594|info|> TERM=xterm
2022-10-20T13:38:11.228220Z|cov-build|66594|info|> RUN_TESTS_DISPLAY_URL=http://unconfigured-jenkins-location/job/xxx/324/display/redirect?page=tests
2022-10-20T13:38:11.228224Z|cov-build|66594|info|> BUILD_DISPLAY_NAME=#324
2022-10-20T13:38:11.228228Z|cov-build|66594|info|> HUDSON_HOME=/home/repo/.jenkins
2022-10-20T13:38:11.228232Z|cov-build|66594|info|> JOB_BASE_NAME=xxx
2022-10-20T13:38:11.228236Z|cov-build|66594|info|> PATH=/opt/coverity/cov-analysis-2022-3/bin:/opt/SEGGER/JLink_V766:/opt/iarsystems/bxarm-9.30.1/common/bin:/opt/iarsystems/bxarm-9.30.1/arm/bin:/opt/gcc-arm-none-eabi-10.3-2021.07/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2022-10-20T13:38:11.228240Z|cov-build|66594|info|> TOOLCHAIN_FILE=../../../cmake/platforms/$TOOLCHAIN_FILENAME
2022-10-20T13:38:11.228244Z|cov-build|66594|info|> BUILD_ID=324
2022-10-20T13:38:11.228247Z|cov-build|66594|info|> BUILD_TAG=jenkins-xxx-324
2022-10-20T13:38:11.228251Z|cov-build|66594|info|> GIT_URL=file:///home/repo/repository
2022-10-20T13:38:11.228255Z|cov-build|66594|info|> BUILD_NUMBER=324
2022-10-20T13:38:11.228259Z|cov-build|66594|info|> JENKINS_NODE_COOKIE=a1e213c4-5eae-41f4-bff8-c26bcc76eacd
2022-10-20T13:38:11.228262Z|cov-build|66594|info|> CXX=iccarm
2022-10-20T13:38:11.228266Z|cov-build|66594|info|> RUN_DISPLAY_URL=http://unconfigured-jenkins-location/job/xxx/324/display/redirect
2022-10-20T13:38:11.228270Z|cov-build|66594|info|> HUDSON_SERVER_COOKIE=e67de7100ca0e18a
2022-10-20T13:38:11.228274Z|cov-build|66594|info|> JOB_DISPLAY_URL=http://unconfigured-jenkins-location/job/xxx/display/redirect
2022-10-20T13:38:11.228278Z|cov-build|66594|info|> JOB_NAME=xxx
2022-10-20T13:38:11.228282Z|cov-build|66594|info|> PWD=/home/repo/.jenkins/workspace/xxx/build/test/icc
2022-10-20T13:38:11.228286Z|cov-build|66594|info|> GIT_PREVIOUS_COMMIT=6ec26434a11544368ba767770e88c74dd3391906
2022-10-20T13:38:11.228290Z|cov-build|66594|info|> WORKSPACE_TMP=/home/repo/.jenkins/workspace/xxx#tmp
2022-10-20T13:38:11.228293Z|cov-build|66594|info|> CC=iccarm
2022-10-20T13:38:11.228297Z|cov-build|66594|info|> TOOLCHAIN_FILENAME=toolchain-iar-iccarm.cmake
2022-10-20T13:38:11.228301Z|cov-build|66594|info|> COVERITY_PREV_XML_CATALOG_FILES=
2022-10-20T13:38:11.228305Z|cov-build|66594|info|> COVERITY_TOP_CONFIG=/tmp/cov-repo/61cbee90e75bbbfcd24d03a3fa896a77/cov-configure/coverity_config.xml
2022-10-20T13:38:11.228309Z|cov-build|66594|info|> COVERITY_BUILD_INVOCATION_ID=1
2022-10-20T13:38:11.228313Z|cov-build|66594|info|> COVERITY_CONFIG_FILE=/opt/coverity/cov-analysis-2022-3/config/coverity_config.xml
2022-10-20T13:38:11.228317Z|cov-build|66594|info|> UseSharedCompilation=false
2022-10-20T13:38:11.228321Z|cov-build|66594|info|> COVERITY_BIN=/opt/coverity/cov-analysis-2022-3/bin
2022-10-20T13:38:11.228325Z|cov-build|66594|info|> COVERITY_SITE_CC=iccarm
2022-10-20T13:38:11.228332Z|cov-build|66594|info|> COVERITY_SITE_CC_CAPTURE_DESCENDANTS=
2022-10-20T13:38:11.228336Z|cov-build|66594|info|> COVERITY_TEMP=/tmp/cov-repo/61cbee90e75bbbfcd24d03a3fa896a77
2022-10-20T13:38:11.228340Z|cov-build|66594|info|> COVERITY_COMMON_TEMP=/tmp
2022-10-20T13:38:11.228344Z|cov-build|66594|info|> COVERITY_IDIR=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc
2022-10-20T13:38:11.228348Z|cov-build|66594|info|> COVERITY_REWRITE_FROM=
2022-10-20T13:38:11.228352Z|cov-build|66594|info|> COVERITY_REWRITE_TO=
2022-10-20T13:38:11.228356Z|cov-build|66594|info|> COVERITY_ENABLE_JAVA_ANNOTATION_FRAMEWORK_SUPPORT=1
2022-10-20T13:38:11.228360Z|cov-build|66594|info|> COVERITY_OUTPUT=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/build-log.txt
2022-10-20T13:38:11.228364Z|cov-build|66594|info|> COVERITY_LOG=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/build-log.txt
2022-10-20T13:38:11.228367Z|cov-build|66594|info|> COVERITY_OUTPUT_ENCODING=US-ASCII
2022-10-20T13:38:11.228371Z|cov-build|66594|info|> COVERITY_SYSTEM_ENCODING=US-ASCII
2022-10-20T13:38:11.228375Z|cov-build|66594|info|> COVERITY_EMIT=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/emit
2022-10-20T13:38:11.228379Z|cov-build|66594|info|> COVERITY_IS_COMPILER=0
2022-10-20T13:38:11.228383Z|cov-build|66594|info|> COVERITY_TOP_PROCESS=0
2022-10-20T13:38:11.228387Z|cov-build|66594|info|> COVERITY_IS_COMPILER_DESCENDANT=0
2022-10-20T13:38:11.228390Z|cov-build|66594|info|> COVERITY_DISENGAGE_EXES=qemuwrapper;qemu-aarch64;qemu-alpha;qemu-arm;qemu-armeb;qemu-cris;qemu-i386;qemu-m68k;qemu-microblaze;qemu-mips;qemu-mipsel;qemu-nios2;qemu-ppc;qemu-ppc64;qemu-ppc64abi32;qemu-sh4;qemu-sh4eb;qemu-sparc;qemu-sparc32plus;qemu-sparc64;qemu-x86_64
2022-10-20T13:38:11.228395Z|cov-build|66594|info|> COVERITY_COMPILER_PATH_MISMATCH_FILE=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/has_path_mismatches
2022-10-20T13:38:11.228399Z|cov-build|66594|info|> COVERITY_PATHLESS_CONFIGS_FILE=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/has_pathless_configs
2022-10-20T13:38:11.228405Z|cov-build|66594|info|>
2022-10-20T13:38:11.228405Z|cov-build|66594|info|>
2022-10-20T13:38:11.228405Z|cov-build|66594|info|> Dumping configuration:
2022-10-20T13:38:11.228405Z|cov-build|66594|info|>
2022-10-20T13:38:11.228415Z|cov-build|66594|info|> User/default configuration:
2022-10-20T13:38:11.228415Z|cov-build|66594|info|>
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Configuration read from: command-line
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: coverity
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: config
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: include Value: /opt/coverity/cov-analysis-2022-3/config/coverity_config.xml
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: config
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: prevent
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: dir Value: /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc
2022-10-20T13:38:11.228421Z|cov-build|66594|info|>
2022-10-20T13:38:11.228444Z|cov-build|66594|info|> Configuration read from: /opt/coverity/cov-analysis-2022-3/config/coverity_config.xml
2022-10-20T13:38:11.228444Z|cov-build|66594|info|> Node: coverity
2022-10-20T13:38:11.228444Z|cov-build|66594|info|> Node: cit_version Value: 1
2022-10-20T13:38:11.228444Z|cov-build|66594|info|> Node: config
2022-10-20T13:38:11.228444Z|cov-build|66594|info|> Node: include Value: /opt/coverity/cov-analysis-2022-3/config/template-iar_cxx_arm-config-0/coverity_config.xml
2022-10-20T13:38:11.228444Z|cov-build|66594|info|>
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Configuration read from: /opt/coverity/cov-analysis-2022-3/config/template-iar_cxx_arm-config-0/coverity_config.xml
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: coverity
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: cit_version Value: 1
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: config
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: build
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: compiler
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: template_compiler Value: true
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: comp_name Value: iccarm
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: comp_translator Value: iar_cxx:arm
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: comp_lang Value: C++
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: comp_generic Value: iar/arm
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: options
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: id Value: iar_cxx:arm-iccarm-.*
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: opt_preinclude_file Value: /opt/coverity/cov-analysis-2022-3/config/template-iar_cxx_arm-config-0/../user_nodefs.h
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: begin_command_line_config
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: md5 Value: 5f6642eb878a88db1dfb16309fb4338b
2022-10-20T13:38:11.228461Z|cov-build|66594|info|>
2022-10-20T13:38:11.230365Z|cov-build|66594|info|> Using LD_PRELOAD =
/opt/coverity/cov-analysis-2022-3/bin/libcapture-linux64-${PLATFORM}.so
[73713] EXECUTING: /opt/iarsystems/bxarm-9.30.1/arm/bin/ielfdumparm --source test.out
...
[73394] EXECUTING: grep dev
[STATUS] Compiling /home/repo/.jenkins/workspace/xxx/src/nodynalloc/new_del.cpp
/opt/coverity/cov-analysis-2022-3/bin/cov-emit --dir=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc --ignore_path=/tmp/cov-repo/61cbee90e75bbbfcd24d03a3fa896a77/cov-configure --ignore_path=/tmp/cov-repo/61cbee90e75bbbfcd24d03a3fa896a77/cov-repo/ab3163e8db5f4764170d37b222c3d703 --pre_preinclude /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/emit/ci/config/5092253b194ec0553c3a9de3b66cf08a/iar_cxx_arm-config-0/coverity-macro-compat.h --pre_preinclude /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/emit/ci/config/5092253b194ec0553c3a9de3b66cf08a/iar_cxx_arm-config-0/coverity-compiler-compat.h --c++ --dollar --allow_qualified_anonymous_unions --allow_global_anonymous_union --no_const_string_literals --unsigned_chars --trigraphs --enable_user_sections --add_type_modifier=__absolute,__big_endian --add_type_modifier=__little_endian --add_type_modifier=__packed,__pcrel --add_type_modifier=__sbrel,__global_reg --add_type_modifier=__coverity_16bit_float --allow_qualified_operator_new_return --lazy_hex_pp_number --short_enums --user_defined_literals --macro_preempts_udl_suffix --ppp_translator "replace/_Mem \*operator new(\[\])? _Mem/*operator new$1" --ppp_translator "replace/operator new mem/operator new" --ppp_translator replace/0.Infinity/1.0\/0.0 --ppp_translator replace/0.Na[Nn]/0.0\/0.0 --allow_injected_template_symbol --arg_dependent_overload --class_scope_noexcept --no_predefined_cplusplus -w --no_predefines --comp_ver 9030001 --char_bit_size=8 --wchar_t_keyword --no_multiline_string --ignore_calling_convention --no_enable_80bit_float --no_enable_128bit_float --macro_stack_pragmas --type_traits_helpers --rtti --inline_keyword --has_include_macro --has_include_next_macro --has_cpp_attribute_macro --no_predefines --preinclude /opt/coverity/cov-analysis-2022-3/config/template-iar_cxx_arm-config-0/../user_nodefs.h --c++17 --c++17 --no_rtti --no_exceptions --short_enums --gnu_version=50400 --macro_stack_pragmas --add_type_modifier=__data:1,__code --no_stdarg_builtin --sys_include /opt/iarsystems/bxarm-9.30.1/arm/inc/c --sys_include /opt/iarsystems/bxarm-9.30.1/arm/inc/c/aarch32 --sys_include /opt/iarsystems/bxarm-9.30.1/arm/inc/cpp --ppp_translator replace/(#include\s+)u8/$1 --ppp_translator replace/(#define\s+_DLIB_CONFIG_FILE_HEADER_NAME\s+)u8/$1 --ppp_translator replace/(#define\s+_DLIB_CONFIG_FILE_STRING\s+)u8/$1 --ppp_translator replace/(typedef\s+_Align_type<)::/$1 -DNDEBUG -U__EXCEPTIONS -D__coverity_undefine___EXCEPTIONS -D__FAR_RUNTIME_ATTRIBUTE__=__near_func -U__FOR_DEBUG__ -D__coverity_undefine___FOR_DEBUG__ -D__LITTLE_ENDIAN__=1 -U__PLACEMENT_DELETE -D__coverity_undefine___PLACEMENT_DELETE -U__RTTI -D__coverity_undefine___RTTI -U__STDC_VERSION__ -D__coverity_undefine___STDC_VERSION__ -U__coverity_undefine___STDC_VERSION__ -D__coverity_undefine___coverity_undefine___STDC_VERSION__ -U__cpp_exceptions -D__coverity_undefine___cpp_exceptions -U__cpp_rtti -D__coverity_undefine___cpp_rtti --type_sizes=dex8Pfilw4s2 --type_alignments=dex8Pfilw4s2 --size_t_type=j --ptrdiff_t_type=i /home/repo/.jenkins/workspace/xxx/src/nodynalloc/new_del.cpp
[73393] EXECUTING: /bin/mount
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xstddef0", line 16: warning #59:
function call is not allowed in a constant expression
#if _HAS_NOEXCEPT || !_HAS_EXCEPTIONS
^
[73399] EXECUTING: grep dev
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xstddef0", line 16: warning #59:
function call is not allowed in a constant expression
#if _HAS_NOEXCEPT || !_HAS_EXCEPTIONS
^
[73398] EXECUTING: /bin/mount
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xstddef0", line 16: warning #59:
function call is not allowed in a constant expression
#if _HAS_NOEXCEPT || !_HAS_EXCEPTIONS
^
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/yvals.h", line 159: warning #59:
function call is not allowed in a constant expression
#if _HAS_NOEXCEPT
^
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xstddef0", line 16: warning #59:
function call is not allowed in a constant expression
#if _HAS_NOEXCEPT || !_HAS_EXCEPTIONS
^
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xmemnew", line 7: warning #59: function
call is not allowed in a constant expression
#if __has_feature(cxx_noexcept)
^
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xmemnew", line 7: warning #59: function
call is not allowed in a constant expression
#if __has_feature(cxx_noexcept)
^
[73403] EXECUTING: /bin/mount
[73404] EXECUTING: grep dev
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xmemnew", line 7: warning #59: function
call is not allowed in a constant expression
#if __has_feature(cxx_noexcept)
...
2022-10-20T13:38:39.392031Z|cov-build|66594|info|> Invoking cov-security-da with commands: /opt/coverity/cov-analysis-2022-3/bin/cov-security-da --dir /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc
2022-10-20T13:38:39.401624Z|cov-build|66594|info|> Dynamic analyzer took 9 ms
2022-10-20T13:38:39.401624Z|cov-build|66594|info|> Build time (cov-build overall): 00:00:28.195804
2022-10-20T13:38:39.401624Z|cov-build|66594|info|>
2022-10-20T13:38:39.402216Z|cov-build|66594|info|> Build time (C/C++ emits total): 00:06:17.288925
2022-10-20T13:38:39.402216Z|cov-build|66594|info|>
2022-10-20T13:38:39.402216Z|cov-build|66594|info|>
2022-10-20T13:38:39.402240Z|cov-build|66594|info|> Emitted 15 C/C++ compilation units (100%) successfully
2022-10-20T13:38:39.402240Z|cov-build|66594|info|> [WARNING] Recoverable errors were encountered during 12 of these C/C++ compilation units.
2022-10-20T13:38:39.402240Z|cov-build|66594|info|>
2022-10-20T13:38:39.402240Z|cov-build|66594|info|> 15 C/C++ compilation units (100%) are ready for analysis
2022-10-20T13:38:39.402240Z|cov-build|66594|info|> For more details, please look at:
2022-10-20T13:38:39.402240Z|cov-build|66594|info|> /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/build-log.txt
Regarding the question in the title (how to configure for IAR), your cov-configure command line looks right to me.
The warning messages (function call is not allowed in a constant expression) are from the Coverity compiler, which believes the input is not valid C++, and hence is warning about it. But these warnings appear to be of a kind that will not cause any problem for analysis; the compiler just notes the problem but continues anyway, like with any other compiler warning. (When the analysis runs, if there is a consequence for fidelity, you would see RW.ROUTINE_NOT_EMITTED issues reported.)
Because the problem arises from inside the Coverity compiler, there isn't any easy way for the user to suppress these messages. My recommendation would be to create a minimal reproducer and send it to Coverity support for them to eventually fix in the product. If you really want to fix it yourself, you could probably fix it using a ppp_translator ("ppp" stands for "pre-preprocessor") element in the compiler configuration to rewrite the offending code on the fly, but that's a non-trivial undertaking.
Please see (contains a workaround and also the information with which release it shall be fixed)
https://community.synopsys.com/s/article/warning-59-function-call-is-not-allowed-in-a-constant-expression-if-HAS-NOEXCEPT
I use tineytex package and have no problem knitting a pdf when I click on the knit button in rStudio. However, when I called rmarkdown::render() with the same .Rmd file as input, only an intermeidate .tex file was generated in the target folder.
Below is my code.
rmarkdown::render(input = "C:/Users/sqhuang/Pdf.Rmd",
output_format = "pdf_document",
output_file = "test.pdf",
output_dir = ot_path)
Below is the error messages that I got.
processing file: Pdf.Rmd
|......... | 14%
ordinary text without R code
|................... | 29%
label: setup (with options)
List of 1
$ echo: logi FALSE
|............................ | 43%
ordinary text without R code
|..................................... | 57%
label: cars
|.............................................. | 71%
ordinary text without R code
|........................................................ | 86%
label: pressure (with options)
List of 1
$ echo: logi FALSE
|.................................................................| 100%
ordinary text without R code
output file: Pdf.knit.md
"C:/PROGRA~1/Pandoc/pandoc" +RTS -K512m -RTS Pdf.utf8.md --to latex
--from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash
--output pandoc15f027594a1c.tex --template "C:\PROGRA~1\R\R-36~1.1\library\RMARKD~1\rmd\latex\DEFAUL~3.TEX"
--highlight-style tango --pdf-engine pdflatex --variable graphics=yes --variable "geometry:margin=1in" --variable "compact-title:yes" This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/W32TeX)
(preloaded format=pdflatex) restricted \write18 enabled. warning:
kpathsea: //enterprise2/Users4$/Sqhuang_a/My Documents: Unrecognized
variable construct $/'. warning: kpathsea:
//enterprise2/Users4$/Sqhuang_a/My Documents: Unrecognized variable
construct$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My
Documents: Unrecognized variable construct $/'. warning: kpathsea:
//enterprise2/Users4$/Sqhuang_a/My
Documents/.TinyTeX/texmf-config/web2c/pdftex: Unrecognized variable
construct$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My
Documents/.TinyTeX/texmf-var/web2c/pdftex: Unrecognized variable
construct $/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My
Documents/.TinyTeX/texmf-home/web2c/pdftex: Unrecognized variable
construct$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My
Documents/.TinyTeX/texmf-config/web2c: Unrecognized variable construct
$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My
Documents/.TinyTeX/texmf-var/web2c: Unrecognized variable construct
$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My
Documents/.TinyTeX/texmf-home/web2c: Unrecognized variable construct
`$/'. entering extended mode Error: Failed to compile
\endeavor/apps_doc$/Applications/0_Support/GCS/Brett - Other
Duties/BAR/Steph/AL/Jul/test_report.tex. See
https://yihui.name/tinytex/r/#debugging for debugging tips.
I think I've figured out the problem (unfortunately, I seem to have ran into a further issue, but I think I've resolved this one anyway).
Basically, kpathsea is searching everywhere in your system for the needed packages. This means it's trying to search in directories that it can't read properly (because of the $ symbol amongst others). The solution was to find the texmf.cnf file which looks something like this:
% (Public domain.)
% This texmf.cnf file should contain only your personal changes from the
% original texmf.cnf (for example, as chosen in the installer).
%
% That is, if you need to make changes to texmf.cnf, put your custom
% settings in this file, which is .../texlive/YYYY/texmf.cnf, rather than
% the distributed file (which is .../texlive/YYYY/texmf-dist/web2c/texmf.cnf).
% And include *only* your changed values, not a copy of the whole thing!
%
TEXMFLOCAL = $SELFAUTOPARENT/texmf-local
TEXMFHOME = $HOME/.TinyTeX/texmf-home
TEXMFVAR = $HOME/.TinyTeX/texmf-var
TEXMFCONFIG = $HOME/.TinyTeX/texmf-config
OSFONTDIR = $SystemRoot/fonts//
ASYMPTOTE_HOME = $TEXMFCONFIG/asymptote
% Prefer external Perl for third-party TeXLive Perl scripts
% Was set to 1 if at install time a sufficiently recent Perl was detected.
TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL = 0
TEXMFAUXTREES = C:/PROGRA~1/R/R-36~1.3/share/texmf,
When searching, kpathsea replaces the $HOME with a directory, which contains a $, e.g., for me $HOME gets replaced by my default Documents folder (which is on a shared network drive).
I replaced anywhere that had a $HOME/.TinyTeX with ./TinyTeX, which would make kpathsea search in the directory where I have actually installed the TinyTex (and, more specifically to not search in the default directory.)
Hope this helps anybody having this issue and provides some help for developers on how to maybe stop this problem in the future.
I am trying to use jbuilder together with ppx_deriving (ppx_deriving_yojson specifically) but got stuck for well over an hour now. My current approach is a jbuild file, containing the following:
(jbuild_version 1)
(executables
((names (my-binary))
(libraries
(ppx_deriving
ppx_deriving_yojson
cohttp
yojson))
(preprocess (pps (ppx_deriving_yojson ppx_driver.runner)))))
But that results in
Command [5] exited with code 1:
$ (cd _build/default && ../.ppx/default/ppx_deriving_yojson+ppx_driver.runner/ppx.exe --dump-ast -o src/my_file.pp.ml --impl src/my_file.ml)
File "src/my_file.ml", line 16, characters 5-13:
Error: Attribute `deriving' was not used
Running the generated ppx_driver in _build/.ppx/default/ppx_deriving_yojson+ppx_driver.runner/ppx.exe manually with -print-transformations gives empty output, so I am obviously missing something.
The code builds fine with topkg by just including ppx_deriving and ppx_deriving_yojson as dependencies.
As of more recent versions of ppx_deriving_yojson this should be possible.
Code:
type t = {x: int; y: int} [##deriving to_yojson]
let () = print_endline (Yojson.Safe.to_string (to_yojson {x= 1; y= 2}))
And a sample jbuild file:
(jbuild_version 1)
(executables
((names (main))
(preprocess (pps (ppx_deriving_yojson)))
(libraries (ppx_deriving_yojson.runtime))))
(install
((section bin)
(files ((main.exe as main)))))
I currently have a project (Go to Python compiler) with the following files
ast.ml
parser.mly
lex.mll
weeder.ml
prettyPrint.ml
main.ml
Here are the dependencies:
parser: ast
lexer: parser, Core, Lexing
weeder: ast
prettyPrint: ast
main: ast, lex, parser, weeder, prettyPrint
I try to compile doing the following which should work according to the documentation I read:
$ menhir parser.mly
> Warning: you are using the standard library and/or the %inline keyword. We
recommend switching on --infer in order to avoid obscure type error messages.
$ ocamllex lex.mll
> 209 states, 11422 transitions, table size 46942 bytes
$ ocamlbuild -no-hygiene main.native
> File "parser.mli", line 77, characters 56-59:
Error: Unbound type constructor ast
Command exited with code 2.
Compilation unsuccessful after building 6 targets (2 cached) in 00:00:00.
ast.ml contains a list of type declarations in which I have a
type ast = ...
I spent a few hours now reading doc for ocamlfind, corebuild and ocamlopt and nothing. At some point it compiled by what seemed like a mere coincidence and never worked again. I'm open to using any tool.
Here is what is in parser.mly
%{
open Ast
exception ParserError of string
let rec deOptionTypeInList tupleList =
match tupleList with
| [] -> []
| (a, Some t)::tl -> (a, t)::(deOptionTypeInList tl)
| _ -> raise (ParserError "no type given in type declaration")
%}
[ ... long list of tokens ... ]
%type <ast> prog (* that seems to be the problem *)
%type <string> packDec
%type <dec> dec
%type <dec> subDec
[...]
%start prog
[ ... rules ... ]
And here is the line, the very last, that is refereed to in the error message.
val prog: (Lexing.lexbuf -> token) -> Lexing.lexbuf -> (ast)
The open Ast construct will not be exported to the .mli file where the type of symbols are mentioned. Try using
%type <Ast.ast>
Edit: also, your build commands are weird. You should not call ocamllex and menhir manually, and consequently not need -no-hygiene. Remove all generated files and just do
ocamlbuild -use-menhir main.byte
Is there any way to get back the mangled name from demangled name in g++.
For example , I have the demangled name func(char*, int), what should I do to get the mangled name i.e _Z4funcPci back?
My question is g++ specific.
You can simply use g++ to compile an empty function with the signature you require and extract the name from that. For example:
echo "int f1(char *, int) {} " | g++ -x c++ -S - -o- | grep "^_.*:$" | sed -e 's/:$//'
gives output
_Z2f1Pci
which is I think what you require. Make sure that you include any relevant header files as they will affect the way the symbols are mangled.
Based on the Bojan Nikolic's approach, here's a better script:
mangle.bash:
IFS='::' read -a array <<< "$1"
indexes=("${!array[#]}")
prefix=""
middle=""
suffix=""
rettype=""
if [ -z "$2" ]; then
rettype="void"
fi
for index in "${indexes[#]}"
do
#echo "$index ${array[index]}"
if [ $index == ${indexes[-1]} ]; then
#echo "last"
middle="$rettype ${array[index]};"
elif [ -n "${array[index]}" ]; then
#echo "not empty"
prefix="${prefix}struct ${array[index]}{"
suffix="${suffix}};"
fi
done
#echo "$prefix$middle$suffix $rettype $1{}"
echo "$prefix$middle$suffix $rettype $1{}" | g++ -x c++ -S - -o- | grep "^_.*:$" | sed -e 's/:$//'
Use:
$ ./mangle.bash "abc::def::ghi()"
_ZN3abc3def3ghiEv
$ ./mangle.bash "abc::def::ghi(int i, char c)"
_ZN3abc3def3ghiEic
$ ./mangle.bash "abc::def::def(int i, char c)" constr
_ZN3abc3defC2Eic
$ ./mangle.bash "abc::def::~def()" destr
_ZN3abc3defD2Ev
But as to constructors and destructors, remember that there are C0 C1 C2 and D0 D1 D2 ones.
What's worst, sometimes you cannot mangle a name because you must get more than one result.
See https://reverseengineering.stackexchange.com/q/4323/4398 (there are multiple destructors in VFT, and all of them are demangled as ClassName::~ClassName()). (The same applies to constructors, I have seen C0 and C2 constructors.)
On the other hand, that answer references the Itanium ABI: https://refspecs.linuxbase.org/cxxabi-1.75.html#mangling-type where mangling is specified.
The itanium-abi Haskell package: it did not work for me (May 2014)
There is a Haskell package
http://hackage.haskell.org/package/itanium-abi
that promises both demangling and mangling, but I could run only the demangling:
Installation on Ubuntu Precise:
sudo aptitude install ghc
sudo aptitude install cabal-install
cabal update
cabal install itanium-abi
Then you run ghci and after import ABI.Itanium and import Data.Either you get:
Prelude ABI.Itanium Data.Either> cxxNameToText $ head (rights [ demangleName "_ZTI13QSystemLocale" ])
"typeinfo for QSystemLocale"
There is mangleName, but it takes a DecodedName which is a data structure rather than a string, and that data structure is produced only by demangleName (unless I overlooked something). Hopefully, this will get better in some future release.
The clang code
I did not try the clang code.