[pkg-cinnamon] Bug#755093: FTBFS on kfreebsd, s390x and sparc

Aurelien Jarno aurelien at aurel32.net
Fri Jul 18 14:29:24 UTC 2014


clone 755093 -1 -2
reassign -1 mozjs
retitle -1 mozjs: broken interpreter on 64-bit big endian platforms
affects -1 cjs
retitle -2 cjs: please build against a newer mozjs version
severity -2 wishlist
retitle 755093 mozjs: FTBFS on kfreebsd and sparc
thanks

On Thu, Jul 17, 2014 at 07:04:41PM +0200, Emilio Pozuelo Monfort wrote:
> Source: cjs
> Version: 2.2.1-2
> Severity: serious
> 
> Your package failed to build on kfreebsd, s390x and sparc. Although it
> hasn't built on those architectures in the past (and thus this bug
> shouldn't be RC), this is a cinnamon package and src:cinnamon is
> available on s390x and now requires cjs, making it unbuildable and thus
> out of date on that architecture.

The problem on s390x (and on ppc64) is due to a bug in mozjs which
doesn't support 64-bit big endian platforms. The problem is however
fixed since August 2011 and is thus available in more recent versions of
mozjs (eg mozjs24). cjs should consider using this version instead of
the old 1.8.5 version.

In the meantime, please find below a patch to fix the mozjs issue. It
has been backported from newer versions. Please note that the existing
debian/patches/64bit-big-endian.patch patch is enough to fix build on
64-bit big endian platforms, but not enough to get it working.

As this bug report also concerns kfreebsd and sparc architecture, I am
cloning it to mozjs instead of reassigning it.



diff -Nru mozjs-1.8.5-1.0.0+dfsg/debian/patches/64bit-big-endian.patch mozjs-1.8.5-1.0.0+dfsg/debian/patches/64bit-big-endian.patch
--- mozjs-1.8.5-1.0.0+dfsg/debian/patches/64bit-big-endian.patch	2012-10-25 21:51:11.000000000 +0200
+++ mozjs-1.8.5-1.0.0+dfsg/debian/patches/64bit-big-endian.patch	2014-07-18 15:52:45.000000000 +0200
@@ -1,14 +1,62 @@
 https://bugzilla.mozilla.org/show_bug.cgi?id=627664
+https://bugzilla.mozilla.org/show_bug.cgi?id=674522
 
-Index: mozjs-1.8.5-1.0.0+dfsg/js/src/jsval.h
-===================================================================
---- mozjs-1.8.5-1.0.0+dfsg.orig/js/src/jsval.h	2012-01-23 13:22:02.000000000 +0000
-+++ mozjs-1.8.5-1.0.0+dfsg/js/src/jsval.h	2012-01-23 13:22:07.000000000 +0000
-@@ -347,6 +347,7 @@
+--- a/js/src/jsval.h
++++ b/js/src/jsval.h
+@@ -306,11 +306,11 @@
              int32          i32;
              uint32         u32;
              JSWhyMagic     why;
-+            jsuword        word;
+-            jsuword        word;
          } payload;
      } s;
      double asDouble;
+     void *asPtr;
++    jsuword asWord;
+ } jsval_layout;
+ # endif  /* JS_BITS_PER_WORD */
+ #else   /* defined(IS_LITTLE_ENDIAN) */
+@@ -343,6 +343,7 @@
+         uint64             payload47 : 47;
+     } debugView;
+     struct {
++        uint32             padding;
+         union {
+             int32          i32;
+             uint32         u32;
+@@ -351,10 +352,13 @@
+     } s;
+     double asDouble;
+     void *asPtr;
++    jsuword asWord;
+ } jsval_layout;
+ # endif /* JS_BITS_PER_WORD */
+ #endif  /* defined(IS_LITTLE_ENDIAN) */
+ 
++JS_STATIC_ASSERT(sizeof(jsval_layout) == 8);
++
+ #if JS_BITS_PER_WORD == 32
+ 
+ /*
+--- a/js/src/jsvalue.h
++++ b/js/src/jsvalue.h
+@@ -291,7 +291,6 @@
+ }
+ 
+ #ifdef __cplusplus
+-JS_STATIC_ASSERT(offsetof(jsval_layout, s.payload) == 0);
+ JS_STATIC_ASSERT((JSVAL_TYPE_NONFUNOBJ & 0xF) == JSVAL_TYPE_OBJECT);
+ JS_STATIC_ASSERT((JSVAL_TYPE_FUNOBJ & 0xF) == JSVAL_TYPE_OBJECT);
+ #endif
+@@ -729,7 +728,11 @@
+     }
+ 
+     const jsuword *payloadWord() const {
++#if JS_BITS_PER_WORD == 32
+         return &data.s.payload.word;
++#elif JS_BITS_PER_WORD == 64
++        return &data.asWord;
++#endif
+     }
+ 
+   private:




-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien at aurel32.net                 http://www.aurel32.net



More information about the pkg-cinnamon-team mailing list