diff --git a/.travis.yml b/.travis.yml
index cdd1849a21..46fee331e9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -232,20 +232,6 @@ matrix:
# Short duration job, use the container/without sudo image as it boots faster
sudo: false
env: TASK='pychecker-wip'
- - os: osx
- osx_image: xcode9.2
- compiler: clang
- env:
- - TASK='compile'
- - CPPUNIT='1.14'
- - PROTOBUF='3.5'
- - os: osx
- osx_image: xcode9.2
- compiler: gcc
- env:
- - TASK='compile'
- - CPPUNIT='1.14'
- - PROTOBUF='3.5'
- os: linux
dist: trusty
env: TASK='spellintian'
@@ -289,7 +275,7 @@ before_cache:
install:
# Match the version of protobuf being installed via apt
- - if [[ "$PROTOBUF" == "3.5" ]]; then pip install --user protobuf==3.5.0; fi
+ - if [[ "$PROTOBUF" == "3.5" ]]; then pip install --user protobuf==3.5.1; fi
- if [[ "$PROTOBUF" != "3.5" ]]; then pip install --user protobuf==3.1.0; fi
# We need to use pip rather than apt on Trusty
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then pip install --user numpy; fi
diff --git a/config/ola.m4 b/config/ola.m4
index 6080932e9a..9b15a9fc8b 100644
--- a/config/ola.m4
+++ b/config/ola.m4
@@ -24,8 +24,10 @@ AC_DEFUN([PROTOBUF_SUPPORT],
AC_REQUIRE_CPP()
PKG_CHECK_MODULES(libprotobuf, [protobuf >= $1])
-PKG_CHECK_MODULES(libprotobuf2, [protobuf < 3.2], [],
- [AC_MSG_ERROR([OLA currently requires protobuf < 3.2, see issue 1192])])
+AC_MSG_CHECKING([protobuf library version])
+PROTOBUF_VERSION=`pkg-config --modversion protobuf`;
+AC_MSG_RESULT([$PROTOBUF_VERSION])
+AC_SUBST([PROTOBUF_VERSION])
AC_SUBST([libprotobuf_CFLAGS])
diff --git a/java/Makefile.am b/java/Makefile.am
index bc4a184c80..aab382ea7c 100644
--- a/java/Makefile.am
+++ b/java/Makefile.am
@@ -16,7 +16,7 @@ generated-src/main/java/ola/rpc/Rpc.java: ${top_srcdir}/common/rpc/Rpc.proto
$(PROTOC) --java_out=$(top_builddir)/java/generated-src/main/java --proto_path=${top_srcdir}/common/rpc ${top_srcdir}/common/rpc/Rpc.proto
ola.jar: generated-src/main/java/ola/proto/Ola.java generated-src/main/java/ola/rpc/Rpc.java
- cd ${top_builddir}/java && mvn --file ${top_srcdir}/java/pom.xml -DbuildDir=${abs_top_builddir}/java -DprotobufGeneratedSource=$(abs_top_builddir)/java/generated-src/main/java package
+ cd ${top_builddir}/java && mvn --file ${top_srcdir}/java/pom.xml -DbuildDir=${abs_top_builddir}/java -DprotobufGeneratedSource=$(abs_top_builddir)/java/generated-src/main/java -DprotobufJavaVersion=$(PROTOBUF_VERSION) package
CLEANFILES = generated-src/main/java/ola/proto/Ola.java \
generated-src/main/java/ola/rpc/Rpc.java \
diff --git a/java/pom.xml b/java/pom.xml
index 247ae9ac2a..764fe4e030 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -88,7 +88,7 @@
com.google.protobuf
protobuf-java
- 3.1.0
+ ${protobufJavaVersion}
junit
diff --git a/protoc/CppFileGenerator.cpp b/protoc/CppFileGenerator.cpp
index 518c17879d..e7dd95ccb0 100644
--- a/protoc/CppFileGenerator.cpp
+++ b/protoc/CppFileGenerator.cpp
@@ -196,14 +196,6 @@ void FileGenerator::GenerateBuildDescriptors(Printer* printer) {
"assigndescriptorsname", GlobalAssignDescriptorsName(m_output_name));
printer->Indent();
- // Make sure the file has found its way into the pool. If a descriptor
- // is requested *during* static init then AddDescriptors() may not have
- // been called yet, so we call it manually. Note that it's fine if
- // AddDescriptors() is called multiple times.
- printer->Print(
- "$adddescriptorsname$();\n",
- "adddescriptorsname", GlobalAddDescriptorsName(m_file->name()));
-
// Get the file's descriptor from the pool.
printer->Print(
"const ::google::protobuf::FileDescriptor* file =\n"
diff --git a/protoc/GeneratorHelpers.cpp b/protoc/GeneratorHelpers.cpp
index 19609181e4..6f619b5c0c 100644
--- a/protoc/GeneratorHelpers.cpp
+++ b/protoc/GeneratorHelpers.cpp
@@ -104,11 +104,6 @@ string FilenameIdentifier(const string& filename) {
return result;
}
-// Return the name of the AddDescriptors() function for a given file.
-string GlobalAddDescriptorsName(const string& filename) {
- return "protobuf_AddDesc_" + FilenameIdentifier(filename);
-}
-
// Return the name of the AssignDescriptors() function for a given file.
string GlobalAssignDescriptorsName(const string& filename) {
return "protobuf_AssignDesc_" + FilenameIdentifier(filename);
diff --git a/protoc/GeneratorHelpers.h b/protoc/GeneratorHelpers.h
index 35efdbb043..fa91a915dc 100644
--- a/protoc/GeneratorHelpers.h
+++ b/protoc/GeneratorHelpers.h
@@ -67,9 +67,6 @@ string StripProto(const string& filename);
// Convert a file name into a valid identifier.
string FilenameIdentifier(const string& filename);
-// Return the name of the AddDescriptors() function for a given file.
-string GlobalAddDescriptorsName(const string& filename);
-
// Return the name of the AssignDescriptors() function for a given file.
string GlobalAssignDescriptorsName(const string& filename);