I compiled a .proto file using version - libprotoc 2.5.0 and updated the corresponding java file to my build which has the protobuff jars corresponding version - libprotoc2.4.1. Now when i start the build , I get the below error in logs
java.lang.verifyerror
I just surmise the cause of the error is the proto file being compiled against different version of protobuffer. So why is the java file not backward compatible with the earlier versions of protobuffers??
I also tried replacing the protobuff 2.4.1 jar in the build with 2.5.0 one but it doesn't work!!
Newer versions of protoc generate code that uses newer library features that aren't available in older versions of the library. Thus, you must use the same version of protoc and libprotobuf.jar. (I don't know why it doesn't work after you update the jar.)
Related
I use version 4.1.1 of GTSAM. I have version 3.3.4 of Eigen installed.
The error is:
/usr/local/include/gtsam/base/OptionalJacobian.h:22:10: fatal error: Eigen/Dense: No such file or directory
#include <Eigen/Dense>
I tried building GTSAM with the flag -DGTSAM_USE_SYSTEM_EIGEN set to both on and off.
The same error message appears in both cases.
For reference this is a ROS project built with catkin.
Have you seen this PR: https://github.com/borglab/gtsam/pull/1304
If you can upgrade GTSAM to 4.2a8, it uses Eigen's find script's rather than custom ones and should properly find Eigen3, if you have it installed if you require to build from source.
Since you are using ROS, why not go the standard route... Have you declared a dependency on it in your package.xml and installed it with rosdep?
https://github.com/ros/rosdistro/pull/23198/files
Add to your package.xml:
<depend>gtsam</depend>
And, your CMakeLists, you just call
find_package(gtsam REQUIRED)
It is unclear to me, if gtsam is available through binaries, why you would be building it from source.
I was able to get it working by cloning version 4.0.3 of GTSAM into the src folder of my workspace, then building it with the following arguments:
-DGTSAM_USE_SYSTEM_EIGEN=ON -DGTSAM_POSE3_EXPMAP=ON -DGTSAM_ROT3_EXPMAP=ON
I just downloaded latest Google protocol buffer, but I am unable to find protoc.exe that I need to compile .proto file. All I see are source files. Do I have to build the same using sources? I have protoc.exe from older version 2.6.1. Not sure how I got it though.
I am trying to modernize my module's C++ source code using clang-tidy. A few weeks ago, I downloaded and built clang and clang tools version 3.9 and when I ran it on one of my cpp files I got clang-analyzer-alpha.unix.PthreadLock saying that lock has already been taken.
Later, because of space constraints I removed that version of clang and used version 3.8 and 4.0 available in our 3rd party repos.
In both of these versions, I did not get any warnings regarding this alpha check. How do I enable it in version 4.0 ?
I am already using -checks=* while analyzing/running clang-tidy on my cpp file.
It looks like there's no way to enable those checks without building clang-tidy yourself: https://reviews.llvm.org/D28729#646548.
The download package for the Stanford Word Segmenter, e.g.
http://nlp.stanford.edu/software/stanford-segmenter-2015-01-29.zip
does not include any source code, though the web page
http://nlp.stanford.edu/software/segmenter.shtml
suggests that it should: "The download is a zipped file consisting of model files, compiled code, and source files". The download does include a build.xml file, but the lack of a src directory means that ant doesn't work (specifically complaining that it can't find the expected src directory).
And src seems to be needed, because without recompilation, attempt to use the demo script results in an "Unsupported major.minor version 52.0" error.
The sources are contained within the jar file called stanford-segmenter-3.5.1-sources.jar. All these sources are also included within the larger CoreNLP package, whose source you can browse on GitHub.
And src seems to be needed, because without recompilation, attempt to use the demo script results in an "Unsupported major.minor version 52.0" error.
Stanford NLP tools version 3.5 and later require Java 8. You need to either update your JDK version or downgrade to the Segmenter 3.4.1 (this is the last version compatible with Java 7).
Using gradle:
Is it possible to set the dependencies such that minor versions are auto upgrading? For instance, I would like gradle to automatically pick the latest guava 11 minor version.
Adding
compile 'com.google.guava:guava:11'
unless of
compile 'com.google.guava:guava:11.0.2'
do not seems to work.
The syntax to use is "11.+" if you want any minor revision above 11.0.0.
If you want for example 11.0.2 but not 11.1.0, you can use "11.0.+".
Using "11+" will probably also find 12.0.0 and above, so would not work as well.
This is mentioned in the Gradle user's guide, where it's referred to as a dynamic version.
Replace it with:
compile 'com.google.guava:guava:11.+