pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/48608: textproc/icu build fails on NetBSD/m68k 6.1.3
>Number: 48608
>Category: pkg
>Synopsis: textproc/icu build fails on NetBSD/m68k 6.1.3
>Confidential: no
>Severity: critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 21 12:55:00 +0000 2014
>Originator: Izumi Tsutsui
>Release: pkgsrc-2013Q4
>Organization:
>Environment:
System: NetBSD/luna68k and NetBSD/atari 6.1.3
Architecture: m68k
Machine: luna68k and atari
Probably more MACHINE_ARCH will be affected
>Description:
textproc/icu build on NetBSD/m68k 6.1.3 fails due to lack of
gcc's atomic ops implementation:
---
c++ -O2 -fno-reorder-blocks -fno-ipa-sra -I/usr/include -W -Wall -pedantic
-Wpointer-arith -Wwrite-strings -Wno-long-long --std=c++0x -L/usr/lib
-Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -o ../../bin/makeconv makeconv.o ucnvstat.o
genmbcs.o gencnvex.o -L../../lib -licutu -L../../lib -licui18n -L../../lib
-licuuc -L../../stubdata -licudata -lpthread -lm
../../lib/libicui18n.so: undefined reference to `__sync_sub_and_fetch_4'
../../lib/libicui18n.so: undefined reference to `__sync_add_and_fetch_4'
Makefile:78: recipe for target '../../bin/makeconv' failed
gmake[2]: *** [../../bin/makeconv] Error 1
gmake[2]: Leaving directory
'/usr/obj.luna68k/pkgsrc/textproc/icu/work.m68k/icu/source/tools/makeconv'
Makefile:41: recipe for target 'all-recursive' failed
gmake[1]: *** [all-recursive] Error 2
gmake[1]: Leaving directory
'/usr/obj.luna68k/pkgsrc/textproc/icu/work.m68k/icu/source/tools'
:
---
Most pkgsrc apps fail due to gtk2+ -> pango -> harfbuzz -> icu dependency.
>How-To-Repeat:
Build textproc/icu on NetBSD/m68k 6.1.3.
>Fix:
(1) add more #if !defined(__foo__) as patch-common_putilimp.h does for arm:
---
-#elif U_GCC_MAJOR_MINOR >= 404 || defined(__clang__)
+#elif (U_GCC_MAJOR_MINOR >= 404 && !defined(__arm__)) || defined(__clang__)
---
(2) implement necessary atomic ops using NetBSD's atomic_ops(3) functions:
---
? patches/patch-common_umutex.h
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/icu/distinfo,v
retrieving revision 1.43
diff -u -p -d -r1.43 distinfo
--- distinfo 4 Dec 2013 21:02:23 -0000 1.43
+++ distinfo 30 Jan 2014 17:03:27 -0000
@@ -10,7 +10,8 @@ SHA1 (patch-acinclude.m4) = 40ddfb09cbc9
SHA1 (patch-ad) = 8189e81e9c624e3b7a42f9af65a4b2f334747284
SHA1 (patch-af) = dcfbaf16844292a9ae57536ae2fb62fd1659d067
SHA1 (patch-common_Makefile.in) = 20fa472bd0e5e5fac15153774a58a8ce034d1996
-SHA1 (patch-common_putilimp.h) = a68faa97c2bffeecaca1586e26f5bbe48e71b262
+SHA1 (patch-common_putilimp.h) = c3db0106cec42624559739882e28346741b875af
+SHA1 (patch-common_umutex.h) = a3efdb611e67880433444de7f45061d3a22fe057
SHA1 (patch-common_unicode_platform.h) =
82786dff790782eb07cdc527061de33e771ec63c
SHA1 (patch-common_uposixdefs.h) = abe1989ea4312702e5d0172b662409957b3e2d91
SHA1 (patch-config_icu-config-bottom) =
168b89ee9180d4ae545125866ee91eb004010501
Index: patches/patch-common_putilimp.h
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/icu/patches/patch-common_putilimp.h,v
retrieving revision 1.4
diff -u -p -d -r1.4 patch-common_putilimp.h
--- patches/patch-common_putilimp.h 5 Nov 2013 15:25:37 -0000 1.4
+++ patches/patch-common_putilimp.h 30 Jan 2014 17:03:27 -0000
@@ -13,11 +13,14 @@ $NetBSD: patch-common_putilimp.h,v 1.4 2
#else
# define U_TIMEZONE timezone
#endif
-@@ -187,7 +189,7 @@ typedef size_t uintptr_t;
+@@ -187,7 +189,10 @@ typedef size_t uintptr_t;
/* Use the predefined value. */
#elif U_PLATFORM == U_PF_MINGW
#define U_HAVE_GCC_ATOMICS 0
-#elif U_GCC_MAJOR_MINOR >= 404 || defined(__clang__)
++#elif U_PLATFORM == U_PF_BSD && defined(__NetBSD__)
++ #define U_HAVE_GCC_ATOMICS 0
++ #define U_HAVE_NETBSD_ATOMIC_OPS 1
+#elif (U_GCC_MAJOR_MINOR >= 404 && !defined(__arm__)) || defined(__clang__)
/* TODO: Intel icc and IBM xlc on AIX also support gcc atomics. (Intel
originated them.)
* Add them for these compilers.
--- /dev/null 2014-01-30 17:03:15.000000000 +0000
+++ patches/patch-common_umutex.h 2014-01-30 17:01:24.000000000 +0000
@@ -0,0 +1,39 @@
+$NetBSD$
+
+--- common/umutex.h.orig 2013-10-04 20:49:16.000000000 +0000
++++ common/umutex.h
+@@ -117,6 +117,34 @@ inline int32_t umtx_atomic_dec(u_atomic_
+ U_NAMESPACE_END
+
+
++#elif U_HAVE_NETBSD_ATOMIC_OPS
++/*
++ * NetBSD MI atomic_ops(3).
++ */
++
++U_NAMESPACE_BEGIN
++#include <sys/atomic.h>
++typedef volatile uint32_t u_atomic_int32_t;
++#define ATOMIC_INT32_T_INITIALIZER(val) val
++
++inline int32_t umtx_loadAcquire(u_atomic_int32_t &var) {
++ return atomic_cas_32(&var, 0, 0);
++}
++
++inline void umtx_storeRelease(u_atomic_int32_t &var, int32_t val) {
++ atomic_swap_32(&var, val);
++}
++
++inline int32_t umtx_atomic_inc(u_atomic_int32_t *p) {
++ return atomic_inc_32_nv(p);
++}
++
++inline int32_t umtx_atomic_dec(u_atomic_int32_t *p) {
++ return atomic_dec_32_nv(p);
++}
++U_NAMESPACE_END
++
++
+ #elif U_HAVE_GCC_ATOMICS
+ /*
+ * gcc atomic ops. These are available on several other compilers as well.
---
The latter is confirmed on NetBSD/m68k 6.1.3 and NetBSD/i386 6.1.3.
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index