Source: autofdo Version: 0.19-2 Severity: important Tags: patch autofdo should use the system libprotobuf instead of an own copy.
debdiff attached.
diff -Nru autofdo-0.19/debian/control autofdo-0.19/debian/control --- autofdo-0.19/debian/control 2019-10-27 21:52:39.000000000 +0200 +++ autofdo-0.19/debian/control 2019-10-28 12:28:07.000000000 +0200 @@ -8,6 +8,8 @@ libgoogle-glog-dev, libgflags-dev, libelf-dev, llvm-9-dev, + protobuf-compiler, + libprotobuf-dev, Standards-Version: 4.4.1 Homepage: https://github.com/google/autofdo diff -Nru autofdo-0.19/debian/patches/link-atomic.diff autofdo-0.19/debian/patches/link-atomic.diff --- autofdo-0.19/debian/patches/link-atomic.diff 2019-10-28 12:28:07.000000000 +0200 +++ autofdo-0.19/debian/patches/link-atomic.diff 1970-01-01 02:00:00.000000000 +0200 @@ -1,30 +0,0 @@ ---- a/third_party/protobuf/configure.ac -+++ b/third_party/protobuf/configure.ac -@@ -189,6 +189,16 @@ AM_CONDITIONAL([HAVE_PTHREAD], [test "x$ - # We still keep this for improving pbconfig.h for unsupported platforms. - AC_CXX_STL_HASH - -+AC_MSG_CHECKING([whether linking wiht -latomic succeeds]) -+save_LIBS=$LIBS -+LIBS="$LIBS -latomic" -+AC_LINK_IFELSE( -+ [AC_LANG_SOURCE([int main() { return 0; }])], -+ [LIBATOMIC=-latomic; AC_MSG_RESULT(yes)], -+ [LIBATOMIC=; AC_MSG_RESULT(no)]) -+AC_SUBST(LIBATOMIC) -+LIBS=$save_LIBS -+ - case "$target_os" in - mingw* | cygwin* | win* | aix*) - ;; ---- a/third_party/protobuf/src/Makefile.am -+++ b/third_party/protobuf/src/Makefile.am -@@ -211,7 +211,7 @@ libprotobuf_lite_la_SOURCES = - google/protobuf/io/zero_copy_stream.cc \ - google/protobuf/io/zero_copy_stream_impl_lite.cc - --libprotobuf_la_LIBADD = $(PTHREAD_LIBS) -+libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC) - libprotobuf_la_LDFLAGS = -version-info 15:1:0 -export-dynamic -no-undefined - if HAVE_LD_VERSION_SCRIPT - libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map diff -Nru autofdo-0.19/debian/patches/link-protobuf.diff autofdo-0.19/debian/patches/link-protobuf.diff --- autofdo-0.19/debian/patches/link-protobuf.diff 1970-01-01 02:00:00.000000000 +0200 +++ autofdo-0.19/debian/patches/link-protobuf.diff 2019-10-28 12:28:07.000000000 +0200 @@ -0,0 +1,36 @@ +--- autofdo-0.19.orig/Makefile.am ++++ autofdo-0.19/Makefile.am +@@ -1,14 +1,14 @@ + ## Process this file with automake to produce Makefile.in + + PROTOBUF = third_party/protobuf +-PROTOBUF_DEP = $(PROTOBUF)/src/.libs/libprotobuf.a +-PROTOC = ./$(PROTOBUF)/src/protoc ++PROTOBUF_DEP = -lprotobuf ++PROTOC = protoc + + $(PROTOBUF)/configure: + echo "[AUTOGEN] Preparing protobuf" + (cd $(PROTOBUF) ; autoreconf -f -i -Wall,no-obsolete) + +-$(PROTOC) $(PROTOBUF)/src/.libs/libprotobuf.a: $(PROTOBUF)/configure ++$(PROTOBUF)/src/.libs/libprotobuf.a: $(PROTOBUF)/configure + echo "[MAKE] Building protobuf" + (cd third_party/protobuf/; CC="$(CC)" CXX="$(CXX)" LDFLAGS="$(LDFLAGS_$(CONFIG)) -g $(PROTOBUF_LDFLAGS_EXTRA)" CPPFLAGS="$(PIC_CPPFLAGS) $(CPPFLAGS_$(CONFIG)) -g $(PROTOBUF_CPPFLAGS_EXTRA)" ./configure --disable-shared --enable-static $(PROTOBUF_CONFIG_OPTS)) + make -C $(PROTOBUF) +@@ -23,12 +23,12 @@ protoc_outputs = \ + third_party/perf_data_converter/src/quipper/perf_stat.pb.cc \ + third_party/perf_data_converter/src/quipper/perf_stat.pb.h + +-$(protoc_outputs): $(protoc_inputs) $(PROTOC) ++$(protoc_outputs): $(protoc_inputs) + $(PROTOC) --cpp_out=`dirname $<` -I`dirname $<` $(protoc_inputs) + + ACLOCAL_AMFLAGS = -I m4 +-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/third_party/perf_data_converter/src/quipper -I./$(PROTOBUF)/src +-AM_CXXFLAGS = -std=gnu++11 -I./$(PROTOBUF)/src ++AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/third_party/perf_data_converter/src/quipper ++AM_CXXFLAGS = -std=gnu++11 + LIBS += -lpthread + LIBELF = -lelf + diff -Nru autofdo-0.19/debian/patches/series autofdo-0.19/debian/patches/series --- autofdo-0.19/debian/patches/series 2019-10-28 12:27:55.000000000 +0200 +++ autofdo-0.19/debian/patches/series 2019-10-28 12:28:07.000000000 +0200 @@ -1,4 +1,4 @@ link-libgflags.diff link-libglog.diff disable-rpath.diff -link-atomic.diff +link-protobuf.diff