Package: groonga
Version: 5.1.1-1
Followup-For: Bug #770243
User: [email protected]
Usertags: origin-ubuntu xenial ubuntu-patch

Hello,

I can confirm that the reason for the build failure on other architectures
is that the software is not linking against libatomic, which is required for
portable code that is trying to use gcc atomics.

In Ubuntu, we've fixed this slightly differently than with the proposed
patch, by instead providing -latomic in the upstream Makefile.am.  This
seems a little closer to upstreamable for this (upstream) bug, although
there will be platforms where -latomic doesn't exist, so it shouldn't be
unconditional as in this patch.

Anyway, here is the full Ubuntu patch, which makes groonga buildable on all
architectures.

Thanks for considering,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
[email protected]                                     [email protected]
diff -Nru groonga-5.1.1/debian/control groonga-5.1.1/debian/control
--- groonga-5.1.1/debian/control	2015-12-26 23:39:56.000000000 -0800
+++ groonga-5.1.1/debian/control	2016-01-12 18:54:27.000000000 -0800
@@ -22,7 +22,7 @@
 Homepage: http://groonga.org/
 
 Package: groonga
-Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 ppc64el armhf
+Architecture: any
 Depends:
   ${misc:Depends},
   ${shlibs:Depends},
@@ -84,7 +84,7 @@
 
 Package: libgroonga-dev
 Section: libdevel
-Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 ppc64el armhf
+Architecture: any
 Multi-Arch: same
 Replaces: libgroonga (<< 1.2.0-1)
 Breaks: libgroonga (<< 1.2.0-1)
@@ -101,7 +101,7 @@
 
 Package: libgroonga0
 Section: libs
-Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 ppc64el armhf
+Architecture: any
 Multi-Arch: same
 Replaces: libgroonga (<< 1.2.0-1)
 Breaks: libgroonga (<< 1.2.0-1)
@@ -120,7 +120,7 @@
 
 Package: groonga-tokenizer-mecab
 Section: libs
-Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 ppc64el armhf
+Architecture: any
 Replaces: libgroonga-tokenizer-mecab (<< 1.2.0-1)
 Breaks: libgroonga-tokenizer-mecab (<< 1.2.0-1)
 Depends:
@@ -152,7 +152,7 @@
 
 Package: groonga-plugin-suggest
 Section: libs
-Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 ppc64el armhf
+Architecture: any
 Replaces: libgroonga-plugin-suggest (<< 1.2.0-1)
 Breaks: libgroonga-plugin-suggest (<< 1.2.0-1)
 Depends:
@@ -166,7 +166,7 @@
  This package provides suggest plugin.
 
 Package: groonga-bin
-Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 ppc64el armhf
+Architecture: any
 Replaces: groonga (<< 1.2.0-1)
 Breaks: groonga (<< 1.2.0-1)
 Depends:
@@ -180,7 +180,7 @@
  This package provides 'groonga' command.
 
 Package: groonga-httpd
-Architecture: amd64 i386 kfreebsd-amd64 kfreebsd-i386 ppc64el armhf
+Architecture: any
 Replaces: groonga (<< 1.2.0-1), groonga-server-http (<< 4.0.8-1)
 Breaks: groonga (<< 1.2.0-1), groonga-server-http (<< 4.0.8-1)
 Provides: groonga-server-http
diff -Nru groonga-5.1.1/debian/patches/series groonga-5.1.1/debian/patches/series
--- groonga-5.1.1/debian/patches/series	2015-12-07 04:58:43.000000000 -0800
+++ groonga-5.1.1/debian/patches/series	2016-01-07 09:15:43.000000000 -0800
@@ -0,0 +1 @@
+use-atomic-ops.diff
diff -Nru groonga-5.1.1/debian/patches/use-atomic-ops.diff groonga-5.1.1/debian/patches/use-atomic-ops.diff
--- groonga-5.1.1/debian/patches/use-atomic-ops.diff	1969-12-31 16:00:00.000000000 -0800
+++ groonga-5.1.1/debian/patches/use-atomic-ops.diff	2016-01-12 17:45:56.000000000 -0800
@@ -0,0 +1,27 @@
+Index: groonga-5.1.1-1ubuntu1/lib/Makefile.am
+===================================================================
+--- groonga-5.1.1-1ubuntu1.orig/lib/Makefile.am
++++ groonga-5.1.1-1ubuntu1/lib/Makefile.am
+@@ -44,7 +44,8 @@
+ 
+ libgroonga_la_LIBADD +=				\
+ 	$(ONIGMO_LIBS)				\
+-	$(LIBLZ4_LIBS)
++	$(LIBLZ4_LIBS)				\
++	-latomic
+ 
+ if WITH_LEMON
+ BUILT_SOURCES =					\
+Index: groonga-5.1.1-1ubuntu1/lib/Makefile.in
+===================================================================
+--- groonga-5.1.1-1ubuntu1.orig/lib/Makefile.in
++++ groonga-5.1.1-1ubuntu1/lib/Makefile.in
+@@ -630,7 +630,7 @@
+ 
+ libgroonga_la_LIBADD = dat/libgrndat.la mrb/libgrnmrb.la \
+ 	ts/libgrnts.la $(MESSAGE_PACK_LIBS) $(am__append_1) \
+-	$(ONIGMO_LIBS) $(LIBLZ4_LIBS)
++	$(ONIGMO_LIBS) $(LIBLZ4_LIBS) -latomic
+ @WITH_LEMON_TRUE@BUILT_SOURCES = \
+ @WITH_LEMON_TRUE@	grn_ecmascript.c
+ 

Reply via email to