I am new to source analyzer.These are the warnings
sourceanalyzer -b opmbuild -Xmx2G -cp '/vx/vom/BUILD/nightly/sfm/tot/02_16/06_00_14/linux/opm/jars/*.jar' '/vx/vom/BUILD/nightly/sfm/tot/
02_16/06_00_14/linux/opm/src/**/*.java'
[warning]: Assuming Java source level to be 1.4 as it was not specified. Note that the default value may change in future versions.
[warning]: Unexpected exception while parsing file DMPSolutionDao.java
[warning]: Unexpected exception while parsing file DMPWaitingOperations.java
[warning]: Unexpected exception while parsing file DmpOperations.java
[warning]: Unexpected exception while parsing file EsxDmpJob.java
[warning]: Unexpected exception while parsing file MyAppsController.java
[warning]: Multiple definitions found for class VOMBackup (/vx/vom/BUILD/nightly/sfm/tot/02_16/06_00_14/linux/opm/src/pkg/unix/linux/stage/opt/VRTSsfmcs/config/adm/VOMBackup.java:20:1 and /vx/vom/BUILD/nightly/sfm/tot/02_16/06_00_14/linux/opm/src/db/config/common/VOMBackup.java
:20:1).
The first thing you need to do is to set the Java version using -version. This may resolve the warnings you are getting since you may be utilizing constructs that are not valid in Java 1.4. Those warnings are important and you need to investigate the cause. To get to the root of the issue, use -debug-verbose -logfile opmbuild_translate.log. The log entries should provide you with a lot more assistance in diagnosing the issue. If you feel that there is a valid construct that Fortify is not parsing correctly, you should contact Fortify support and provide an example.
Related
i set up an Jenkins-> robot framework chain where the robot tasks are stimulated by Jenkins.
The example robot tasks (some simple shell scripts) are executed without errors, but Jenkind fails because it is not able to parse some "output.xml" file which has nothing to do with the robot framework tasks.
Error message:
[ ERROR ] Reading XML source '/var/lib/jenkins/workspace/Test/output.xml' failed:ParseError: junk after document element: line 188, column 0
When i investigate the "output.xml" there is indeed an error:
...
rrors>
</errors>
</robot>
This behavior is already known and active and is described in https://issues.jenkins.io/browse/JENKINS-62359?attachmentViewMode=list
in 2020, but the error is still appearing.
Is there a solution or workaround? It is curious that sometimes the build is executing without an error when nothing changed.
I've pulled the most recent drake repo "https://github.com/RobotLocomotion/drake" and I am trying to
$run bazel build //...
but bazel is returning the following error
ERROR: /home/nathan/drake/tools/workspace/os.bzl:73:13: invalid escape sequence: \(. You can enable unknown escape sequences by passing the flag --incompatible_restrict_string_escapes=false ERROR: /home/nathan/drake/tools/workspace/os.bzl:73:19: invalid escape sequence: \|. You can enable unknown escape sequences by passing the flag --incompatible_restrict_string_escapes=false ERROR: /home/nathan/drake/tools/workspace/os.bzl:73:31: invalid escape sequence: \). You can enable unknown escape sequences by passing the flag --incompatible_restrict_string_escapes=false ERROR: error loading package '': in /home/nathan/drake/tools/workspace/default.bzl: in /home/nathan/drake/tools/workspace/blas/repository.bzl: Extension 'tools/workspace/os.bzl' has errors INFO: Elapsed time: 0.139s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded).
It seems to not like line 73 in os.bzl, but I'm not sure how to fix it. Any suggestions would be very helpful.
I've just run a build using those same versions of Bazel, Ubuntu, and Drake, with no problems.
There was a problem on that line several months ago, that we fixed in https://github.com/RobotLocomotion/drake/pull/12696. Can you confirm you're using a new-enough version of Drake? For example, what does git log -1 report?
running cmake -DCMAKE_TOOLCHAIN_FILE=ceres-solver/cmake/iOS.cmake -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DEIGEN_INCLUDE_DIR=/usr/local/Cellar/eigen -DIOS_PLATFORM=OS ceres-solver
gives me these errors
-- Using minimal glog substitute (include): internal/ceres/miniglog
-- Max log level for minimal glog substitute: 2
-- Building without OpenMP, disabling.
-- Neither OpenMP or TBB is enabled, disabling multithreading.
-- Looking for C++ include unordered_map
CMake Error: Generator: execution of make failed. Make command was: "CMAKE_MAKE_PROGRAM" "cmTC_3feba/fast"
-- Looking for C++ include unordered_map - not found
-- Looking for C++ include tr1/unordered_map
CMake Error: Generator: execution of make failed. Make command was: "CMAKE_MAKE_PROGRAM" "cmTC_36cb7/fast"
-- Looking for C++ include tr1/unordered_map - not found
-- Unable to find <unordered_map> or <tr1/unordered_map>.
-- Replacing unordered_map/set with map/set (warning: slower!), try enabling CXX11 option if you expect C++11 to be available.
-- Looking for C++ include memory
CMake Error: Generator: execution of make failed. Make command was: "CMAKE_MAKE_PROGRAM" "cmTC_013b8/fast"
-- Looking for C++ include memory - not found
-- Looking for C++ include tr1/memory
CMake Error: Generator: execution of make failed. Make command was: "CMAKE_MAKE_PROGRAM" "cmTC_bb377/fast"
-- Looking for C++ include tr1/memory - not found
CMake Error at CMakeLists.txt:494 (message):
Unable to find shared_ptr, try enabling CXX11 option if you expect C++11 to
be available.
even if i set CXX11 ON, I would get the same error. What should I do?
Assuming I get this working, do I just run make install to get the libceres.a file?
Much help appreciated.
This is not a C++11 error, notice the error
CMake Error: Generator: execution of make failed. Make command was: "CMAKE_MAKE_PROGRAM" "cmTC_3feba/fast"
CMake is trying to determine the presence of various c++11 features by compiling several short program fragments, and is unable to do so, due to some Make related problems (do you have make installed? Xcore command line tools?) and it ends up concluding that c++11 is not available.
The thing to fix here is to see what is going on with Make on your system.
I am trying to compile the following heron branch
https://github.com/twitter/heron/tree/karthik/pexbuild
using bazel 0.3.1 in ubuntu 15.10. In the workspace, I refer to another repo containing the pex bazel rules at
https://github.com/streamlio/bazel_rules_pex
I am getting the following error (interestingly it does not occur in ubuntu14.04, ubuntu16.10, centos7 and mac). Any help will be appreciated?
bazel build --config=ubuntu --verbose_failures heron/...
ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package '': Encountered error while reading extension file 'pex/pex_rules.bzl': no such package '#io_bazel_rules_pex//pex': Error cloning repository: https://github.com/streamlio/bazel_rules_pex.git: cannot open git-upload-pack caused by https://github.com/streamlio/bazel_rules_pex.git: cannot open git-upload-pack caused by java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty caused by Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty caused by the trustAnchors parameter must be non-empty.
There were many fixes and improvements in remote repositories, I'd advice you to upgrade bazel before trying anything else.
With the latest Xcode we can now view code coverage of local builds or integrations. I want to export the coverage results to build some analysis of this data.
The project https://github.com/jonreid/XcodeCoverage seems like a simple way to export the report data into xml or html which I can use to build something else. But I am having some difficulty.
The setup is fairly simple.
pull from the repository.
add the XcodeCovearage in my project.
ad a build phase script to run exporting.sh
Run my tests.
execute getcov to view the data.
When I run getcov I get the following output:
~/Library/Developer/Xcode/DerivedData/Garage-emxrmloetsurmcgqiahicyecarix/Build/Intermediates/CodeCoverage/Garage/Products/Debug-iphonesimulator /Workspace/ios/Garage/XcodeCoverage
/Workspace/ios/Garage/XcodeCoverage
Capturing coverage data from /Users/Seamus/Library/Developer/Xcode/DerivedData/Garage-emxrmloetsurmcgqiahicyecarix/Build/Intermediates/CodeCoverage/Garage/Intermediates/Garage.build/Debug-iphonesimulator/Garage.build/Objects-normal/x86_64
geninfo: Use of uninitialized value $version_string in substitution (s///) at /Workspace/ios/Garage/XcodeCoverage/lcov-1.11/bin/geninfo line 1914.
geninfo: Use of uninitialized value $version_string in pattern match (m//) at /Workspace/ios/Garage/XcodeCoverage/lcov-1.11/bin/geninfo line 1917.
geninfo: Use of uninitialized value $version_string in pattern match (m//) at /Workspace/ios/Garage/XcodeCoverage/lcov-1.11/bin/geninfo line 1930.
geninfo: Use of uninitialized value $gcov_version_string in pattern match (m//) at /Workspace/ios/Garage/XcodeCoverage/lcov-1.11/bin/geninfo line 3720.
geninfo: Use of uninitialized value $gcov_version_string in pattern match (m//) at /Workspace/ios/Garage/XcodeCoverage/lcov-1.11/bin/geninfo line 3720.
Scanning /Users/Seamus/Library/Developer/Xcode/DerivedData/Garage-emxrmloetsurmcgqiahicyecarix/Build/Intermediates/CodeCoverage/Garage/Intermediates/Garage.build/Debug-iphonesimulator/Garage.build/Objects-normal/x86_64 for .da files ...
geninfo: WARNING: no .da files found in /Users/Seamus/Library/Developer/Xcode/DerivedData/Garage-emxrmloetsurmcgqiahicyecarix/Build/Intermediates/CodeCoverage/Garage/Intermediates/Garage.build/Debug-iphonesimulator/Garage.build/Objects-normal/x86_64 - skipping!
Finished .info-file creation
Reading tracefile Coverage.info
lcov: ERROR: no valid records found in tracefile Coverage.info
Reading tracefile Coverage.info
lcov: ERROR: no valid records found in tracefile Coverage.info
Reading data file Coverage.info
genhtml: ERROR: no valid records found in trace file Coverage.info
Seems to be missing some information about the version of the lcov or getcov scripts and failing to build coverage.info
Has anybody tried using this with Xcode7
does anybody know any other useful tools to export the coverage data from Xcode?
Thanks,
It is problem of lcov. You just need to update lcov version to 1.12 and replace in code coverag