Package: mosh
Severity: important
Tags: patch

Mosh FTBFS on armel and armhf, there are two issues.

The first is that the program uses inline assembler which is only suitable for arm mode, this causes a failure on debian armhf and ubuntu armel and armhf which use thumb2 mode by default (it does not cause a failure on debian armel as debian armel uses arm mode by default). The easiest fix is simply to tell the compiler to use arm mode.

The second is that in src/terminal/parser.cc a codepoint is checked for being in the valid unicode range using ( (pwc < 0) || (pwc > 0x10FFFF) ). If WCHAR_T is unsigned this results in a "comparison of unsigned expression < 0 is always false" warning (and you use -Werror). The easiest fix is to not treat this warning as an error (the code that creates that warning IS still correct if WCHAR_T is unsigned).
--- mosh-1.1/debian/rules	2012-03-07 09:26:45.000000000 +0000
+++ mosh-1.1.new/debian/rules	2012-04-05 23:38:50.000000000 +0000
@@ -9,6 +9,16 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+DEB_HOST_ARCH_CPU?=$(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
+
+ifeq ($(DEB_HOST_ARCH_CPU),arm)
+  #this package uses thumb2 incompatible inline assembler
+  export CXXFLAGS += -marm
+  #WCHAR_T is unsigned on arm causing a warning about
+  #a comparison being always false
+  export CXXFLAGS += -Wno-error=type-limits
+endif
+
 %:
 	dh $@ --with autoreconf
 

Reply via email to