Bug#826251: fwupd FTBFS on mips

2016-06-03 Thread Jurica Stanojkovic
Package: fwupd
Version: 0.7.0-1
Severity: normal
Tags: sid + patch
Justification: FTBFS
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hello,

Package fwupd_0.7.0-1 FTBFS on mips with following error:
VEX: Unsupported baseline
 Found: Cavium-baseline
Cannot continue. Good-bye

vex storage: T total 0 bytes allocated
vex storage: P total 0 bytes allocated

valgrind: the 'impossible' happened:
   LibVEX called failure_exit().


build log:
https://buildd.debian.org/status/fetch.php?pkg=fwupd=mips=0.7.0-1=1461193596

This issue is caused by valgrind which does not have support for cavium cores 
in version which is installed in Debian archive.

Until cavium is supported is it possible to disable execution of valgrind on 
mips,
or to build this package on some other non cavium mips build-machine, if any is 
available?

This is issue is already noticed for package colorhug-client
and resolved by not using valgrind on mips:
colorhug-client (0.2.8-2) unstable; urgency=medium

  * Do not try to use valgrind for testing on mips, it seems to be broken.
  * Bump standards to 3.9.7.

 -- Michal Čihař   Thu, 07 Apr 2016 13:15:38 +0200


I have attached a patch that disable valgind usage during package build on mips.
With patch package was built successfully from source.

Thank you!

Regards,
Juricadiff -upNr fwupd-0.7.0-orig/debian/control fwupd-0.7.0/debian/control
--- fwupd-0.7.0-orig/debian/control	2016-04-16 00:03:45.0 +
+++ fwupd-0.7.0/debian/control	2016-06-03 14:57:25.0 +
@@ -29,7 +29,7 @@ Build-Depends: debhelper (>= 9.0.0),
libsoup2.4-dev,
gtk-doc-tools,
libcolorhug-dev,
-   valgrind
+   valgrind[!mips]
 Standards-Version: 3.9.7
 Section: admin
 Homepage: https://github.com/hughsie/fwupd
diff -upNr fwupd-0.7.0-orig/debian/rules fwupd-0.7.0/debian/rules
--- fwupd-0.7.0-orig/debian/rules	2016-04-19 00:29:16.0 +
+++ fwupd-0.7.0/debian/rules	2016-06-03 15:04:19.0 +
@@ -32,5 +32,7 @@ override_dh_install:
 	dh_install --fail-missing
 
 override_dh_auto_test:
-	HOME=`pwd` dh_auto_test
-	HOME=`pwd` gpg-connect-agent "KILLAGENT" /bye
+	if [ -x /usr/bin/valgrind ] ; then \
+		HOME=`pwd` dh_auto_test ; \
+		HOME=`pwd` gpg-connect-agent "KILLAGENT" /bye ; \
+	fi


Bug#826009: package libmath-gsl-perl FTBFS on mips and mipsel (recompile with -fPIC)

2016-06-01 Thread Jurica Stanojkovic
Package: libmath-gsl-perl
Version: 0.36-1 
Severity: important
Tags: sid + patch
Justification: FTBFS
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hello,
Package libmath-gsl-perl FTBFS on mips and mipsel
with following error:
/usr/bin/ld: xs/BLAS_wrap.1.16.o: relocation R_MIPS_HI16 against 
`__gnu_local_gp' can not be used when making a shared object; recompile with 
-fPIC

build logs:
https://buildd.debian.org/status/fetch.php?pkg=libmath-gsl-perl=mips=0.36-1=1461372647
https://buildd.debian.org/status/fetch.php?pkg=libmath-gsl-perl=mipsel=0.36-1=1459383304

I have created and attached a patch resolving this issue.

Patch is tested on mips, mipsel, mips64el and i386. 
With this patch package was build successfully.

Please include this patch.

Thank you!

Regards,
Jurica--- libmath-gsl-perl-0.36.orig/Build.PL
+++ libmath-gsl-perl-0.36/Build.PL
@@ -72,6 +72,9 @@ if ( GSLBuilder::is_cygwin()  && $Config
 if ($Config{archname} =~ /x86_64|amd64/ ) {
 $ldflags .= ' -fPIC  -fno-omit-frame-pointer ';
 $ccflags .= ' -fPIC  -fno-omit-frame-pointer ';
+} elsif ($Config{archname} =~ /mips/ ) {
+$ldflags .= ' -fPIC ';
+$ccflags .= ' -fPIC ';
 }
 
 my @Subsystems = grep { ! /^Test$/ } GSLBuilder::subsystems();


Bug#793511: pinba-engine-mysql: FTBFS (32-bit): cannot convert 'uint64_t*' to 'Word_t*

2016-05-24 Thread Jurica Stanojkovic
Hello,


I am sending a patch for this package.
This was already suggested by vincentbernat upstream.

With this patch package was successfully built on mips, mipsel, i386.

I have changed a type of str_hash in  file src/ha_pinba.cc 

--- pinba-engine-mysql-1.1.0.orig/src/ha_pinba.cc
+++ pinba-engine-mysql-1.1.0/src/ha_pinba.cc
@@ -2680,7 +2680,7 @@ int ha_pinba::read_next_row(unsigned cha
PPvoid_t ppvalue;
char name[PINBA_MAX_LINE_LEN] = {0};
pinba_tag *tag;
-   uint64_t str_hash;
+   Word_t str_hash;

str_hash = this_index[active_index].ival;

loking at a  pinba-engine-mysql-1.1.0/src/ha_pinba.h one can notice that ival 
is of type size_t:

typedef struct pinba_index_st { /* {{{ */
union {
size_t ival;
struct {
unsigned char *val;
uint len;
} str;
};
struct {
unsigned char *val;
uint len;
} subindex;
size_t position;
} pinba_index_st;
/* }}} */

However if we replace "uint64_t str_hash;" with "size_t str_hash;" on 32bit 
archs we have following problem:
ha_pinba.cc:2687:59: error: invalid conversion from 'size_t* {aka unsigned 
int*}' to 'Word_t* {aka long unsigned int*}' [-fpermissive]

Taking a look at a Word_t one can find that:
A Word_t is a typedef unsigned long int in Judy.h and must be the same size as 
sizeof(void *) I.E. a pointer.

Same size as size_t but on 32bit one is "unsigned int" (size_t) and the other 
"long unsigned int" (Word_t)
While on 64bit they are both "long unsigned int".

Taking this into consideration i have proposed a patch that i think it is safer 
than one proposed upstream, which will probably fail during run-time on 
big-endian:
https://github.com/tony2001/pinba_engine/issues/40

Please include this patch.


Regards,
Jurica Stanojkovic





--- pinba-engine-mysql-1.1.0.orig/src/ha_pinba.cc
+++ pinba-engine-mysql-1.1.0/src/ha_pinba.cc
@@ -2680,7 +2680,7 @@ int ha_pinba::read_next_row(unsigned cha
 PPvoid_t ppvalue;
 char name[PINBA_MAX_LINE_LEN] = {0};
 pinba_tag *tag;
-uint64_t str_hash;
+Word_t str_hash;
 
 str_hash = this_index[active_index].ival;
 


Bug#815436: afnix: FTBFS nearly everywhere

2016-05-18 Thread Jurica Stanojkovic
Hello,

I have attached a patch that resolves this issue.
With this patch package does build from source without an issue on mips, mipsel 
and i386.

Please include this patch.

Regargs,
Jurica--- afnix-2.6.2.orig/src/srv/tls/shl/TlsCerts.cpp
+++ afnix-2.6.2/src/srv/tls/shl/TlsCerts.cpp
@@ -39,7 +39,7 @@ namespace afnix {
 result.add ((t_byte) ((blen & 0xFF00) >> 8));
 result.add ((t_byte)  (blen & 0x00FF));
 // add the buffer
-for (long k = 0L; k < blen; k++) result.add (buf.get (k));
+for (unsigned long k = 0UL; k < blen; k++) result.add (buf.get (k));
 return result;
   }
   


Bug#788324: Unsupported on arches besides i386 and amd64

2016-05-14 Thread Jurica Stanojkovic
Hi,

Removing assembly was discussed in previous posts here.

Please do note that new upstream patch is using assembly just for amd64 but not 
for i386 arch.
That assembly code does work on i386 to, we just need to enable i386 to use 
this part of code.

If we are using assembly on amd64, could we change upstream patch to use it on 
i386 to?

Thanks!

Regards,
Jurica


Bug#818485: elfutils: FTBFS on mips and mipsel

2016-04-05 Thread Jurica Stanojkovic
Tags: sid + patch
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hello,

I am sending a patch that workaround this issue.
Patch does not change package build on other architectures that execute 
run-strip-strmerge.sh successfully.
It is tested on amd64 and on this arch package does build successfully without 
skip of test run-strip-strmerge.sh.

Test skip is enabled on first failure in test run-strip-strmerge.sh.
Command that fail is:
testrun ${abs_top_builddir}/src/elflint --gnu $input

Could you please include this patch?

Thank you!

Regards,
Jurica--- elfutils-0.165.orig/tests/run-strip-strmerge.sh
+++ elfutils-0.165/tests/run-strip-strmerge.sh
@@ -30,7 +30,7 @@ remerged=remerged.elf
 tempfiles $merged $stripped $debugfile $remerged
 
 echo elflint $input
-testrun ${abs_top_builddir}/src/elflint --gnu $input
+testrun_on_self_skip ${abs_top_builddir}/src/elflint --gnu $input
 echo elfstrmerge
 testrun ${abs_top_builddir}/tests/elfstrmerge -o $merged $input
 echo elflint $merged


Bug#818485: elfutils: FTBFS on mips and mipsel

2016-03-31 Thread Jurica Stanojkovic
User: debian-m...@lists.debian.org

Hello package fails form version 0.164-1 on mips, mipsel.

I version 0.164-1 new test run-strip-strmerge.sh is introduced to package build.
This test is failing on mips and mipsel.

+2015-10-02  Mark Wielaard  
+
+   * elfstrmerge.c: New check program.
+   * run-strip-strmerge.sh: New test.
+   * Makefile.am (check_PROGRAMS): Add elfstrmerge.
+   (EXTRA_DIST): Add run-strip-strmerge.sh
+   (elfstrmerge_LDADD): New variable.

This test is using elflint.

Locking at a build I see that elflint self test is skiped on MIPS.
"SKIP run-elflint-self.sh (exit status: 77)"

Taking a further look at the file backends/mips_reloc.def  
shows that relocs for mips are set to 0, while for other archs have them 
defined:

/*  NAME,   REL|EXEC|DYN*/

RELOC_TYPE (NONE,   0)
RELOC_TYPE (16, 0)
RELOC_TYPE (32, 0)
RELOC_TYPE (REL32,  0)
RELOC_TYPE (26, 0)
RELOC_TYPE (HI16,   0)
RELOC_TYPE (LO16,   0)
RELOC_TYPE (GPREL16,0)
RELOC_TYPE (LITERAL,0)
RELOC_TYPE (GOT16,  0)
RELOC_TYPE (PC16,   0)
RELOC_TYPE (CALL16, 0)
RELOC_TYPE (GPREL32,0)
...

Is it possible to SKIP this test also for MIPS, until elflint is done for MIPS?

Thank you! 

Regards,
Jurica


Bug#819268: pseudo FTBFS on mips* and arm* due to use of m32/m64 switches

2016-03-25 Thread Jurica Stanojkovic
Package: pseudo
Version: 1.7.4-2
Severity: normal
Tags: sid 
Justification: FTBFS
User: debian-m...@lists.debian.org

Hello,

Package pseudo FTBFS on arm* and mips*  due to use of m32/m64 switches.
with following errors:

cc: error: unrecognized command line option '-m64'

or

cc: error: unrecognized command line option '-m32'

Removing those switches makes package build possible on MIPS.

Thank you!

Regards,
Jurica

Bug#818505: sortmerna FTBFS on !x86

2016-03-18 Thread Jurica Stanojkovic
Package: sortmerna
Version: 2.1-1  
Severity: important
Tags: sid
Justification: FTBFS
User: debian-m...@lists.debian.org


Hello,
Package sortmerna FTBFS on archs not in x86 group (amd64, i386, x32, etc. )
with following error:
gcc: error: unrecognized command line option '-msse2'

build logs:
https://buildd.debian.org/status/logs.php?pkg=sortmerna=2.1-1=sid

Package use -msse2 for all architectures, 
but not all archs have support for sse2 instruction set.

if -msee2 flag is removed from build next error reported is:
src/ssw.c:45:23: fatal error: emmintrin.h: No such file or directory


Thank you!

Regards,
Jurica


Bug#818298: package gpstrans FTBFS on variuos architectures

2016-03-15 Thread Jurica Stanojkovic
Package: gpstrans
Version: 0.41-5 
Severity: serious
Tags: sid + patch
Justification: FTBFS
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hello,
Package gpstrans FTBFS on apha, mips, mips64el, mipsel, powerpc, ppc64, and 
ppc64el
with following error:
getline.c:191:13: error: 'TIOCGETC' undeclared (first use in this function)
   ioctl (0, TIOCGETC, );

Previous version 0.41-4 was successfully built on all previously listed 
architectures.

build logs:
https://buildd.debian.org/status/logs.php?pkg=gpstrans=0.41-5=sid
https://buildd.debian.org/status/logs.php?pkg=gpstrans=0.41-4=sid

Patch 04-fix-makefile.diff has not included POSIX macro for libgetline.a 
library.

I have created and attached a patch resolving this issue.

Patch was tested on MIPS. 
With this patch package was build successfully.

Please include this patch.

Thank you!

Regards,
JuricaDescription: re-enable POSIX macro for libgetline build
 Changes to Makefile's in patch 04-fix-makefile.diff did not include POSIX macro.
 Before gpstrans version 0.41-5 macro was defined in src/getline/Makefile.

Author: Jurica Stanojkovic <jurica.stanojko...@imgtec.com>

--- gpstrans-0.41.orig/src/Makefile
+++ gpstrans-0.41/src/Makefile
@@ -37,7 +37,7 @@ XFILES	= gps/sendgpsinfo.o gps/dms.o gps
 
 all:	$(OFILES) $(HFILES)
 	@echo "Making all in ./getline"
-	@(cd getline ; make CFLAGS="$(CFLAGS)" libgetline.a)
+	@(cd getline ; make CFLAGS="$(CFLAGS) -DPOSIX" libgetline.a)
 	@echo "Making all in ./gps"
 	@(cd gps  ; make all CC="$(CC)" CFLAGS="$(CFLAGS)")
 	@echo "Making all in ./grid"


Bug#794276: opencollada: FTBFS on mipsel

2016-03-08 Thread Jurica Stanojkovic
Control: retitle -1  opencollada: FTBFS on mips, mipsel and mips64el

Tags: sid + patch
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hello,

This issue is resolved upstream:
https://github.com/KhronosGroup/OpenCOLLADA/issues/338
https://github.com/KhronosGroup/OpenCOLLADA/pull/411

I have attached a patch.
With this patch package does build successfully on mips, mipsel and mips64el.

Please include this patch.
Thank you!

Regards,
Juricadiff -upNr OpenCOLLADA-orig/CMakeLists.txt OpenCOLLADA/CMakeLists.txt
--- OpenCOLLADA-orig/CMakeLists.txt	2016-03-01 18:34:27.589176369 +
+++ OpenCOLLADA/CMakeLists.txt	2016-03-01 18:43:21.441683364 +
@@ -1,3 +1,5 @@
+EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE )
+message( STATUS "Architecture: ${ARCHITECTURE}" )
 
 if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
 	if(NOT DEFINED WITH_IN_SOURCE_BUILD)
@@ -63,6 +65,11 @@ macro(opencollada_add_lib
 			else()
 target_link_libraries(${name}_static ${target_lib})
 			endif()
+			if( ${ARCHITECTURE} MATCHES "mips" )
+if(TARGET OpenCOLLADASaxFrameworkLoader_static)
+	SET_TARGET_PROPERTIES(OpenCOLLADASaxFrameworkLoader_static PROPERTIES COMPILE_FLAGS "-Umips")
+endif()
+			endif()
 		endforeach()
 		set(CMAKE_REQUIRED_LIBRARIES "${name}_static;${CMAKE_REQUIRED_LIBRARIES}" PARENT_SCOPE)
 
@@ -84,6 +91,11 @@ macro(opencollada_add_lib
 			else()
 target_link_libraries(${name}_shared ${target_lib})
 			endif()
+			if( ${ARCHITECTURE} MATCHES "mips" )
+if(TARGET OpenCOLLADASaxFrameworkLoader_shared)
+	SET_TARGET_PROPERTIES(OpenCOLLADASaxFrameworkLoader_shared PROPERTIES COMPILE_FLAGS "-Umips")
+endif()
+			endif()
 		endforeach()
 		set(CMAKE_REQUIRED_LIBRARIES "${name}_shared;${CMAKE_REQUIRED_LIBRARIES}"  PARENT_SCOPE)
 


Bug#816526: dnsdist FTBFS on mips and mipsel

2016-03-02 Thread Jurica Stanojkovic
Package: dnsdist
Version: 1.0.0~alpha2-2 
Severity: important
Tags: sid + patch
Justification: FTBFS
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hello,
Package dnsdist_1.0.0~alpha2-2 FTBFS on mips and mipsel.

In order to work with 64-bit atomic operations on mips and mipsel libatomic 
library need to be used.

build logs:
https://buildd.debian.org/status/fetch.php?pkg=dnsdist=mips=1.0.0~alpha2-2=1456374230
https://buildd.debian.org/status/fetch.php?pkg=dnsdist=mipsel=1.0.0~alpha2-2=1456379857

I have attached a patch resolving this issue.
Please consider including this patch.

Thank you!

Regards,
Juricadiff -upNr dnsdist-1.0.0~alpha2-orig/debian/rules dnsdist-1.0.0~alpha2/debian/rules
--- dnsdist-1.0.0~alpha2-orig/debian/rules	2016-02-24 22:57:58.0 +
+++ dnsdist-1.0.0~alpha2/debian/rules	2016-03-02 12:16:48.728183792 +
@@ -7,6 +7,13 @@
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/default.mk
 
+DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+
+ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),mips mipsel))
+LDFLAGS += -latomic
+export LDFLAGS
+endif
+
 %:
 	dh $@ \
 	  --with autoreconf \


Bug#799774:

2016-02-03 Thread Jurica Stanojkovic
Hello,

This issue is resolved upstream.
https://github.com/node-xmpp/node-expat/commit/c129cb37c6f04f09190a3912f44f3976b813b973

With changes from this commit package does build successfully on amd64 and i386.
Tests pass.
Test results:
gyp info ok 
NODE_DISABLE_COLORS=1 nodejs test.js
···-··· ✓ OK » 30 honored ∙ 1 pending (1.010s) 
  touch debian/stamp-node-gyp-build


On mipsel package does build, but later tests fail:
Test results:

gyp info ok 
NODE_DISABLE_COLORS=1 nodejs test.js
···-···(node) util.print is deprecated. Use console.log 
instead.

✗ Errored » callback not fired 
  in stop and resume 
  in node-expat 
  in undefined✗ Errored » callback not fired 
  in Stream interface read file 
  in node-expat 
  in undefined(node) util.puts is deprecated. Use console.log instead.
✗ Errored » 26 honored ∙ 1 errored ∙ 1 pending ∙ 4 dropped

debian/rules:52: recipe for target 'debian/stamp-node-gyp-build' failed

I will look at this issue further.

Please consider including this change.

If needed, I could create a patch with changes from upstream.

Regards,
Jurica



Bug#798601: limereg: FTBFS on mips/mipsel

2016-01-17 Thread Jurica Stanojkovic
User: debian-m...@lists.debian.org

Hello,

I have found that changing -fstack-protector-strong to -fstack-protector (for 
test or for entire source) does make this issue disappear on mipsel. 
This change has worked on lemote-3a, cavium and netlogic-xlp mipsel boards, but 
failed on mips (big-endian cavium board).

gcc configuration on mips/mipsel:

Target: mips-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 5.3.1-6' 
--with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs 
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-5 --enable-shared --enable-linker-build-id 
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm 
--disable-libsanitizer --disable-libquadmath --enable-plugin --with-system-zlib 
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo 
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-mips/jre --enable-java-home 
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-mips 
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-mips 
--with-arch-directory=mips --with-ecj-jar=/usr/share/java/eclipse-ecj.jar 
--enable-multiarch --enable-multilib --with-arch-32=mips32r2 --with-fp-32=xx 
--enable-targets=all --with-arch-64=mips64r2 --enable-checking=release 
--build=mips-linux-gnu --host=mips-linux-gnu --target=mips-linux-gnu
Thread model: posix
gcc version 5.3.1 20160114 (Debian 5.3.1-6)

Target: mipsel-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 5.3.1-6' 
--with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs 
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-5 --enable-shared --enable-linker-build-id 
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm 
--disable-libsanitizer --disable-libquadmath --enable-plugin --with-system-zlib 
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo 
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-mipsel/jre --enable-java-home 
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-mipsel 
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-mipsel 
--with-arch-directory=mips --with-ecj-jar=/usr/share/java/eclipse-ecj.jar 
--enable-multiarch --enable-multilib --with-arch-32=mips2 
--with-tune-32=mips32r2 --with-fp-32=xx --enable-targets=all 
--with-arch-64=mips3 --with-tune-64=mips64r2 --enable-checking=release 
--build=mipsel-linux-gnu --host=mipsel-linux-gnu --target=mipsel-linux-gnu
Thread model: posix
gcc version 5.3.1 20160114 (Debian 5.3.1-6) 

Thank you!

Regards,
Jurica


Bug#789826: ignition-math2: FTBFS: test suite fails on some platforms

2015-12-10 Thread Jurica Stanojkovic
Tags: sid + patch
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hello, 

Package failure is caused by execution of check_UNIT_SignalStats_TEST  before 
UNIT_SignalStats_TEST has finished its job.
If test are run one by one test run is successful.

I have created a patch that prevent execution of tests in parallel.
With this patch included package does build from source successfully.

I have tested patch on mips, but i think that this patch should also resolve 
issue on armel.

Please include this patch.

Thank you!

Regards,
Jurica
diff -upNr ignition-math2-2.2.3+dfsg1-orig/debian/rules ignition-math2-2.2.3+dfsg1/debian/rules
--- ignition-math2-2.2.3+dfsg1-orig/debian/rules	2015-09-18 01:14:38.0 +0200
+++ ignition-math2-2.2.3+dfsg1/debian/rules	2015-12-10 21:11:41.639632078 +0100
@@ -17,5 +17,8 @@ override_dh_auto_configure:
 override_dh_strip:
 	dh_strip -a --dbg-package=libignition-math2-dbg
 
+override_dh_auto_test:
+	dh_auto_test $@ --no-parallel --buildsystem=cmake
+
 %:
 	dh $@ --parallel --buildsystem=cmake


Bug#806243: libminc: FTBFS on mipsel

2015-12-07 Thread Jurica Stanojkovic
> Jurica: is everything else the same between your good/bad environments, 
> specifically: libc, compiler, and libnetcdf?  I mean: I assume they are both 
> running 'sid', but are the specific versions of each package the same?

Yes, i am using sbuild (sid) and environment should be the same.
libc, compiler and libnetcdf are the same (same versions). 
I have checked all build logs.

Kernels are not the same:
3.6.11+ on loongson
3.7.10 on netlogic-xlp
4.1.0 on cavium
but i do not suggest that kernel is issue here.



Bug#806243: libminc: FTBFS on mipsel

2015-12-04 Thread Jurica Stanojkovic
 User: debian-m...@lists.debian.org

Hello,

I have tried to build package libminc_2.3.00-2 for mipsel and mips64el on 
diferent build boards: netlogic-xlp, cavium and loongson-3a.
This package FTBFS only on loongson-3a (lemote). 
On other build machines package was built from source successfully.

Regards,
Jurica


Bug#799992: kmix: FTBFS: The dependency target "kmixctrl_automoc" of target "kmixctrl" does not exist

2015-12-04 Thread Jurica Stanojkovic
tags 72 + patch
User 72 + debian-m...@lists.debian.org
Usertags 72 + mips-patch

Hello,

Package kmix_4:15.08.1-1 FTBFS on mips, mipsel, mips64el and other 
architectures with following message:

CMake Error at /usr/lib/automoc4/Automoc4Config.cmake:248 (add_dependencies):
  The dependency target "kmix_automoc" of target "kmix" does not exist.

https://buildd.debian.org/status/fetch.php?pkg=kmix=mips=4%3A15.08.1-1=1446803463
https://buildd.debian.org/status/fetch.php?pkg=kmix=mipsel=4%3A15.08.1-1=1446801110
https://buildd.debian.org/status/fetch.php?pkg=kmix=mips64el=4%3A15.08.1-1=1446667766

Package also fails on other arch’s including amd64 on my local build (sbuild).

If this issue is resolved package later fails on MIPS with following message:

[ 96%] Linking CXX executable kmix
/usr/bin/cmake -E cmake_link_script CMakeFiles/kmix.dir/link.txt --verbose=1
/usr/bin/c++   -g -O2 -fstack-protector-strong -Wformat -Werror=format-security 
-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=2  -std=c++11 -Wnon-virtual-dtor 
-Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith 
-Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common 
-Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden 
-Werror=return-type -fvisibility-inlines-hidden -DNDEBUG -DQT_NO_DEBUG  
-Wl,--enable-new-dtags  -Wl,-z,relro -Wl,--as-needed -Wl,--no-undefined 
-Wl,--enable-new-dtags CMakeFiles/kmix.dir/kmix_dummy.cpp.o 
CMakeFiles/kmix.dir/kmix_automoc.cpp.o  -o kmix -rdynamic 
lib/libkdeinit4_kmix.so /usr/lib/libplasma.so.3.0.0 
/usr/lib/libsolid.so.4.14.13 /usr/lib/libkdeui.so.5.14.13 
/usr/lib/mips64el-linux-gnuabi64/libQtGui.so 
/usr/lib/mips64el-linux-gnuabi64/libQtSvg.so /usr/lib/libkdecore.so.5.14.13 
/usr/lib/mips64el-linux-gnuabi64/libQtDBus.so 
/usr/lib/mips64el-linux-gnuabi64/libQtCore.so 
/usr/lib/mips64el-linux-gnuabi64/libQtXml.so -lphonon -lasound -lpulse 
-lpulse-mainloop-glib -lglib-2.0 -lcanberra 
-Wl,-rpath,/build/kmix-gWkEYb/kmix-15.08.1/obj-mips64el-linux-gnuabi64/lib: 
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.25.1 assertion fail 
../../bfd/elf-strtab.c:199
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.25.1 assertion fail 
../../bfd/elf-strtab.c:272
collect2: error: ld returned 1 exit status

To workaround this issue flag "--as-needed" is disabled.
After that change package was built successfully on MIPS.

Similar issue is discussed on debian-mips mailing list:
https://lists.debian.org/debian-mips/2015/09/msg9.html

Patches resolving this issues are attached.

For first issue:
cmake_automoc_enable.diff

For second issue:
mips-no-as-needed-workaround.diff
debian-rules-mips.diff

Thank you!

Regards,
Jurica--- kmix-15.08.1.orig/CMakeLists.txt
+++ kmix-15.08.1/CMakeLists.txt
@@ -10,6 +10,8 @@ project(kmix)
 #
 # Next step: Talk to Alex Fiestas how to progress
 
+set(CMAKE_AUTOMOC ON)
+
 if(POLICY CMP0046)
   cmake_policy (SET CMP0046 NEW)
 endif()
--- kmix-15.08.1.orig/CMakeLists.txt
+++ kmix-15.08.1/CMakeLists.txt
@@ -29,7 +29,11 @@ if(POLICY CMP0046)
   cmake_policy (SET CMP0046 NEW)
 endif()
 
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") 
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+
+if (WITH_MIPS_BUILD)
+   SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-as-needed")
+endif(WITH_MIPS_BUILD)
 
 if (KMIX_KF5_BUILD)
 	find_package(ECM 5.10.0 REQUIRED NO_MODULE)
diff -upNr kmix-15.08.1-orig/debian/rules kmix-15.08.1/debian/rules
--- kmix-15.08.1-orig/debian/rules	2015-09-19 17:10:51.0 +
+++ kmix-15.08.1/debian/rules	2015-12-04 21:27:26.0 +
@@ -2,5 +2,9 @@
 
 include /usr/share/pkg-kde-tools/qt-kde-team/3/debian-qt-kde.mk
 
+MIPS_BUILD = OFF
+ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel mips64 mips64el))
+  MIPS_BUILD = ON
+endif
 override_dh_auto_configure:
-	$(overridden_command) -- -DKMIX_KF5_BUILD=0
+	$(overridden_command) -- -DKMIX_KF5_BUILD=0 -DWITH_MIPS_BUILD:BOOL=$(MIPS_BUILD)


Bug#804768: eigen3: cause opencv ftbfs when LDBL_MANT_DIG greater than 112

2015-11-27 Thread Jurica Stanojkovic
Hello,

I have attached patch for package eigen3_3.3~alpha1-2 which is resolving 
reported issue.

Resulting deb package, that we get by building package eigen3 with this patch, 
is later used to build package opencv on mips64el and with it package opencv 
was built successfully on mips64el.

Please include this patch.

Thank you!

Regards,
Jurica

--- eigen3-3.3~alpha1.orig/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
+++ eigen3-3.3~alpha1/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
@@ -348,7 +348,7 @@ void matrix_exp_compute(const MatrixType
   typedef typename NumTraits::Real RealScalar;
   typedef typename std::complex ComplexScalar;
   if (sizeof(RealScalar) > 14) {
-result = arg.matrixFunction(StdStemFunctions::exp);
+result = arg.matrixFunction(internal::stem_function_exp);
 return;
   }
 #endif


Bug#804164: package squeak-vm FTBFS on various archs including mips64el

2015-11-05 Thread Jurica Stanojkovic
Package: squeak-vm
Version: 1:4.10.2.2614-3
Severity: important
Tags: sid
User: debian-m...@lists.debian.org
Usertags: mips-patch


Hello,

package  squeak-vm 1:4.10.2.2614-3 FTBFS on mips64el (arm64,ppc64el...) with 
following message:

CMake Error at CMakeLists.txt:64 (STRING): string sub-command REGEX, mode 
REPLACE needs at least 6 arguments total to command. that is caused by
unix/cmake/config.guess: unable to guess system type

mips64el:
https://buildd.debian.org/status/fetch.php?pkg=squeak-vm=mips64el=1%3A4.10.2.2614-3=1446063717

arm64:
https://buildd.debian.org/status/fetch.php?pkg=squeak-vm=arm64=1%3A4.10.2.2614-3=1446053238

ppc64el:
https://buildd.debian.org/status/fetch.php?pkg=squeak-vm=mips64el=1%3A4.10.2.2614-3=1446063717


Problem is with config.sub and config.guess that are bundled with package, 
files are to old (year 2002).
However those files are upgraded during build process, but VM_HOST is being 
resolved before update is done.

This problem is introduced with previous version of source: 1:4.10.2.2614-2.

Patch that I have attached does resolve this issue by delaying VM_HOST 
detection until it is needed for package build, which is after config.guess and 
config.sub files are already updated.

With this patch package was successfully built on mips64el

Please include this patch.

Thank you!

Regards,
Jurica
diff -upNr squeak-vm-4.10.2.2614-old/debian/rules squeak-vm-4.10.2.2614/debian/rules
--- squeak-vm-4.10.2.2614-old/debian/rules	2015-07-21 17:16:44.0 +
+++ squeak-vm-4.10.2.2614/debian/rules	2015-10-24 14:34:23.0 +
@@ -51,8 +51,8 @@ endif
 
 vmmversion = $(basename $(DEB_UPSTREAM_TARBALL_VERSION))
 svnversion = $(subst .,,$(suffix $(DEB_UPSTREAM_TARBALL_VERSION)))
-guess := $(shell $(DEB_SRCDIR)/cmake/config.guess)
-sub := $(shell $(DEB_SRCDIR)/cmake/config.sub $(guess))
+guess = $(shell $(DEB_SRCDIR)/cmake/config.guess)
+sub = $(shell $(DEB_SRCDIR)/cmake/config.sub $(guess))
 DEB_CMAKE_EXTRA_FLAGS += -DVM_HOST=$(sub)
 DEB_CMAKE_EXTRA_FLAGS += -DVM_VERSION=$(vmmversion)-$(svnversion)
 DEB_CMAKE_EXTRA_FLAGS += -DPLATFORM_SOURCE_VERSION=$(svnversion)


Bug#801966: package FTBFS on mips and mipsel

2015-10-16 Thread Jurica Stanojkovic
Package: fnordmetric
Version: 0.1.0.20150502+gite736fba3-2
Severity: important
Tags: sid
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hello,

Package fnordmetric_0.1.0.20150502+gite736fba3-2 FTBFS on mips and mipsel with 
following message:

/usr/include/c++/4.9/bits/atomic_base.h:500: undefined reference to 
`__atomic_load_8'
/usr/include/c++/4.9/bits/atomic_base.h:478: undefined reference to 
`__atomic_store_8'

mips:
https://buildd.debian.org/status/fetch.php?pkg=fnordmetric=mips=0.1.0.20150502%2Bgite736fba3-2=1438374654

mipsel:
https://buildd.debian.org/status/fetch.php?pkg=fnordmetric=mipsel=0.1.0.20150502%2Bgite736fba3-2=1438372541

I have attached a patch that resolves this issue.
With proposed patch package builds successfully from source without an issue.
Please include this patch.

I think that this solution can be used for powerpc also, if powepc arch is 
included in patch, but I do not have powerpc machine to test this.

Thank you!

Regards,
Jurica
diff -upNr fnordmetric-0.1.0.20150502+gite736fba3-orig/debian/rules fnordmetric-0.1.0.20150502+gite736fba3/debian/rules
--- fnordmetric-0.1.0.20150502+gite736fba3-orig/debian/rules	2015-07-30 16:31:41.0 +
+++ fnordmetric-0.1.0.20150502+gite736fba3/debian/rules	2015-10-15 13:28:17.0 +
@@ -7,6 +7,13 @@ include /usr/share/dpkg/default.mk
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
+DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+
+ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),mips mipsel))
+LDFLAGS += -latomic
+export LDFLAGS
+endif
+
 %:
 	dh $@ --parallel
 


Bug#801881: Package wrk FTBFS on mips and mipsel

2015-10-15 Thread Jurica Stanojkovic
Package: wrk
Version: 4.0.1-2
Severity: normal
Tags: sid
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hello,

Package wrk_4.0.1-2 FTBFS on mips and mipsel with following message:
/«PKGBUILDDIR»/src/stats.c:24: undefined reference to `__sync_fetch_and_add_8'
/«PKGBUILDDIR»/src/stats.c:28: undefined reference to 
`__sync_val_compare_and_swap_8'

mips:
https://buildd.debian.org/status/fetch.php?pkg=wrk=mips=4.0.1-2=1438099809

mipsel:
https://buildd.debian.org/status/fetch.php?pkg=wrk=mipsel=4.0.1-2=1438028452

I have attached a patch that resolves this issue on mips and mipsel.
Could you please include this patch?

I suspect that this solution can be used for powerpc also, if powepc arch is 
included in patch, but I do not have powerpc machine to test this.

Thank you!

Regards,
Jurica
diff -upNr wrk-4.0.1-orig/debian/rules wrk-4.0.1/debian/rules
--- wrk-4.0.1-orig/debian/rules	2015-04-17 00:48:57.0 +
+++ wrk-4.0.1/debian/rules	2015-10-14 13:48:53.0 +
@@ -1,5 +1,12 @@
 #!/usr/bin/make -f
 
+DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+
+ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),mips mipsel))
+	LIBS += -latomic
+	export LIBS
+endif
+
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 %:
diff -upNr wrk-4.0.1-orig/src/stats.c wrk-4.0.1/src/stats.c
--- wrk-4.0.1-orig/src/stats.c	2015-03-24 10:03:52.0 +
+++ wrk-4.0.1/src/stats.c	2015-10-14 13:54:30.0 +
@@ -21,12 +21,12 @@ void stats_free(stats *stats) {
 
 int stats_record(stats *stats, uint64_t n) {
 if (n >= stats->limit) return 0;
-__sync_fetch_and_add(>data[n], 1);
-__sync_fetch_and_add(>count, 1);
+__atomic_fetch_add(>data[n], 1, __ATOMIC_SEQ_CST);
+__atomic_fetch_add(>count, 1, __ATOMIC_SEQ_CST);
 uint64_t min = stats->min;
 uint64_t max = stats->max;
-while (n < min) min = __sync_val_compare_and_swap(>min, min, n);
-while (n > max) max = __sync_val_compare_and_swap(>max, max, n);
+while (n < min) min = __atomic_compare_exchange(>min, , , false,__ATOMIC_SEQ_CST,__ATOMIC_SEQ_CST);
+while (n > max) max = __atomic_compare_exchange(>max, , , false,__ATOMIC_SEQ_CST,__ATOMIC_SEQ_CST);
 return 1;
 }
 


Bug#798710: jit-playback changes brake package pygccjit build

2015-09-12 Thread Jurica Stanojkovic
Please do note that this error is caused by changes that occurred in 
gcc-5_5.2.1-13.

Building pygccjit with gcc-5_5.2.1-12 or gcc-5_5.1.1-14 or gcc-5_5.1.1-13 
version of gcc-5 
binary packages do not cause this issue.
I just have to install some of previously listed version of gcc-5-base and 
libgccjit0 binary packages to not have this issue.

pygccjit is newer built on mips/mipsel because -fPIC flag is missing on 
following line:
gcc-5 -shared /tmp/libgccjit-z1jPnd/fake.s -o /tmp/libgccjit-z1jPnd/fake.so 
-fno-use-linker-plugin

Which is configured in libgccjit and I wasnt able to change this on pygccjit 
level.
This is done in gcc-5 source in jit-playback.c file.

I will have to file this bug during next week to gcc-5 again, because this 
again is likely a libgccjit error for mips/mipsel.
Issue that I was able to solve on gcc-5_5.1.1-14 version, and I wanted to send 
a patch when new issue is introduced to pygccjit by a gcc-5 moving to a 
5.2-1-15 version.
So I had to try to figure out first this new regression.

I you try to build pygccjit_0.4-4 now (give-back) you will notice this new 
issue.

Thank you!

Regards,
Jurica



Bug#798710: jit-playback changes brake package pygccjit build

2015-09-11 Thread Jurica Stanojkovic
Package: gcc-5
Version: 5.2.1-15
Severity: serious
Tags: sid
User: debian-m...@lists.debian.org

Hello,

Package gcc-5_5.2.1-15 is causing following issue during package pygccjit_0.4-4 
build:

test_bf_jit (test.JitTests) ... /tmp/libgccjit-HxB6hJ/fake.s: Assembler 
messages:
/tmp/libgccjit-HxB6hJ/fake.s:14: Error: `fp=xx' used with a cpu lacking 
ldc1/sdc1 instructions
/tmp/libgccjit-HxB6hJ/fake.s:14: Error: `fp=xx' used with a cpu lacking 
ldc1/sdc1 instructions
/tmp/libgccjit-HxB6hJ/fake.s:15: Error: `fp=xx' used with a cpu lacking 
ldc1/sdc1 instructions
/tmp/libgccjit-HxB6hJ/fake.s:22: Error: `fp=xx' used with a cpu lacking 
ldc1/sdc1 instructions
/tmp/libgccjit-HxB6hJ/fake.s:24: Error: `fp=xx' used with a cpu lacking 
ldc1/sdc1 instructions
/tmp/libgccjit-HxB6hJ/fake.s:201: Error: `fp=xx' used with a cpu lacking 
ldc1/sdc1 instructions
/tmp/libgccjit-HxB6hJ/fake.s:202: Error: `fp=xx' used with a cpu lacking 
ldc1/sdc1 instructions
libgccjit.so: error: error invoking gcc driver: exit_status: 256 err: 0
libgccjit.so: error: whilst attempting to run a driver named: 
mipsel-linux-gnu-gcc-5
libgccjit.so: error: PATH was: 
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ERROR

For this issue to be seen on pygccjit build log, one could rebuild package 
against new gcc-5 version.

This issue is not noticed with gcc-5 version gcc-5_5.1.1-13 that is in pygccjit 
build log:
https://buildd.debian.org/status/fetch.php?pkg=pygccjit=mips=0.4-4=1436417562
Problem that is present with gcc-5_5.1.1-13 is still there on gcc-5_5.2.1-15 
and I will open a separate bug report for this issue.

Here are lines that I get during package build with gcc-5_5.1.1-14:
 gcc-5 -shared /tmp/libgccjit-z1jPnd/fake.s -o /tmp/libgccjit-z1jPnd/fake.so 
-fno-use-linker-plugin

and gcc-5_5.2.1-15:
gcc-5 -EL -mips1 -mabi=32 -shared /tmp/libgccjit-piCaTh/fake.s -o 
/tmp/libgccjit-piCaTh/fake.so -fno-use-linker-plugin

Notice mips1 flag in build line.

I have traced back changes that caused this new issue and they are first 
introduces with gcc-5_5.2.1-13 version:
https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/jit/jit-playback.h?r1=225207=226126
https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/jit/jit-playback.c?r1=225726=226126

After reverting these patches on MIPS this issue is not there any more.
This is confirmed with gcc-5_5.2.1-15 built with those changes reverted.

This issue is found in versions:
5.2.1-13, 5.2.1-14, 5.2.1-15, 5.2.1-16.

Suggestions are welcomed.

Thank you!

Regards,
Jurica


Bug#797548: icedove: FTBFS on mipsen (Error: float register should be even, was [odd number])

2015-09-11 Thread Jurica Stanojkovic
tags 797548 + patch
thanks

Hello,

Solution for this issue is proposed and commented here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=795845

I have used same solution on this package as well.
Patch for icedove is attached.

With this patch package builds further and later fail with the following 
message:
Executing /«PKGBUILDDIR»/obj-icedove/dist/bin/xpcshell -g 
/«PKGBUILDDIR»/obj-icedove/dist/bin/ -a /«PKGBUILDDIR»/obj-icedove/dist/bin/ -f 
/«PKGBUILDDIR»/mozilla/toolkit/mozapps/installer/precompile_cache.js -e 
precompile_startupcache("resource://gre/");
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/mozilla/toolkit/mozapps/installer/packager.py", line 
403, in 
main()
  File "/«PKGBUILDDIR»/mozilla/toolkit/mozapps/installer/packager.py", line 
397, in main
args.source, gre_path, base)
  File "/«PKGBUILDDIR»/mozilla/toolkit/mozapps/installer/packager.py", line 
156, in precompile_cache
errors.fatal('Error while running startup cache precompilation')
  File "/«PKGBUILDDIR»/mozilla/python/mozbuild/mozpack/errors.py", line 101, in 
fatal
self._handle(self.FATAL, msg)
  File "/«PKGBUILDDIR»/mozilla/python/mozbuild/mozpack/errors.py", line 96, in 
_handle
raise ErrorMessage(msg)
mozpack.errors.ErrorMessage: Error: Error while running startup cache 
precompilation
make[4]: *** [stage-package] Error 1
/«PKGBUILDDIR»/mozilla/toolkit/mozapps/installer/packager.mk:36: recipe for 
target 'stage-package' failed
make[4]: Leaving directory '/«PKGBUILDDIR»/obj-icedove/mail/installer'
make[3]: *** [install] Error 2
make[2]: *** [install] Error 2
/«PKGBUILDDIR»/mozilla/../mail/build.mk:19: recipe for target 'install' failed
make[3]: Leaving directory '/«PKGBUILDDIR»/obj-icedove'
client.mk:411: recipe for target 'install' failed
make[2]: Leaving directory '/«PKGBUILDDIR»'
make[1]: *** [override_dh_auto_install] Error 2
debian/rules:89: recipe for target 'override_dh_auto_install' failed
make[1]: Leaving directory '/«PKGBUILDDIR»'
make: *** [binary-arch] Error 2
debian/rules:46: recipe for target 'binary-arch' failed
dpkg-buildpackage: error: fakeroot debian/rules binary-arch gave error exit 
status 2

This issue looks similar to one already reported on s390x:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797551


Please consider including this patch.
I will look at this later issue further.

Thank you!

Regards,
Jurica
--- icedove-38.1.0.orig/mozilla/media/libjpeg/simd/jsimd_mips_dspr2.S
+++ icedove-38.1.0/mozilla/media/libjpeg/simd/jsimd_mips_dspr2.S
@@ -2840,54 +2840,54 @@ LEAF_MIPS_DSPR2(jsimd_quantize_float_mip
 mtc1   t1, f0
 li t0, 63
 0:
-lwc1   f1, 0(a2)
-lwc1   f5, 0(a1)
-lwc1   f2, 4(a2)
-lwc1   f6, 4(a1)
-lwc1   f3, 8(a2)
-lwc1   f7, 8(a1)
-lwc1   f4, 12(a2)
-lwc1   f8, 12(a1)
-madd.s f1, f0, f1, f5
-madd.s f2, f0, f2, f6
-madd.s f3, f0, f3, f7
-madd.s f4, f0, f4, f8
-lwc1   f5, 16(a1)
-lwc1   f6, 20(a1)
-trunc.w.s  f1, f1
+lwc1   f2, 0(a2)
+lwc1   f10, 0(a1)
+lwc1   f4, 4(a2)
+lwc1   f12, 4(a1)
+lwc1   f6, 8(a2)
+lwc1   f14, 8(a1)
+lwc1   f8, 12(a2)
+lwc1   f16, 12(a1)
+madd.s f2, f0, f2, f10
+madd.s f4, f0, f4, f12
+madd.s f6, f0, f6, f14
+madd.s f8, f0, f8, f16
+lwc1   f10, 16(a1)
+lwc1   f12, 20(a1)
 trunc.w.s  f2, f2
-trunc.w.s  f3, f3
 trunc.w.s  f4, f4
-lwc1   f7, 24(a1)
-lwc1   f8, 28(a1)
-mfc1   t1, f1
-mfc1   t2, f2
-mfc1   t3, f3
-mfc1   t4, f4
-lwc1   f1, 16(a2)
-lwc1   f2, 20(a2)
-lwc1   f3, 24(a2)
-lwc1   f4, 28(a2)
-madd.s f1, f0, f1, f5
-madd.s f2, f0, f2, f6
-madd.s f3, f0, f3, f7
-madd.s f4, f0, f4, f8
+trunc.w.s  f6, f6
+trunc.w.s  f8, f8
+lwc1   f14, 24(a1)
+lwc1   f16, 28(a1)
+mfc1   t1, f2
+mfc1   t2, f4
+mfc1   t3, f6
+mfc1   t4, f8
+lwc1   f2, 16(a2)
+lwc1   f4, 20(a2)
+lwc1   f6, 24(a2)
+lwc1   f8, 28(a2)
+madd.s f2, f0, f2, f10
+madd.s f4, f0, f4, f12
+madd.s f6, f0, f6, f14
+madd.s f8, f0, f8, f16
 addiu  t1, t1, -16384
 addiu  t2, t2, -16384
 addiu  t3, t3, -16384
 addiu  t4, t4, -16384
-trunc.w.s  f1, f1
 trunc.w.s  f2, f2
-trunc.w.s  f3, f3
 trunc.w.s  f4, f4
+trunc.w.s  f6, f6
+trunc.w.s  f8, f8
 sh t1, 0(a0)
 sh t2, 2(a0)
 sh t3, 4(a0)
 sh t4, 6(a0)
-mfc1   t1, f1
-mfc1   t2, f2
-mfc1   t3, f3
-mfc1   t4, f4
+mfc1   t1, f2
+mfc1   t2, f4
+mfc1   t3, f6
+mfc1   t4, f8
 addiu  t0, t0, -8
 addiu  a2, a2, 32
 addiu  a1, a1, 32
@@ -4150,32 +4150,32 @@ 

Bug#797228: filezilla: FTBFS on mips/mipsel/powerpc (undefined reference to __atomic_store_8)

2015-09-08 Thread Jurica Stanojkovic
tags 797228 + patch
thanks

Hello,

I have attached patch created from upstream source:

2015-08-16 17:57 codesquid, revision 
6931

  *   M 
/FileZilla3/trunk/configure.ac
  *   A 
/FileZilla3/trunk/m4/check_atomic.m4

Add check whether we need -latomic

2015-08-18 18:19 codesquid, revision 
6938

  *   M 
/FileZilla3/trunk/m4/check_atomic.m4

Use LIBS instead of LDFLAGS in -latomic detection.

With this patch package builds from source on mipsel successfully.

Please consider including this patch to current package version.
Thank you!

Regards,
Jurica
--- filezilla-3.12.0.2.orig/configure.ac
+++ filezilla-3.12.0.2/configure.ac
@@ -53,6 +53,9 @@ if ! test "$localesonly" = "yes"; then
   # No thread_local in GCC 4.7 and it for some reason isn't supported on OS X either
   CHECK_THREAD_LOCAL
 
+  # std::atomic on PPC seems to require -latomic
+  CHECK_ATOMIC
+
   # Add build information to config.h
   # -
 
--- /dev/null
+++ filezilla-3.12.0.2/m4/check_atomic.m4
@@ -0,0 +1,39 @@
+# Some versions of gcc/libstdc++ require linking with -latomic if
+# using the C++ atomic library.
+
+m4_define([_CHECK_ATOMIC_testbody], [[
+  #include 
+  #include 
+
+  int main() {
+std::atomic a{};
+
+int64_t v = 5;
+int64_t r = a.fetch_add(v);
+return static_cast(r);
+  }
+]])
+
+AC_DEFUN([CHECK_ATOMIC], [
+
+  AC_LANG_PUSH(C++)
+
+  AC_MSG_CHECKING([whether std::atomic can be used without link library])
+
+  AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[
+  AC_MSG_RESULT([yes])
+],[
+  AC_MSG_RESULT([no])
+  LIBS="$LIBS -latomic"
+  AC_MSG_CHECKING([whether std::atomic needs -latomic])
+  AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[
+  AC_MSG_RESULT([yes])
+],[
+  AC_MSG_RESULT([no])
+  AC_MSG_FAILURE([cannot figure our how to use std::atomic])
+])
+])
+
+  AC_LANG_POP
+])
+


Bug#793012: gmp-ecm: FTBFS on mipsel: bad assembly?

2015-08-27 Thread Jurica Stanojkovic
Hello,

Please do note that sp.h patch, probably need to be included anyway.
Because on mips 32bit UDItype was seen as 32 bit not 64 bit type as expected.

Please, take this into consideration, before making final change.

Thank you!

Regards,
Jurica



Bug#793012: gmp-ecm: FTBFS on mipsel: bad assembly?

2015-08-26 Thread Jurica Stanojkovic
Hello,

I was able to build package gmp-ecm_6.4.4+ds-2 with patch that is attached.

First part of patch is taken from upstream (file longlong.h)
I had to add second part (file sp.h) in order to build package successfully.
Patch is attached.

Alternatively, if  following code for umul_ppm is used, instead of upstream 
patch,
package also does build successfully.
#define umul_ppmm(w1, w0, u, v) \
   __asm__ (multu %2,%3\n\tmflo %0\n\tmfhi %1 \
   : =d (w0), =d (w1) : d (u), d (v))

Thank you!

Regards,
Jurica

--- gmp-ecm-6.4.4+ds.orig/longlong.h
+++ gmp-ecm-6.4.4+ds/longlong.h
@@ -931,10 +931,19 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
 #endif /* __m88000__ */
 
 #if defined (__mips)  W_TYPE_SIZE == 32
-#if __GNUC__  2 || __GNUC_MINOR__ = 7
+#if __GMP_GNUC_PREREQ (4,4)
+ #define umul_ppmm(w1, w0, u, v) \
+   do {  \
+ UDItype __ll = (UDItype)(u) * (v);  \
+ w1 = __ll  32;\
+ w0 = __ll;  \
+   } while (0)
+#endif
+#if !defined (umul_ppmm)  __GMP_GNUC_PREREQ (2,7)
 #define umul_ppmm(w1, w0, u, v) \
   __asm__ (multu %2,%3 : =l (w0), =h (w1) : d (u), d (v))
-#else
+#endif
+#if !defined (umul_ppmm)
 #define umul_ppmm(w1, w0, u, v) \
   __asm__ (multu %2,%3\n\tmflo %0\n\tmfhi %1\
 	   : =d (w0), =d (w1) : d (u), d (v))
--- gmp-ecm-6.4.4+ds.orig/sp.h
+++ gmp-ecm-6.4.4+ds/sp.h
@@ -69,7 +69,7 @@ extern size_t MPZSPV_NORMALISE_STRIDE;
  * note that a small prime must be the size of a GMP limb */
 typedef mp_limb_t UWtype;
 typedef unsigned int UHWtype;
-#if (defined(_PA_RISC1_1)  defined(__GNUC__))
+#if ((defined(_PA_RISC1_1) || defined(__mips))  defined(__GNUC__))
 /* this seems to be needed, otherwise umul_ppmm() does not work properly */
 typedef mp_limb_t USItype __attribute__ ((mode (SI)));
 typedef mp_limb_t UDItype __attribute__ ((mode (DI)));


Bug#794783: aces3: ftbfs on mipsel

2015-08-18 Thread Jurica Stanojkovic
Hello,

We have successfully built package aces3 using sbuild for mipsel on multiple 
boards.
Package was built without any changes to source code.

We plan to ask for give-back.

Thank you!

Regards,
Jurica


Bug#794668: package freshplayerplugin FTBFS on big endian builds

2015-08-10 Thread Jurica Stanojkovic
Hello,

I have tested proposed patch on MIPS, on both big and little-endian.
With your patch package was built successfully from source.

Thank you!

Regards,
Jurica


Bug#794668: package freshplayerplugin FTBFS on big endian builds

2015-08-05 Thread Jurica Stanojkovic
Package: freshplayerplugin
Version: 0.3.1-2
Severity: important
Tags: sid
User: debian-m...@lists.debian.org
Usertags: mips-patch

Package freshplayerplugin_0.3.1-2 FTBFS on big-endian builds:
https://buildd.debian.org/status/fetch.php?pkg=freshplayerpluginarch=mipsver=0.3.1-2stamp=1438213355

Failiure occurs in testing phase:
2/6 Test #2: test_ppb_char_set ***Exception: Other 0.06 sec 
default charset = ANSI_X3.4-1968 to utf16: all ASCII test_ppb_char_set: 
/«PKGBUILDDIR»/tests/test_ppb_char_set.c:56: test_to_utf16: Assertion 
`memcmp(res, out, sizeof(out)) == 0' failed.

Looking at the test itself (test_ppb_char_set.c) it seems that test is assuming 
little-endian architecture:
const char *in = Hello, world!;
uint16_t out[] = {0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, 0x20, 0x77,
0x6f, 0x72, 0x6c, 0x64, 0x21};

Possible solution is creating separate out[] array for big-endian architecture 
that will be initialised with 16 bit representation for corresponding 
characters on big-endian.

Comments are welcomed.

Thank you!

Regards,
Jurica



Bug#793391: Package oath-toolkit FTBFS on 32bit archs

2015-07-23 Thread Jurica Stanojkovic
Package: oath-toolkit
Version: 2.6.0-1
Severity: serious
Tags: sid + patch
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hello,

Package oath-toolkit_2.6.0-1 FTBFS on 32bit archs:
https://buildd.debian.org/status/package.php?p=oath-toolkitsuite=sid
https://buildd.debian.org/status/fetch.php?pkg=oath-toolkitarch=i386ver=2.6.0-1stamp=1432044152
https://buildd.debian.org/status/fetch.php?pkg=oath-toolkitarch=mipselver=2.6.0-1stamp=1432045345


There is a solution for this issue upstream:
http://git.savannah.gnu.org/cgit/oath-toolkit.git/commit/?id=1cd97516756d3e9d71c4072164bda9070625f9ee

I have tried this patch on mipsel and amd64.
With this patch package builds successfully.

Please include this patch.

Thank you!

Regards,
Jurica
--- oath-toolkit-2.6.0.orig/liboath/tests/tst_totp_algo.c
+++ oath-toolkit-2.6.0/liboath/tests/tst_totp_algo.c
@@ -131,8 +131,8 @@ main (void)
   if (strcmp (otp, tv[i].sha256otp) != 0)
 	{
 	  printf (otp[%ld] got %s expected2 %s\n, i, otp, tv[i].sha256otp);
-	  if (strcmp (otp, 82762030) == 0
-	   strcmp (tv[i].sha256otp, 65353130) == 0)
+	  if (strcmp (otp, 11281421) == 0
+	   strcmp (tv[i].sha256otp, 77737706) == 0)
 	printf (Mismatch due to 32-bit time_t...\n);
 	  else
 	return 1;
@@ -153,8 +153,8 @@ main (void)
   if (strcmp (otp, tv[i].sha512otp) != 0)
 	{
 	  printf (otp[%ld] got %s expected2 %s\n, i, otp, tv[i].sha512otp);
-	  if (strcmp (otp, 82762030) == 0
-	   strcmp (tv[i].sha512otp, 65353130) == 0)
+	  if (strcmp (otp, 29833534) == 0
+	   strcmp (tv[i].sha512otp, 47863826) == 0)
 	printf (Mismatch due to 32-bit time_t...\n);
 	  else
 	return 1;


Bug#793296: package mruby FTBFS on mips and mipsel

2015-07-22 Thread Jurica Stanojkovic
Package: mruby
Version: 1.1.0+20150601+gitbd2686d8-1
Severity: serious
Tags: sid + patch
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hello,

Package mruby_1.1.0+20150601+gitbd2686d8-1 FTBFS on mips and mipsel:
https://buildd.debian.org/status/fetch.php?pkg=mrubyarch=mipsver=1.1.0%2B20150601%2Bgitbd2686d8-1stamp=1433142411
https://buildd.debian.org/status/fetch.php?pkg=mrubyarch=mipselver=1.1.0%2B20150601%2Bgitbd2686d8-1stamp=1433138468

There is a solution for this issue upstream:
https://github.com/mruby/mruby/commit/3bcf570a17d25783187c8aa3413bf48425b29619#diff-91a9f78b081c7ee9c0eb0538fe5efc76

With this change package builds successfully for MIPS.

Please include this patch.

Thank you!

Regards,
Jurica
--- mruby-1.1.0+20150601+gitbd2686d8.orig/src/fmt_fp.c
+++ mruby-1.1.0+20150601+gitbd2686d8/src/fmt_fp.c
@@ -90,7 +90,7 @@ fmt_u(uint32_t x, char *s)
 typedef char compiler_defines_long_double_incorrectly[9-(int)sizeof(long double)];
 #endif
 
-#if defined(__CYGWIN32__) || defined(__NetBSD__) || defined(mips)
+#if (defined(__CYGWIN32__) || defined(__NetBSD__) || defined(mips))  !defined(__linux__)
 static long double
 frexpl (long double x, int *eptr)
 {


Bug#730904: openmeeg: FTBFS: Tests failed

2015-07-03 Thread Jurica Stanojkovic
Hello,

I have contacted upstream about this issue.
https://github.com/openmeeg/openmeeg/issues/75

Regards,
Jurica


Bug#790024: package pandas FTBFS on big-endian

2015-06-26 Thread Jurica Stanojkovic
Package: pandas
Version: 0.15.1+git125-ge463818-1
Severity: serious
Tags: sid + patch
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hello,

Package  FTBFS on big-endian builds:
https://buildd.debian.org/status/package.php?p=pandassuite=sid

With following message:

==
FAIL: test_to_records (pandas.tests.test_categorical.TestCategoricalAsBlock)
--
Traceback (most recent call last):
  File 
/«BUILDDIR»/pandas-0.15.1+git125-ge463818/debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/test_categorical.py,
 line 2393, in test_to_records
tm.assert_almost_equal(result,expected)
  File das/src/testing.pyx, line 58, in pandas._testing.assert_almost_equal 
(pandas/src/testing.c:2745)
  File das/src/testing.pyx, line 93, in pandas._testing.assert_almost_equal 
(pandas/src/testing.c:1830)
  File das/src/testing.pyx, line 143, in pandas._testing.assert_almost_equal 
(pandas/src/testing.c:2618)
AssertionError: (0L, 'a') != (0L, 'a')

-

With the patch attached package builds successfully on both MIPS big-endian and 
little-endian.
Patch is changing test_categorical to work with native endian instead of 
little-endian.

Same patch is available upstream:
https://github.com/pydata/pandas/pull/10438

Could you please consider including this patch?

Thank you!

Regards,
Jurica
--- pandas-0.15.1+git125-ge463818.orig/pandas/tests/test_categorical.py
+++ pandas-0.15.1+git125-ge463818/pandas/tests/test_categorical.py
@@ -2389,7 +2389,7 @@ class TestCategoricalAsBlock(tm.TestCase
 # this coerces
 result = df.to_records()
 expected = np.rec.array([(0, 'a'), (1, 'b'), (2, 'c')],
-dtype=[('index', 'i8'), ('0', 'O')])
+dtype=[('index', '=i8'), ('0', 'O')])
 tm.assert_almost_equal(result,expected)
 
 def test_numeric_like_ops(self):


Bug#788068: package libsbml FTBFS on mipsel

2015-06-08 Thread Jurica Stanojkovic
Package: libsbml
Version: 5.10.0+dfsg-1
Severity: serious
Tags: sid
User: debian-m...@lists.debian.org
Usertags: mips-patch

Package libsbml_5.10.0+dfsg-1 FTBFS on mipsel with following message:

Build killed with signal TERM after 150 minutes of inactivity

https://buildd.debian.org/status/fetch.php?pkg=libsbmlarch=mipselver=5.10.0%2Bdfsg-1stamp=1410908364

Package timeout on loongson based MIPS build boards.

We have successfully built libsbml using -O1 optimization level.
-O1 is used for mips/mipsel, for critical part of package.
The patch is attached.
With this patch we was able to build package on lemote loongson 3a.

Could you please include this patch?

Thank you!

Regards,
Jurica
diff -upNr libsbml-5.10.0+dfsg-old/debian/rules libsbml-5.10.0+dfsg-new/debian/rules
--- libsbml-5.10.0+dfsg-old/debian/rules	2014-08-27 13:34:23.0 +0200
+++ libsbml-5.10.0+dfsg-new/debian/rules	2015-05-29 00:15:27.410301574 +0200
@@ -18,6 +18,10 @@ ifdef BIND_MATLAB
 CMAKE_OPTS := $(shell cat debian/cmake_opts)
 endif
 
+ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
+CMAKE_OPTS += -D'WITH_01_COMPILE:BOOL=ON'
+endif
+
 ### let's do it ###
 
 DEB_COMPRESS_EXCLUDE = .pdf
diff -upNr libsbml-5.10.0+dfsg-old/src/bindings/perl/CMakeLists.txt libsbml-5.10.0+dfsg-new/src/bindings/perl/CMakeLists.txt
--- libsbml-5.10.0+dfsg-old/src/bindings/perl/CMakeLists.txt	2015-05-29 00:17:39.0 +0200
+++ libsbml-5.10.0+dfsg-new/src/bindings/perl/CMakeLists.txt	2015-05-29 00:16:43.652489626 +0200
@@ -149,6 +149,12 @@ ADD_CUSTOM_COMMAND(
 
 add_custom_target(binding_perl_swig ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/LibSBML_wrap.cpp ${CMAKE_CURRENT_BINARY_DIR}/LibSBML.pod)
 
+if (WITH_01_COMPILE)
+set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -O1)
+set (CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -O1)
+set (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} -O1)
+set (CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} -O1)
+endif(WITH_01_COMPILE)
 
 # 
 # Determine the perl installation directory


Bug#785806: Package qemu_1:2.3+dfsg-3 FTBFS - recompile with -fPIC

2015-05-20 Thread Jurica Stanojkovic
Package: qemu
Version: 1:2.3+dfsg-3
Severity: serious
Tags: sid
User: debian-m...@lists.debian.org
Usertags: mips-patch


Package qemu_1:2.3+dfsg-3 FTBFS on mips, mipsel, armhf, arm64, kfreebsd-amd64 
with recompile with -fPIC message.
https://buildd.debian.org/status/package.php?p=qemusuite=sid

This issue occur because few object .o files are built without -fPIC
and later they are used for creating library .so file with -fPIC enabled.

Solution for this is available upstream:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=d24697e1824467f3921c84a94f011f43d6466403

--- a/rules.mak
+++ b/rules.mak
@@ -102,7 +102,8 @@ endif
 %.o: %.dtrace
$(call quiet-command,dtrace -o $@ -G -s $,   GEN   $(TARGET_DIR)$@)

-%$(DSOSUF): CFLAGS += -fPIC -DBUILD_DSO
+DSO_OBJ_CFLAGS := -fPIC -DBUILD_DSO
+module-common.o: CFLAGS += $(DSO_OBJ_CFLAGS)
 %$(DSOSUF): LDFLAGS += $(LDFLAGS_SHARED)
 %$(DSOSUF): %.mo
$(call LINK,$^)
@@ -351,6 +352,7 @@ define unnest-vars
 # For non-module build, add -m to -y
 $(if $(CONFIG_MODULES),
  $(foreach o,$($v),
+   $(eval $($o-objs): CFLAGS += $(DSO_OBJ_CFLAGS))
$(eval $o: $($o-objs)))
  $(eval $(patsubst %-m,%-y,$v) += $($v))
  $(eval modules: $($v:%.mo=%$(DSOSUF))),

This issue does not occur on i386 and amd64 because -fPIE is used for build on 
those archs.

Part of the configure file:

 if test $pie = ; then
   case $cpu-$targetos in
 i386-Linux|x86_64-Linux|x32-Linux|i386-OpenBSD|x86_64-OpenBSD)
   ;;
 *)
   pie=no
   ;;
   esac
 fi

With this patch from upstream (attached) package does build on mipsel 
successfully.

Thank you!

Regards,
Jurica
--- qemu-2.3+dfsg.orig/rules.mak
+++ qemu-2.3+dfsg/rules.mak
@@ -102,7 +102,8 @@ endif
 %.o: %.dtrace
 	$(call quiet-command,dtrace -o $@ -G -s $,   GEN   $(TARGET_DIR)$@)
 
-%$(DSOSUF): CFLAGS += -fPIC -DBUILD_DSO
+DSO_OBJ_CFLAGS := -fPIC -DBUILD_DSO
+module-common.o: CFLAGS += $(DSO_OBJ_CFLAGS)
 %$(DSOSUF): LDFLAGS += $(LDFLAGS_SHARED)
 %$(DSOSUF): %.mo
 	$(call LINK,$^)
@@ -351,6 +352,7 @@ define unnest-vars
 # For non-module build, add -m to -y
 $(if $(CONFIG_MODULES),
  $(foreach o,$($v),
+   $(eval $($o-objs): CFLAGS += $(DSO_OBJ_CFLAGS))
$(eval $o: $($o-objs)))
  $(eval $(patsubst %-m,%-y,$v) += $($v))
  $(eval modules: $($v:%.mo=%$(DSOSUF))),


Bug#750998: ck: fails to compile on MIPS

2015-04-24 Thread Jurica Stanojkovic
Package: ck
Version:0.4.4-1
User: debian-m...@lists.debian.org

Hello,

I have tried ck.patch proposed by Plamen Aleksandrov.

With this patch package does build further on MIPS.
Later there are problems with 8B __sync operations which are not supported on 
mips 32bit.


/tmp/ccjioxse.o: In function `ck_pr_add_64':

/build/ck-cHjeHK/ORIG/ck-0.4.4/regressions/ck_ht/benchmark/../../../include/gcc/ck_pr.h:242:
 undefined reference to `__sync_fetch_and_add_8'

collect2: error: ld returned 1 exit status

Makefile:17: recipe for target 'parallel_bytestring' failed


When this is resolved by replacing __sync operation with corresponding __atomic 
operation from libatomic library there are two new ones that fail.

__sync_val_compare_and_swap_8 and

__sync_bool_compare_and_swap_8


/tmp/ccdbKgaC.o: In function `ck_pr_cas_64':

/build/ck-cHjeHK/ORIG/ck-0.4.4/regressions/ck_pr/validate/../../../include/gcc/ck_pr.h:155:
 undefined reference to `__sync_bool_compare_and_swap_8'

/build/ck-cHjeHK/ORIG/ck-0.4.4/regressions/ck_pr/validate/../../../include/gcc/ck_pr.h:155:
 undefined reference to `__sync_bool_compare_and_swap_8'

/build/ck-cHjeHK/ORIG/ck-0.4.4/regressions/ck_pr/validate/../../../include/gcc/ck_pr.h:155:
 undefined reference to `__sync_bool_compare_and_swap_8'

/tmp/ccdbKgaC.o: In function `ck_pr_cas_64_value':

/build/ck-cHjeHK/ORIG/ck-0.4.4/regressions/ck_pr/validate/../../../include/gcc/ck_pr.h:186:
 undefined reference to `__sync_val_compare_and_swap_8'

/tmp/ccdbKgaC.o: In function `main':

/build/ck-cHjeHK/ORIG/ck-0.4.4/regressions/ck_pr/validate/../../../include/gcc/ck_pr.h:155:
 undefined reference to `__sync_bool_compare_and_swap_8'

I am working on resolving this issues.
Suggestions are welcomed.

Thank you!

Regards,
Jurica




Bug#781828: package rna-star_2.4.0i-1 FTBFS on mipsel

2015-04-03 Thread Jurica Stanojkovic
Package: rna-star
Version: rna-star_2.4.0i-1
Severity: important
Tags: sid
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hello,

Package rna-star_2.4.0i-1 FTBFS on mipsel with following message:

Genome.cpp:277:57: error: 'SHM_NORESERVE' was not declared in this scope

Build log:
https://buildd.debian.org/status/fetch.php?pkg=rna-stararch=mipselver=2.4.0i-1stamp=1422724557

There is a reported issue on Bugzilla:
https://sourceware.org/bugzilla/show_bug.cgi?id=17930

I am sending a patch which resolves this issue for mipsel, until this issue 
gets fixed in glibc.
With this patch package builds without an issue.
Could you please include this patch?

Thank you!

Regards,
Jurica

--- rna-star-2.4.0i.orig/source/IncludeDefine.h
+++ rna-star-2.4.0i/source/IncludeDefine.h
@@ -33,6 +33,10 @@ using namespace std;
   #define SHM_NORESERVE 0
 #endif
 
+#if defined(__mips__)  !defined(SHM_NORESERVE)
+#define SHM_NORESERVE 01
+#endif
+
 typedef int8_t int8;
 typedef uint8_t uint8; 
 


Bug#780845: package nodejs_0.10.29~dfsg-1.1 FTBFS on mips big-endian

2015-03-20 Thread Jurica Stanojkovic
Package: nodejs
Version: 0.10.29~dfsg-1.1
Severity: important
Tags: sid
User: debian-m...@lists.debian.org


Hello,

Package nodejs_0.10.29~dfsg-1.1 FTBFS on mips big-endian.

I have tried to build upstream source in the same environment and results are 
better.
https://github.com/joyent/node
After enabling package and tests to build and run on mips and mipsel,
package builds successfully with two tests failing on both mips and mipsel.

1.
=== release test-writedouble ===
Path: simple/test-writedouble
assert.js:88
  throw new assert.AssertionError({
^
AssertionError: 248 == 247
at test (/build/GIT_NODE/node/test/simple/test-writedouble.js:173:10)
at Object.anonymous 
(/build/GIT_NODE/node/test/simple/test-writedouble.js:195:1)
at Module._compile (module.js:462:26)
at Object.Module._extensions..js (module.js:480:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:503:10)
at startup (node.js:132:16)
at node.js:817(cat)
Command: out/Release/node /build/GIT_NODE/node/test/simple/test-writedouble.js
=== release test-writefloat ===
Path: simple/test-writefloat
assert.js:88
  throw new assert.AssertionError({
^
AssertionError: 192 == 191
at test (/build/GIT_NODE/node/test/simple/test-writefloat.js:119:10)
at Object.anonymous 
(/build/GIT_NODE/node/test/simple/test-writefloat.js:133:1)
at Module._compile (module.js:462:26)
at Object.Module._extensions..js (module.js:480:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:503:10)
at startup (node.js:132:16)
at node.js:817(cat)
Command: out/Release/node /build/GIT_NODE/node/test/simple/test-writefloat.js

2.
=== release test-tls-wrap-timeout ===
Path: simple/test-tls-wrap-timeout
assert.js:88
  throw new assert.AssertionError({
^
AssertionError: undefined undefined undefined
at Socket.g (events.js:201:16)
at Socket.emit (events.js:106:17)
at Socket._onTimeout (net.js:350:8)
at _makeTimerTimeout (timers.js:469:11)
at Timer.unrefTimeout (timers.js:533:5)
Command: out/Release/node 
/build/GIT_NODE/node/test/simple/test-tls-wrap-timeout.js

First problem is resolved with patch 
nodejs-0.10.29~dfsg/debian/patches/1004_test_writeNaN.patch
from debian package nodejs.

Second problem is resolved by increasing timeouts:
https://github.com/iojs/io.js/issues/1200
I had to increase last timeout even more for test to pass on mips and mipsel.

Additionally on some setups there is a following issue which is discuses on 
https://github.com/joyent/node/issues/8061

=== release test-process-active-wraps ===
Path: simple/test-process-active-wraps
assert.js:88
  throw new assert.AssertionError({
^
AssertionError: 2 == 1
at expect 
(/build/GIT_NODE/node/test/simple/test-process-active-wraps.js:28:10)
at /build/GIT_NODE/node/test/simple/test-process-active-wraps.js:37(cat)
at Object.anonymous 
(/build/GIT_NODE/node/test/simple/test-process-active-wraps.js:41(cat))
at Module._compile (module.js:462:26)
at Object.Module._extensions..js (module.js:480:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:503:10)
at startup (node.js:132:16)
at node.js:817(cat)
Command: out/Release/node 
/build/GIT_NODE/node/test/simple/test-process-active-wraps.js

It looks like it will be easier to upload new version of source than to 
back-port changes to the current version.

Is it possible to upload new upstream version to experimental?

Thank you!

Regards,
Jurica


Bug#765285: Upstream info

2015-03-17 Thread Jurica Stanojkovic
Hello,

Could you please provide some more info, about upstream response.
I would like to help. if I can.
I do have multi-core mips(el) machines at my disposal.

I have tried to build this package with more than one core and package did 
build successfully.
Could you please share an information how to reproduce problem on multi-core 
set-up.

Thank you!

Regards,
Jurica


Bug#778857: package ola_0.9.1-1.1 FTBS on big-endian archs

2015-02-20 Thread Jurica Stanojkovic
Package: ola
Version: 0.9.1-1.1
Severity: important
Tags: sid
User: debian-m...@lists.debian.org

Hello,

Package ola_0.9.1-1.1 FTBFS on big-endian architectures during testing phase.
This problem is solved on upstream:
https://github.com/OpenLightingProject/ola/pull/467
Upstream releases 0.9.3 and 0.9.4 build successfully on big-endian mips.

Could someone please upload 0.9.4 to experimental?
I will work on back-port of relevant changes for version 0.9.1-1.1.

Thanks!

Regards,
Jurica





Bug#778320: package libzypp FTBFS on different archs

2015-02-13 Thread Jurica Stanojkovic
Package: libzypp
Version: 14.29.1-2
Severity: important
Tags: sid
User: debian-m...@lists.debian.org

Hello,

Package libzypp FTBFS on different archs that are not i386 or amd64
https://buildd.debian.org/status/package.php?p=libzyppsuite=sidhttps://buildd.debian.org/status

There is an upstream fix for this issue:
https://github.com/openSUSE/libzypp/commit/f3c3aa763907399a3a538611e59097a41cfa0e65

Could someone please upload new version of this package.

Regards,
Jurica


Bug#774881: [Pkg-haskell-maintainers] Bug#774881: Bug#774881: package haskell-ieee754 is causing FTBFS of package haskell-hastache on big-endian

2015-02-03 Thread Jurica Stanojkovic
Hello,

I am currently building haskell-hastache with this version of haskell-ieee754 
on mips.
I everything goes OK I will request unblock.

Package haskell-hastache is built on hurd-i386 with latest upload version of 
haskell-ieee754.
https://buildd.debian.org/status/fetch.php?pkg=haskell-hastachearch=hurd-i386ver=0.6.0-1%2Bb1stamp=1422967412

Thank you!

Regards,
Jurica


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#774881: [Pkg-haskell-maintainers] Bug#774881: package haskell-ieee754 is causing FTBFS of package haskell-hastache on big-endian

2015-02-02 Thread Jurica Stanojkovic
Hi,

I would like to have this fixed in jessie, If possible.
Back-ported upstream patch is attached (with comments from upstream source).

Please include proposed patch.
Thank you!

Regards,
Jurica--- haskell-ieee754-0.7.3.orig/cbits/feqrel_source.c
+++ haskell-ieee754-0.7.3/cbits/feqrel_source.c
@@ -1,6 +1,42 @@
 /* adapted from Tango version 0.99.9, BSD Licensed
  */
 
+/* Endianness detection taken from http://esr.ibiblio.org/?p=5095 .
+*
+* We are assuming that the endianness is the same for integers and floats;
+* this is true for modern systems but false in a few historical machines and
+* some old ARM processors; see
+* http://en.wikipedia.org/wiki/Endianness#Floating-point_and_endianness .
+*/
+
+/*
+__BIG_ENDIAN__ and __LITTLE_ENDIAN__ are defined in some gcc versions
+only, probably depending on the architecture. Try to use endian.h if
+the gcc way fails - endian.h also does not seem to be available on all
+platforms.
+*/
+#ifdef __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+#else /* __BIG_ENDIAN__ */
+# ifdef __LITTLE_ENDIAN__
+#   undef WORDS_BIGENDIAN
+# else
+#   ifdef BSD
+# include sys/endian.h
+#   else
+# include endian.h
+#   endif
+#   if __BYTE_ORDER == __BIG_ENDIAN
+# define WORDS_BIGENDIAN 1
+#   elif __BYTE_ORDER == __LITTLE_ENDIAN
+# undef WORDS_BIGENDIAN
+#   else
+# error unable to determine endianess!
+#   endif /* __BYTE_ORDER */
+# endif /* __LITTLE_ENDIAN__ */
+#endif /* __BIG_ENDIAN__ */
+
+
 /* REAL_EXPMASK is a ushort mask to select the exponent portion (without sign)
  * REAL_SIGNMASK is a ushort mask to select the sign bit.
  * REAL_EXPPOS_SHORT is the index of the exponent when represented as a uint16_t array.
@@ -16,7 +52,7 @@
 # define REAL_EXPBIAS((uint16_t) 0x3F00)
 # define REAL_EXPBIAS_INT32  ((uint32_t) 0x7F80)
 # define REAL_MANTISSAMASK_INT32 ((uint32_t) 0x007F)
-# if BIG_ENDIAN == 1
+# if WORDS_BIGENDIAN
 #  define REAL_EXPPOS_INT16 0
 # else
 #  define REAL_EXPPOS_INT16 1
@@ -28,7 +64,7 @@
 # define REAL_EXPBIAS((uint16_t) 0x3FE0)
 # define REAL_EXPBIAS_INT32  ((uint32_t) 0x7FF0)
 # define REAL_MANTISSAMASK_INT32 ((uint32_t) 0x000F); /* for the MSB only */
-# if BIG_ENDIAN == 1
+# if WORDS_BIGENDIAN
 #  define REAL_EXPPOS_INT16 0
 #  define REAL_SIGNPOS_BYTE 0
 # else
--- haskell-ieee754-0.7.3.orig/ieee754.cabal
+++ haskell-ieee754-0.7.3/ieee754.cabal
@@ -19,11 +19,6 @@ tested-with: GHC ==6.12.3
 extra-source-files: LICENSE.Tango NEWS cbits/feqrel_source.c
 tests/Makefile tests/Tests.hs
 
-flag big_endian
-  description: Build for a big endian machine.  Beware that only
-   little endian machines have been tested.
-  default: False
-
 library
 exposed-modules: Data.AEq
  Numeric.IEEE
@@ -39,7 +34,5 @@ library
  cbits/double.c
 
 cc-options:  -Wall --std=c99
-if flag(big_endian)
-cc-options:  -DBIG_ENDIAN
 
 extra-libraries: m


Bug#774881: package haskell-ieee754 is causing FTBFS of package haskell-hastache on big-endian

2015-01-30 Thread Jurica Stanojkovic
Hello,

There is a solution for this problem upstream.
Solution is available in upstream package versions 0.7.5 and 0.7.6

https://github.com/patperry/hs-ieee754/issues/5

I have tried them both on mips.
Both packages do resolve issue on mips.

Could someone please upload new source from upstream.
Or should I backport changes for this version of package?

Thanks!

Regards,
Jurica



Bug#774881: package haskell-ieee754 is causing FTBFS of package haskell-hastache on big-endian

2015-01-08 Thread Jurica Stanojkovic
Package: haskell-ieee754
Version:0.7.3-3
Severity: serious
Tags: sid + patch
User: debian-m...@lists.debian.org
Usertags: mips-patch


Hello,

Package haskell-ieee754 is reason why package haskell-hastache is FTBFS on 
big-endian.

I have attached a patch for this issue.
With this patch applied to package haskell-ieee754 I was able to build package 
haskell-hastache on mips big-endian successfully.

Upstream issue:
https://github.com/lymar/hastache/issues/36#

Thank you!

Regards,
Jurica
--- haskell-ieee754-0.7.3.orig/cbits/feqrel_source.c
+++ haskell-ieee754-0.7.3/cbits/feqrel_source.c
@@ -16,7 +16,7 @@
 # define REAL_EXPBIAS((uint16_t) 0x3F00)
 # define REAL_EXPBIAS_INT32  ((uint32_t) 0x7F80)
 # define REAL_MANTISSAMASK_INT32 ((uint32_t) 0x007F)
-# if BIG_ENDIAN == 1
+# if BYTE_ORDER == BIG_ENDIAN
 #  define REAL_EXPPOS_INT16 0
 # else
 #  define REAL_EXPPOS_INT16 1
@@ -28,7 +28,7 @@
 # define REAL_EXPBIAS((uint16_t) 0x3FE0)
 # define REAL_EXPBIAS_INT32  ((uint32_t) 0x7FF0)
 # define REAL_MANTISSAMASK_INT32 ((uint32_t) 0x000F); /* for the MSB only */
-# if BIG_ENDIAN == 1
+# if BYTE_ORDER == BIG_ENDIAN
 #  define REAL_EXPPOS_INT16 0
 #  define REAL_SIGNPOS_BYTE 0
 # else


Bug#774285: package mod-proxy-msrpc_0.5-1 FTBFS on big-endian

2014-12-31 Thread Jurica Stanojkovic
Package: mod-proxy-msrpc
Version: 0.5-1
Severity: serious
Tags: sid + patch
Justification: FTBFS
User: debian-m...@lists.debian.org
Usertags: mips-patch


Hello,
Package mod-proxy-msrpc_0.5-1 FTBFS on mips and on other big-endian 
architectures.
mips build log:
https://buildd.debian.org/status/fetch.php?pkg=mod-proxy-msrpcarch=mipsver=0.5-1stamp=1399057058

There is a solution for this problem upstream.

I have created a patch using upstream fixes for big-endian.
A patch is attached.

With this patch applied, package builds successfully on mips.


Regards,
Jurica


--- mod-proxy-msrpc-0.5.orig/src/msrpc_pdu_parser.c
+++ mod-proxy-msrpc-0.5/src/msrpc_pdu_parser.c
@@ -72,6 +72,8 @@ static const char const *msrpc_rts_pdu_c
 NULL,
 };
 
+#define MSRPC_PDU_IS_LITTLE_ENDIAN (pdu-data_representation == MSRPC_PDU_DATA_REPRESENTATION_LITTLE_ENDIAN)
+
 apr_status_t msrpc_pdu_get_length(const char *buf, apr_size_t *length)
 {
 msrpc_pdu_t *pdu = (msrpc_pdu_t *)buf;
@@ -81,7 +83,10 @@ apr_status_t msrpc_pdu_get_length(const
 return APR_INCOMPLETE;
 }
 
-*length = pdu-frag_length;
+#ifdef DEBUG_MSRPC_PDU_PARSER
+printf(data representation: 0x%08x\n, (uint32_t)pdu-data_representation);
+#endif
+*length = MSRPC_PDU_IS_LITTLE_ENDIAN ? pdu-frag_length : swap_bytes_uint16_t(pdu-frag_length);
 return APR_SUCCESS;
 }
 
@@ -110,11 +115,13 @@ apr_status_t msrpc_pdu_validate(const ch
 if (error) *error = PDU type;
 return APR_FROM_OS_ERROR(EBADMSG);
 }
-if (pdu-data_representation != 16) {
+if ((pdu-data_representation != MSRPC_PDU_DATA_REPRESENTATION_LITTLE_ENDIAN) 
+(pdu-data_representation != MSRPC_PDU_DATA_REPRESENTATION_BIG_ENDIAN)) {
 if (error) *error = data representation;
 return APR_FROM_OS_ERROR(EBADMSG);
 }
-if (pdu-frag_length % 4 != 0) {
+uint16_t frag_length = MSRPC_PDU_IS_LITTLE_ENDIAN ? pdu-frag_length : swap_bytes_uint16_t(pdu-frag_length);
+if (frag_length % 4 != 0) {
 if (error) *error = unaligned length;
 return APR_FROM_OS_ERROR(EBADMSG);
 }
@@ -130,18 +137,24 @@ apr_status_t msrpc_pdu_get_rts_pdu_count
 if (pdu-type != MSRPC_PDU_RTS) {
 return APR_FROM_OS_ERROR(EINVAL);
 }
-*count = pdu-rts_pdu_count;
+*count = MSRPC_PDU_IS_LITTLE_ENDIAN ? pdu-rts_pdu_count : swap_bytes_uint16_t(pdu-rts_pdu_count);
 return APR_SUCCESS;
 }
 
-apr_size_t msrpc_rts_pdu_len(const msrpc_rts_pdu_t *pdu)
+unsigned int msrpc_rts_pdu_len(const msrpc_rts_pdu_t *pdu, uint32_t data_representation)
 {
 apr_size_t size = 0;
 uint32_t conformance_count;
 uint32_t addrtype;
+uint32_t command;
 
 assert(pdu != NULL);
-switch (pdu-command) {
+command = (data_representation == MSRPC_PDU_DATA_REPRESENTATION_LITTLE_ENDIAN) ? pdu-command : swap_bytes_uint32_t(pdu-command);
+#ifdef DEBUG_MSRPC_PDU_PARSER
+printf(msrpc_rts_pdu_len: data representation: 0x%08x, command: 0x%08x\n, data_representation, command);
+#endif
+
+switch (command) {
 case RTS_CMD_RECEIVE_WINDOW_SIZE:
 case RTS_CMD_CONNECTION_TIMEOUT:
 case RTS_CMD_CHANNEL_LIFETIME:
@@ -167,14 +180,22 @@ apr_size_t msrpc_rts_pdu_len(const msrpc
 break;
 case RTS_CMD_PADDING:
 // see http://msdn.microsoft.com/en-us/library/cc244015.aspx
-conformance_count = pdu-u32[0];
+if (data_representation == MSRPC_PDU_DATA_REPRESENTATION_LITTLE_ENDIAN) {
+conformance_count = pdu-u32[0];
+} else {
+conformance_count = swap_bytes_uint32_t(pdu-u32[0]);
+}
 size = sizeof(pdu-command) + sizeof(conformance_count)
 + conformance_count;
 break;
 case RTS_CMD_CLIENT_ADDRESS:
 // see http://msdn.microsoft.com/en-us/library/cc244004.aspx
 // and http://msdn.microsoft.com/en-us/library/cc243993.aspx
-addrtype = pdu-u32[0];
+if (data_representation == MSRPC_PDU_DATA_REPRESENTATION_LITTLE_ENDIAN) {
+addrtype = pdu-u32[0];
+} else {
+addrtype = swap_bytes_uint32_t(pdu-u32[0]);
+}
 size = sizeof(pdu-command) + sizeof(addrtype);
 switch (addrtype) {
 case RTS_IPV4:
@@ -194,32 +215,33 @@ apr_size_t msrpc_rts_pdu_len(const msrpc
 return size;
 }
 
-apr_status_t msrpc_pdu_get_rts_pdu(const char *buf, unsigned int offset, msrpc_rts_pdu_t **rts_pdu, apr_size_t *len)
+apr_status_t msrpc_pdu_get_rts_pdu(const char *buf, unsigned int offset, msrpc_rts_pdu_t **rts_pdu, unsigned int *len)
 {
 assert(buf != NULL);
 assert(rts_pdu != NULL);
 
 msrpc_pdu_t *pdu = (msrpc_pdu_t *)buf;
+uint16_t frag_length = MSRPC_PDU_IS_LITTLE_ENDIAN ? pdu-frag_length : swap_bytes_uint16_t(pdu-frag_length);
 if (pdu-type != MSRPC_PDU_RTS) {
 #ifdef DEBUG_MSRPC_PDU_PARSER
   

Bug#773359: package tbb_4.2~20140122-4 FTBFS on mips and mipsel

2014-12-17 Thread Jurica Stanojkovic
Package: tbb
Version: 4.2~20140122-4
Severity: serious
Tags: sid + patch
Justification: FTBFS
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hello,
Package tbb_4.2~20140122-4 FTBFS on mips and mipsel.

Mips platform does not have 64-bit __sync_* operations.
To resolve this issue it is needed to use corresponding
__atomic_* from libatomic library. 

https://buildd.debian.org/status/package.php?p=tbbsuite=sid

build logs:
https://buildd.debian.org/status/fetch.php?pkg=tbbarch=mipsver=4.2~20140122-4stamp=1415055684
https://buildd.debian.org/status/fetch.php?pkg=tbbarch=mipselver=4.2~20140122-4stamp=1415054347

I have attached a patch resolving this issue.

Thank you!

Regards,
Jurica--- tbb-4.2~20140122.orig/build/linux.gcc.inc
+++ tbb-4.2~20140122/build/linux.gcc.inc
@@ -80,6 +80,14 @@ endif
 TBB_ASM.OBJ=
 MALLOC_ASM.OBJ=
 
+ifeq (mips,$(arch))
+LINK_FLAGS += -latomic
+endif
+
+ifeq (mipsel,$(arch))
+LINK_FLAGS += -latomic
+endif
+
 ifeq (ia64,$(arch))
 # Position-independent code (PIC) is a must on IA-64 architecture, even for regular (not shared) executables
 CPLUS_FLAGS += $(PIC_KEY)
--- tbb-4.2~20140122.orig/build/linux.inc
+++ tbb-4.2~20140122/build/linux.inc
@@ -76,6 +76,12 @@ ifndef arch
 ifeq ($(deb_host_arch),i386)
 export arch:=ia32
 endif
+	ifeq ($(deb_host_arch),mips)
+export arch:=mips
+endif
+ifeq ($(deb_host_arch),mipsel)
+export arch:=mipsel
+endif
 ifndef arch
 export arch:=$(uname_m)
 $(warning Unknown arch:  $(arch))
--- tbb-4.2~20140122.orig/include/tbb/machine/gcc_generic.h
+++ tbb-4.2~20140122/include/tbb/machine/gcc_generic.h
@@ -68,14 +68,27 @@
 #define __TBB_full_memory_fence()   __sync_synchronize()
 #define __TBB_control_consistency_helper()  __sync_synchronize()
 
-#define __TBB_MACHINE_DEFINE_ATOMICS(S,T) \
-inline T __TBB_machine_cmpswp##S( volatile void *ptr, T value, T comparand ) {\
-return __sync_val_compare_and_swap(reinterpret_castvolatile T *(ptr),comparand,value);  \
-} \
-  \
-inline T __TBB_machine_fetchadd##S( volatile void *ptr, T value ) {   \
-return __sync_fetch_and_add(reinterpret_castvolatile T *(ptr),value);   \
-} \
+#if defined (__mips)  !defined (__mips64)
+#define __TBB_MACHINE_DEFINE_ATOMICS(S,T) \
+inline T __TBB_machine_cmpswp##S( volatile void *ptr, T value, T comparand ) {\
+__atomic_compare_exchange(reinterpret_castvolatile T *(ptr),comparand,value,  \
+false,__ATOMIC_SEQ_CST,__ATOMIC_SEQ_CST); \
+return comparand; \
+} \
+  \
+inline T __TBB_machine_fetchadd##S( volatile void *ptr, T value ) {   \
+return __atomic_fetch_add(reinterpret_castvolatile T *(ptr),value,__ATOMIC_SEQ_CST);\
+}
+#else
+	#define __TBB_MACHINE_DEFINE_ATOMICS(S,T) \
+	inline T __TBB_machine_cmpswp##S( volatile void *ptr, T value, T comparand ) {\
+	return __sync_val_compare_and_swap(reinterpret_castvolatile T *(ptr),comparand,value);  \
+	} \
+	  \
+	inline T __TBB_machine_fetchadd##S( volatile void *ptr, T value ) {   \
+	return __sync_fetch_and_add(reinterpret_castvolatile T *(ptr),value);   \
+	} 
+#endif
 
 __TBB_MACHINE_DEFINE_ATOMICS(1,int8_t)
 __TBB_MACHINE_DEFINE_ATOMICS(2,int16_t)


Bug#771203: lnav: FTBFS on mips, powerpc and s390x

2014-12-03 Thread Jurica Stanojkovic
Hello,

I have found that upstream commit 17bd6e2 brakes build on Debian big-endian 
architectures.

https://github.com/tstack/lnav/commit/17bd6e234ac2432073912b940a17a3b97675b8f9


I this commit is reverted, package lnav builds successfully, all tests execute 
successfully.


Regards,
Jurica

https://emailus.imgtec.com/owa/?ae=Itema=Newt=IPM.Notecc=MTQuMy4xNzQuMSxlbi1HQiw0Mjk0OTY3Mjk1LEhUTUwsMCwwpspid=_1417519880816_854902489#


Bug#754755: [rt.cpan.org #98683] libinline-java-perl: FTBFS on mips: test suite issues

2014-11-26 Thread Jurica Stanojkovic
Hello,

Tests are still failing in new version 0.56 during build.
I have used sbuild for package build.
Build log is attached.

Regards,
Jurica

From: Ed J via RT [bug-inline-j...@rt.cpan.org]
Sent: 21 November 2014 16:39
Cc: Jurica Stanojkovic; 754...@bugs.debian.org; jurica.stanojko...@rt-rk.com; 
gre...@debian.org
Subject: [rt.cpan.org #98683] libinline-java-perl: FTBFS on mips: test suite 
issues

URL: https://rt.cpan.org/Ticket/Display.html?id=98683 

Please could you try the new 0.56 rather than stick with 0.53?
touch debian/stamp-copyright-check
touch debian/stamp-upstream-cruft
(cd .  /usr/bin/perl Makefile.PL NOECHO=  INSTALLDIRS=vendor )

Welcome to the Inline::Java installation procedure.

Using /usr/lib/jvm/default-java as J2SDK directory.

Default J2SDK for Inline::Java will be '/usr/lib/jvm/default-java'.
See module documentation for information on how to use a different J2SDK
or change this default value.

Checking if your kit is complete...
Looks good

Inline::Java can use a JNI extension that allows the Java Virtual Machine
(JVM) to be dynamically linked with Perl instead of running as a separate
process. The use of this extension is optional, and building it still
allows Inline::Java to run the JVM in the default (separate process)
fashion.
Note: You need a C compiler to build the extension.
Do you wish to build the JNI extension? [y] y

Building JNI extension.

1) /usr/lib/jvm/default-java/include
2) /usr/lib/jvm/default-java/include/linux
Please select from the above list which 'jni_md.h' to use: [1] 1

1) /usr/lib/jvm/default-java/jre/lib/mips/jamvm
2) /usr/lib/jvm/default-java/jre/lib/mips/server
Please select from the above list which 'libjvm.so' to use: [2] 2

Building with:
  /usr/lib/jvm/default-java/include/jni.h
  /usr/lib/jvm/default-java/include/jni_md.h
  /usr/lib/jvm/default-java/jre/lib/mips/server/libjvm.so

Note: In order for Inline::Java to use the JNI extension, you will need to
use the JNI configuration option or set the PERL_INLINE_JAVA_JNI environment
variable to a true value. You will also need to add the following directories
to your LD_LIBRARY_PATH environment variable:
  /usr/lib/jvm/default-java/jre/lib/ext
  /usr/lib/jvm/default-java/jre/lib/mips/jli
  /usr/lib/jvm/default-java/jre/lib/mips/server
  /usr/lib/jvm/default-java/jre/lib/mips
See README.JNI for more information.

The PerlInterpreter extension allows Inline::Java to be loaded directly from
Java using an embedded Perl interpreter. It is still EXPERIMENTAL and 
may not build or work properly on all platforms. See documentation for 
more details.
Do you wish to build the PerlInterpreter extension? [n] n

Generating a Unix-style Makefile
Writing Makefile for Inline::Java::JNI
Writing MYMETA.yml and MYMETA.json
Generating a Unix-style Makefile
Writing Makefile for Inline::Java
Writing MYMETA.yml and MYMETA.json

You can continue the installation with the following commands:
  % make
  % make test
  % make install
/usr/bin/make  -C . OPTIMIZE=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_FORTIFY_SOURCE=2 LDDLFLAGS=-shared -L/usr/local/lib -fstack-protector -Wl,-z,relro  all
make[1]: Entering directory '/«PKGBUILDDIR»'
/usr/lib/jvm/default-java/bin/javac -deprecation -g -d Java/classes Java/sources/org/perl/inline/java/*.java
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/usr/lib/jvm/default-java/bin/jar cf Java/InlineJavaServer.jar -C Java/classes org -C Java/classes InlineJava.properties
/usr/lib/jvm/default-java/bin/jar cf Java/InlineJavaUser.jar -C Java/classes InlineJavaUserClassLink.class
/usr/bin/perl -MExtUtils::Command -e 'mkpath' -- blib/lib/Inline
chmod 755 blib/lib/Inline
touch blib/lib/Inline/.exists
/usr/bin/perl -MExtUtils::Command -e 'mkpath' -- blib/arch
chmod 755 blib/arch
touch blib/arch/.exists
/usr/bin/perl -MExtUtils::Command -e 'mkpath' -- blib/lib/auto/Inline/Java
chmod 755 blib/lib/auto/Inline/Java
touch blib/lib/auto/Inline/Java/.exists
/usr/bin/perl -MExtUtils::Command -e 'mkpath' -- blib/arch/auto/Inline/Java
chmod 755 blib/arch/auto/Inline/Java
touch blib/arch/auto/Inline/Java/.exists
/usr/bin/perl -MExtUtils::Command -e 'mkpath' -- blib/bin
chmod 755 blib/bin
touch blib/bin/.exists
/usr/bin/perl -MExtUtils::Command -e 'mkpath' -- blib/script
chmod 755 blib/script
touch blib/script/.exists
/usr/bin/perl -MExtUtils::Command -e 'mkpath' -- blib/man1
chmod 755 blib/man1
touch blib/man1/.exists
/usr/bin/perl -MExtUtils::Command -e 'mkpath' -- blib/man3
chmod 755 blib/man3
touch blib/man3/.exists
true
true
/usr/bin/perl -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''blib/lib/auto'\'', q[], '\''755'\'')' -- \
  Java.pm blib/lib/Inline/Java.pm \
  Java.pod blib/lib/Inline/Java.pod \
  Java/InlineJavaServer.jar blib/lib/Inline/Java/InlineJavaServer.jar \
  Java/InlineJavaUser.jar blib/lib/Inline/Java/InlineJavaUser.jar 
cp Java/InlineJavaUser.jar blib

Bug#754755: [rt.cpan.org #98683] libinline-java-perl: FTBFS on mips: test suite issues

2014-11-21 Thread Jurica Stanojkovic
Hello,

Firstly, I have applied proposed patch.

patch for Java/JNI.xs:

--- a/Java/JNI.xs
+++ b/Java/JNI.xs
@@ -48,7 +48,7 @@
if ((*(env))-ExceptionCheck(env)){
(*(env))-ExceptionDescribe(env) ;
(*(env))-ExceptionClear(env) ;
-   croak(msg) ;
+   croak(%s, msg) ;
}
 }

Secondly, I have tried to replace CDBS debian/rules in package 
libinline-java-perl file with the folowing debian/rules:

debian/rules:
---
#!/usr/bin/make -f
export PERL_MM_USE_DEFAULT := 1
%:
dh $@
override_dh_auto_configure:
DESTDIR=$$(pwd)/
perl Makefile.PL J2SDK=/usr/lib/jvm/default-java
override_dh_usrlocal:
---

With these changes package does build successfully (using sbuild) on mips, 
mipsel, and i386.

We are not sure why this issue is happening only on mips and not on mipsel, 
i386, etc.
I have noticed that package is also FTBFS on sparc with similar error.
Could somebody please test this on sparc?

Thank you!

Regards,
Jurica




Bug#750857: mod-gnutls_0.6-1.1 FTBFS

2014-11-12 Thread Jurica Stanojkovic
Control: tags -1 + patch

Hello,

I am sending a new patch for this issue.
Patch that I have sent earlier should be dropped (test-ip.patch).

I have also found that the package is failing to build if a machine on which it 
is being built is slow or under heavy load.
Therefore I have increased TEST_QUERY_DELAY and TEST_GAP timers.

Regards,
Jurica



--- mod-gnutls-0.6.orig/t/Makefile
+++ mod-gnutls-0.6/t/Makefile
@@ -6,13 +6,13 @@
 # simple configuration choices.
 
 export TEST_HOST ?= localhost
-export TEST_IP ?= ::1
+export TEST_IP ?= ip6-loopback
 # chosen at random:
 export TEST_PORT ?= 9932
 export MSVA_PORT ?= 9933
 
-export TEST_GAP ?= 1.5
-export TEST_QUERY_DELAY ?= 2
+export TEST_GAP ?= 4
+export TEST_QUERY_DELAY ?= 5
 
 all: setup.done
 	./runtests


Bug#750857: NMU debdiff for mod-gnutls_0.6-1.1

2014-10-29 Thread Jurica Stanojkovic
Hello,

I am preparing a patch for this.

Regards,
Jurica


Bug#754755: libinline-java-perl: FTBFS on mips: test suite issues

2014-10-29 Thread Jurica Stanojkovic
Hello,

I have tried to build libinline-java-perl_0.53-3 from Debian on mips.
Package FTBFS on mips.

But same package (libinline-java-perl_0.53-3) can be built from same source 
manually with following commands:
  perl Makefile.PL J2SDK=/usr/
  make
  make test

If built manually all tests pass on mips.

Can someone please help with this issue?

Thank you!

Regards,
Jurica


Bug#766171: package profanity_0.4.4-1 FTBFS on big endian

2014-10-21 Thread Jurica Stanojkovic
Package: profanity
Version: 0.4.4-1
Severity: important
Tags: sid + patch
Justification: FTBFS
User: debian-mips-dev-disc...@lists.alioth.debian.org


Hello,

Package profanity_0.4.4-1 FTBFS on big endian architectures.
https://buildd.debian.org/status/package.php?p=profanitysuite=sid

I have attached a patch resolving this issue.

Thank you!

Regards,
Jurica
--- profanity-0.4.4.orig/src/tools/p_sha1.c
+++ profanity-0.4.4/src/tools/p_sha1.c
@@ -107,13 +107,7 @@ void P_SHA1_Transform(uint32_t state[5],
 
 /* blk0() and blk() perform the initial expand. */
 /* I got the idea of expanding during the round function from SSLeay */
-/* FIXME: can we do this in an endian-proof way? */
-#ifdef WORDS_BIGENDIAN
-#define blk0(i) block-l[i]
-#else
-#define blk0(i) (block-l[i] = (rol(block-l[i],24)0xFF00FF00) \
-|(rol(block-l[i],8)0x00FF00FF))
-#endif
+#define blk0(i) (block-l[i] = (ntohl(block-l[i])))
 #define blk(i) (block-l[i15] = rol(block-l[(i+13)15]^block-l[(i+8)15] \
 ^block-l[(i+2)15]^block-l[i15],1))
 


Bug#756104: binary removal mrpt

2014-10-19 Thread Jurica Stanojkovic
Hello,

We was able to build package on local mipsel machine using sbuild.

Package mrpt_1:1.2.2-1.1 was built successfully on mipsel.

Could you please try to build again this package on different mipsel build 
machine that have more resources.

Thank you!

Regards,
Jurica





Bug#765355: package libbitcoin_2.0-2 FTBFS on big endian

2014-10-14 Thread Jurica Stanojkovic
Package: libbitcoin
Version: 2.0-2
Severity: important
Tags: sid + patch
Justification: FTBFS
User: debian-mips-dev-disc...@lists.alioth.debian.org

Hello,

Package libbitcoin_2.0-2 FTBFS on big endian architectures.
https://buildd.debian.org/status/package.php?p=libbitcoinsuite=sid

with following error:

/bin/bash ../libtool  --tag=CXX   --mode=compile g++ 
-DPACKAGE_NAME=\libbitcoin\ -DPACKAGE_TARNAME=\libbitcoin\ 
-DPACKAGE_VERSION=\1.0.10\ -DPACKAGE_STRING=\libbitcoin\ 1.0.10\ 
-DPACKAGE_BUGREPORT=\a...@unsystem.net\ -DPACKAGE_URL=\\ -DSTDC_HEADERS=1 
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 
-DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 
-D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 -DPACKAGE=\libbitcoin\ 
-DVERSION=\1.0.10\ -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\.libs/\ 
-DHAVE_BOOST=/\*\*/ -I.  -I./../include -D_FORTIFY_SOURCE=2 -ggdb -g3 -Wall 
-Wno-missing-braces -pedantic -Wextra -fstack-protector-all -DDEBUG -g -O2 
-Wformat -Werror=format-security -Wall -std=c++11 -c -o satoshi_serialize.lo 
satoshi_serialize.cpp
libtool: compile:  g++ -DPACKAGE_NAME=\libbitcoin\ 
-DPACKAGE_TARNAME=\libbitcoin\ -DPACKAGE_VERSION=\1.0.10\ 
-DPACKAGE_STRING=\libbitcoin 1.0.10\ 
-DPACKAGE_BUGREPORT=\a...@unsystem.net\ -DPACKAGE_URL=\\ -DSTDC_HEADERS=1 
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 
-DHAVE_UNISTD_H=1 -D__EXTENSIONS__=1 -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 
-D_POSIX_PTHREAD_SEMANTICS=1 -D_TANDEM_SOURCE=1 -DPACKAGE=\libbitcoin\ 
-DVERSION=\1.0.10\ -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\.libs/\ 
-DHAVE_BOOST=/**/ -I. -I./../include -D_FORTIFY_SOURCE=2 -ggdb -g3 -Wall 
-Wno-missing-braces -pedantic -Wextra -fstack-protector-all -DDEBUG -g -O2 
-Wformat -Werror=format-security -Wall -std=c++11 -c satoshi_serialize.cpp  
-fPIC -DPIC -o .libs/satoshi_serialize.o
In file included from ./../include/bitcoin/satoshi_serialize.hpp:24:0,
 from satoshi_serialize.cpp:20:
./../include/bitcoin/format.hpp:49:27: error: #elif with no expression
 #elif BOOST_BIG_ENDIAN
   ^
./../include/bitcoin/format.hpp:52:10: error: #error Endian isn't defined!
 #error Endian isn't defined!
  ^
./../include/bitcoin/format.hpp:70:27: error: #elif with no expression
 #elif BOOST_BIG_ENDIAN
   ^
./../include/bitcoin/format.hpp:73:10: error: #error Endian isn't defined!
 #error Endian isn't defined!
  ^
In file included from ./../include/bitcoin/satoshi_serialize.hpp:29:0,
 from satoshi_serialize.cpp:20:
./../include/bitcoin/utility/serializer.hpp:348:27: error: #elif with no 
expression
 #elif BOOST_BIG_ENDIAN
   ^
./../include/bitcoin/utility/serializer.hpp:351:10: error: #error Endian isn't 
defined!
 #error Endian isn't defined!
  ^
make[2]: *** [satoshi_serialize.lo] Error 1

This issue is resolved with the patch attached.

Regards,
Jurica
--- libbitcoin-2.0.orig/include/bitcoin/format.hpp
+++ libbitcoin-2.0/include/bitcoin/format.hpp
@@ -46,7 +46,7 @@ T cast_chunk(data_chunk chunk, bool reve
 {
 #ifdef BOOST_LITTLE_ENDIAN
 // do nothing
-#elif BOOST_BIG_ENDIAN
+#elif defined BOOST_BIG_ENDIAN
 reverse = !reverse;
 #else
 #error Endian isn't defined!
@@ -67,7 +67,7 @@ data_chunk uncast_type(T value, bool rev
 // TODO Future versions of boost will have boost::native_to_little(value);
 #ifdef BOOST_LITTLE_ENDIAN
 // do nothing
-#elif BOOST_BIG_ENDIAN
+#elif defined BOOST_BIG_ENDIAN
 reverse = !reverse;
 #else
 #error Endian isn't defined!
--- libbitcoin-2.0.orig/include/bitcoin/utility/serializer.hpp
+++ libbitcoin-2.0/include/bitcoin/utility/serializer.hpp
@@ -345,7 +345,7 @@ private:
 check_distance(begin, end, byte_array.size());
 #ifdef BOOST_LITTLE_ENDIAN
 // do nothing
-#elif BOOST_BIG_ENDIAN
+#elif defined BOOST_BIG_ENDIAN
 reverse = !reverse;
 #else
 #error Endian isn't defined!


Bug#764740: qrouter: FTBFS on various architectures recompile with -fPIC

2014-10-13 Thread Jurica Stanojkovic
Control: tags -1 + patch

Hello,

The following patch resolve this issue:

--- qrouter-1.3.1/debian/rules  2014-09-21 11:30:27.0 +0100
+++ qrouter-1.3.1/debian/rules  2014-10-13 08:09:11.0 +0100
@@ -3,6 +3,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1

+export CPPFLAGS += -fPIC
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

 %:

Regards,
Jurica


Bug#750857: FTBFS on many architectures, test suite errors

2014-09-29 Thread Jurica Stanojkovic
Hello,

I have found while testing package on local build machine that package is
failing due to configuration in /etc/hosts

ip6-loopback was configured with
127.0.0.1   localhost ip6-localhost ip6-loopback
after replacing that with following
::1   localhost ip6-localhost ip6-loopback
package was built successfully without changes to source.

I do not know how is this configured in /etc/hosts on official buildd for 
architectures that fail to build.
I do not have access to those boards.



Also if following patch is added to a source there is no need for changes in 
/etc/hosts:

--- mod-gnutls-0.6.orig/t/Makefile
+++ mod-gnutls-0.6/t/Makefile
@@ -6,7 +6,7 @@
 # simple configuration choices.

 export TEST_HOST ?= localhost
-export TEST_IP ?= ::1
+export TEST_IP ?= 127.0.0.1
 # chosen at random:
 export TEST_PORT ?= 9932
 export MSVA_PORT ?= 9933

but I am not sure that this is a good solution.

Regards,
Jurica



Bug#762307: grub2: FTBFS on mipsel: objcopy:none_decompress.img[.text]: File truncated

2014-09-26 Thread Jurica Stanojkovic
Hello,

I have attached a new patch.
It is tested on mipsel and i386.

--- grub2-2.02~beta2.orig/gentpl.py
+++ grub2-2.02~beta2/gentpl.py
@@ -753,7 +753,7 @@ def image(defn, platform):
 if test x$(TARGET_APPLE_LINKER) = x1; then \
   $(MACHO2IMG) $ $@; \
 else \
-  $(TARGET_OBJCOPY) $( + cname(defn) + _OBJCOPYFLAGS) --strip-unneeded 
-R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn -R 
.note.gnu.gold-version $ $@; \
+  $(TARGET_OBJCOPY) $( + cname(defn) + _OBJCOPYFLAGS) --strip-unneeded 
-R .MIPS.abiflags -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R 
.rel.dyn -R .note.gnu.gold-version $ $@; \
 fi
 )


Thank you!
Jurica
--- grub2-2.02~beta2.orig/gentpl.py
+++ grub2-2.02~beta2/gentpl.py
@@ -753,7 +753,7 @@ def image(defn, platform):
 if test x$(TARGET_APPLE_LINKER) = x1; then \
   $(MACHO2IMG) $ $@; \
 else \
-  $(TARGET_OBJCOPY) $( + cname(defn) + _OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn -R .note.gnu.gold-version $ $@; \
+  $(TARGET_OBJCOPY) $( + cname(defn) + _OBJCOPYFLAGS) --strip-unneeded -R .MIPS.abiflags -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn -R .note.gnu.gold-version $ $@; \
 fi
 )
 


Bug#762307: grub2: FTBFS on mipsel: objcopy:none_decompress.img[.text]: File truncated

2014-09-25 Thread Jurica Stanojkovic
Control: tags -1 + patch

Hello,

I have tried to build package on mipsel
with change that  Colin Watson has suggested (-R .MIPS.abiflags).

With that change package does build successfully on mipsel.
Patch resolving this issue is attached.

Regards,
Jurica
--- grub2-2.02~beta2.orig/gentpl.py
+++ grub2-2.02~beta2/gentpl.py
@@ -753,7 +753,11 @@ def image(defn, platform):
 if test x$(TARGET_APPLE_LINKER) = x1; then \
   $(MACHO2IMG) $ $@; \
 else \
-  $(TARGET_OBJCOPY) $( + cname(defn) + _OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn -R .note.gnu.gold-version $ $@; \
+  case $(target_cpu)-$(target_vendor) in \
+mipsel-*) $(TARGET_OBJCOPY) $( + cname(defn) + _OBJCOPYFLAGS) --strip-unneeded -R .MIPS.abiflags -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn -R .note.gnu.gold-version $ $@; ;; \
+mips-*) $(TARGET_OBJCOPY) $( + cname(defn) + _OBJCOPYFLAGS) --strip-unneeded -R .MIPS.abiflags -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn -R .note.gnu.gold-version $ $@; ;; \
+*) $(TARGET_OBJCOPY) $( + cname(defn) + _OBJCOPYFLAGS) --strip-unneeded -R .note -R .comment -R .note.gnu.build-id -R .reginfo -R .rel.dyn -R .note.gnu.gold-version $ $@; ;; \
+  esac \
 fi
 )
 


Bug#758725: package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips*

2014-09-12 Thread Jurica Stanojkovic
Hi Jose Luis,

I can confirm that the head of git (from Sep, 10, 2014) has been built 
successfully on mips and mipsel.
All tests executed successfully.
Please note that changes from Sep 11 and 12 have not been included in this and 
that I have set BUILD_ASSIMP=OFF for mips and mipsel.
 
Could you please prepare new version of mrpt package for Debian?

Thank you!
Jurica

From: Jose Luis Blanco [joseluisblan...@gmail.com]
Sent: 09 September 2014 02:18
To: Jurica Stanojkovic
Cc: 758...@bugs.debian.org
Subject: Re: Bug#758725: package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips*

Thanks for the investigation!

Following that line, I think I have solved all de-serialization
problems in GIT head: https://github.com/jlblancoc/mrpt/commits/master
The two relevant patches are:
1) 
https://github.com/jlblancoc/mrpt/commit/7b1536c7f43ddc9cc949407f71fde0c8db0ecf5b
2) 
https://github.com/jlblancoc/mrpt/commit/d7fe726eb896b1a9d453e3b2d53252b25dbc3918

Let me know if this finally solves the issue.

JL


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#758725: package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips*

2014-09-08 Thread Jurica Stanojkovic
Hello Jose Luis,

On big endian. while executing MonteCarlo2D.RunSampleDataset test first problem 
is found here:
https://github.com/jlblancoc/mrpt/blob/master/libs/base/src/utils/CStream.cpp
After the line 405 version_old have value that is in wrong endian format 
(little endian).

Second problem is here:
https://github.com/jlblancoc/mrpt/blob/master/libs/maps/src/maps/COccupancyGridMap2D_insert.cpp
After the line 168 curRange have value that is in wrong endian format (little 
endian).

For now I have used mrpt::utils::reverseBytesInPlace( ) to fix wrong endian 
values and I am trying to investigate problem further.

Afrer resolving those problems  MonteCarlo2D.RunSampleDataset test fail with 
message:
*Warning: Test failed. Will give it another chance, since after all it's 
nondeterministic!

Can you please look and comment at these issues?

Thank you!
Jurica


From: Jurica Stanojkovic
Sent: 27 August 2014 17:36
To: Jose Luis Blanco
Cc: 758...@bugs.debian.org
Subject: RE: Bug#758725: package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips*

I have enabled and run test TEST(ReactiveNavTests, LoadNavLogFile) on mips big 
endian.
Test does not fail on mips.

Maybe, this test could be available for big endian arch as well.

Regards,
Jurica


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#758725: package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips*

2014-08-27 Thread Jurica Stanojkovic
Hello,

I can confirm that the current head of git (taken on monday) has been built 
successfully on mips as well.
All tests executed without an error.
TEST(ReactiveNavTests, LoadNavLogFile) and TEST(MonteCarlo2D, RunSampleDataset) 
were skipped on big endian.
Also TEST(Synch, CSemaphore_named ) has returned the mesage:
*Skipping test* It seems the kernel doesn't support named semaphores in this 
platform.

Regards,
Jurica


From: Jurica Stanojkovic
Sent: 25 August 2014 15:52
To: Jose Luis Blanco
Cc: 758...@bugs.debian.org
Subject: RE: Bug#758725: package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips*

 Good! Just for curiosity: are all other unit tests passing?

I have re-run tests again to be sure and they all pass.
TEST(ReactiveNavTests, LoadNavLogFile) and TEST(MonteCarlo2D, RunSampleDataset) 
are skipped on big endian.
Also TEST(Synch, CSemaphore_named ) has returned the mesage:
*Skipping test* It seems the kernel doesn't support named semaphores in this 
platform.

 It would be great if you could confirm that the current head of git
master is building correctly in mips...

It has been built correctly on mipsel over weekend.
On mips I am trying to build package.
It will take more time on mips, because mips machine that I use is slower then 
the mipsel one.

Regards,
Jurica


From: Jose Luis Blanco [joseluisblan...@gmail.com]
Sent: 22 August 2014 17:58
To: Jurica Stanojkovic
Cc: 758...@bugs.debian.org
Subject: Re: Bug#758725: package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips*

 With these changes I was able to build package on mips*

Good! Just for curiosity: are all other unit tests passing? Because
that means that de-serialization is actually working (it's used in
other tests, like in ReactiveNavTests.LoadNavLogFile).

I have finally solved the pragma pack problem properly, with these 2
additional commits:
4) 
https://github.com/jlblancoc/mrpt/commit/cd4878874b930e151deb6d89577c215c687b80b3
5) 
https://github.com/jlblancoc/mrpt/commit/b52d65b5a0bcc552e7a7c6d420f30be623d8fd38

It would be great if you could confirm that the current head of git
master is building correctly in mips...
I guess it may take a long time to build in mips, so thank you very
much for your tests!!

Cheers,
JL


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#758725: package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips*

2014-08-27 Thread Jurica Stanojkovic
I have enabled and run test TEST(ReactiveNavTests, LoadNavLogFile) on mips big 
endian.
Test does not fail on mips.

Maybe, this test could be available for big endian arch as well.

Regards,
Jurica


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#758725: package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips*

2014-08-25 Thread Jurica Stanojkovic
 Good! Just for curiosity: are all other unit tests passing?

I have re-run tests again to be sure and they all pass.
TEST(ReactiveNavTests, LoadNavLogFile) and TEST(MonteCarlo2D, RunSampleDataset) 
are skipped on big endian.
Also TEST(Synch, CSemaphore_named ) has returned the mesage: 
*Skipping test* It seems the kernel doesn't support named semaphores in this 
platform.

 It would be great if you could confirm that the current head of git
master is building correctly in mips...

It has been built correctly on mipsel over weekend.
On mips I am trying to build package.
It will take more time on mips, because mips machine that I use is slower then 
the mipsel one.

Regards,
Jurica


From: Jose Luis Blanco [joseluisblan...@gmail.com]
Sent: 22 August 2014 17:58
To: Jurica Stanojkovic
Cc: 758...@bugs.debian.org
Subject: Re: Bug#758725: package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips*

 With these changes I was able to build package on mips*

Good! Just for curiosity: are all other unit tests passing? Because
that means that de-serialization is actually working (it's used in
other tests, like in ReactiveNavTests.LoadNavLogFile).

I have finally solved the pragma pack problem properly, with these 2
additional commits:
4) 
https://github.com/jlblancoc/mrpt/commit/cd4878874b930e151deb6d89577c215c687b80b3
5) 
https://github.com/jlblancoc/mrpt/commit/b52d65b5a0bcc552e7a7c6d420f30be623d8fd38

It would be great if you could confirm that the current head of git
master is building correctly in mips...
I guess it may take a long time to build in mips, so thank you very
much for your tests!!

Cheers,
JL


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#758725: package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips*

2014-08-22 Thread Jurica Stanojkovic
I will try to fix de-serialization problems on big endian.

For now i have tried to build package with your patches 
1) 
https://github.com/jlblancoc/mrpt/commit/9a878c0950edd8ca7de6f4584f920c4e0db05ecc
2) 
https://github.com/jlblancoc/mrpt/commit/289498fc34703c2fcf6b61e72c3311144e5fb570
and ifdef workaround
3) 
https://github.com/jlblancoc/mrpt/commit/c06ed1c384ba2e719c52f65a1a49bddcf7d261e5
and the patch
4) mips-patch.diff (attached in this mail)

With these changes I was able to build package on mips*

For strict alignment, as far as I know, there is no macro that could be used 
for detecting if a strict alignment is necessary.
I think that sparc also has alignment rules. 
(maybe the best way to be sure about this is to ask porters for other 
architectures to help with this issue).

Regards,
Jurica


From: Jose Luis Blanco [joseluisblan...@gmail.com]
Sent: 21 August 2014 19:11
To: Jurica Stanojkovic
Cc: 758...@bugs.debian.org
Subject: Re: Bug#758725: package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips*

So, the #ifdef workaround was incorrectly placed, to start with!

This patch will solve it:
https://github.com/jlblancoc/mrpt/commit/c06ed1c384ba2e719c52f65a1a49bddcf7d261e5

But obviously, that's not the ideal solution because that's resigning
trying to fix de-serialization problems!

I didn't know that issue about #pragma pack, it will be a problem.
Let me check it more in depth, but I'm sure the struct pack'ing is
taken for granted in some parts of the code. Actually, there's even
one unit test checking it...

Please, let me know whatever other unit tests don't pass in MIPS while
I think what to do with the pragmas.

BTW: Is there any macro to detect architectures with strict alignment rules?

JL
diff -upNr mrpt-1.2.1-old/libs/base/include/mrpt/math/lightweight_geom_data.h mrpt-1.2.1/libs/base/include/mrpt/math/lightweight_geom_data.h
--- mrpt-1.2.1-old/libs/base/include/mrpt/math/lightweight_geom_data.h	2014-07-10 16:18:40.0 +
+++ mrpt-1.2.1/libs/base/include/mrpt/math/lightweight_geom_data.h	2014-08-01 17:40:08.0 +
@@ -25,7 +25,9 @@ namespace math	{
 	  * @{ */
 
 	//Pragma defined to ensure no structure packing
+#ifndef __mips__
 #pragma pack(push,1)
+#endif
 	//Set of typedefs for lightweight geometric items.
 	/**
 	  * Lightweight 2D point. Allows coordinate access using [] operator.
@@ -238,7 +240,9 @@ namespace math	{
 		 static size_t size() { return 3; }
 	};
 
+#ifndef __mips__
 #pragma pack(pop) // NOTE: Don't force TPoint3Df to be mem aligned (may break CPU mem access alignment in ARM)
+#endif
 
 	/** Lightweight 3D point (float version).
 	  * \sa mrpt::poses::CPoint3D, mrpt::math::TPoint3D
@@ -261,7 +265,9 @@ namespace math	{
 
 	};
 
+#ifndef __mips__
 #pragma pack(push,1)  //Pragma defined to ensure no structure packing
+#endif
 	/**
 	  * Lightweight 3D point. Allows coordinate access using [] operator.
 	  * \sa mrpt::poses::CPoint3D, mrpt::math::TPoint3Df
@@ -550,7 +556,9 @@ namespace math	{
 		 void fromString(const std::string s);
 		 static size_t size() { return 7; }
 	};
+#ifndef __mips__
 #pragma pack(pop)
+#endif
 
 	// Text streaming functions:
 	std::ostream BASE_IMPEXP  operator  (std::ostream o, const TPoint2D  p);
@@ -621,7 +629,9 @@ namespace math	{
 	struct BASE_IMPEXP TObject3D;
 
 	//Pragma defined to ensure no structure packing
+#ifndef __mips__
 #pragma pack(push,1)
+#endif
 	/**
 	  * 2D segment, consisting of two points.
 	  * \sa TSegment3D,TLine2D,TPolygon2D,TPoint2D
@@ -761,7 +771,9 @@ namespace math	{
 
 		bool operator(const TSegment3D s) const;
 	};
+#ifndef __mips__
 #pragma pack(pop)
+#endif
 
 	inline bool operator==(const TSegment2D s1,const TSegment2D s2)	{
 		return (s1.point1==s2.point1)(s1.point2==s2.point2);


Bug#758725: package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips*

2014-08-21 Thread Jurica Stanojkovic
Hi Jose Luis,

Thank you for the quick response!

I can confirm that patches that you have proposed have resolved build issue on 
i386.

I am working on resolving build issues for mips and mipsel.

On mips and mipsel I have looked into
https://github.com/jlblancoc/mrpt/blob/master/libs/slam/src/slam/CMonteCarloLocalization2D_unittest.cpp

function void run_test_pf_localization(CPose2D meanPose, CMatrixDouble33 cov) 
on big endian is not doing anything,
but run_test_pf_localization is used in TEST(MonteCarlo2D, RunSampleDataset). 

#if MRPT_IS_BIG_ENDIAN
MRPT_TODO(Debug this issue in big endian platforms)
return; // Skip this test for now
#endif

That is causing the following error:
https://buildd.debian.org/status/fetch.php?pkg=mrptarch=mipsver=1%3A1.2.1-1stamp=1406312477

I will look further into function run_test_pf_localization.

There is also .h file:
https://github.com/jlblancoc/mrpt/blob/master/libs/base/include/mrpt/math/lightweight_geom_data.h

containing #pragma pack(push,1) directive for structures that have float and 
double arguments.

I think that this is causing unaligned access on architectures with strict 
alignment rules:
https://buildd.debian.org/status/fetch.php?pkg=mrptarch=mipselver=1%3A1.2.1-1stamp=1406169915

For mips* architecture double should be 8 byte aligned and float should be 4 
byte aligned.

Can we disable #pragma pack(push,1) in this file for architectures with 
strict alignment rules?

Any comments are welcome.

Thanks!
Jurica






From: Jose Luis Blanco [joseluisblan...@gmail.com]
Sent: 21 August 2014 01:44
To: Jurica Stanojkovic; 758...@bugs.debian.org
Subject: Re: Bug#758725: package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips*

Hi Jurica,

Please, hopefully these two patches can solve all named semaphore errors:

1) 
https://github.com/jlblancoc/mrpt/commit/9a878c0950edd8ca7de6f4584f920c4e0db05ecc
2) 
https://github.com/jlblancoc/mrpt/commit/289498fc34703c2fcf6b61e72c3311144e5fb570

Cheers,
JL


On Wed, Aug 20, 2014 at 7:40 PM, Jose Luis Blanco
joseluisblan...@gmail.com wrote:
 Thanks a lot for your interest in fixing this, Jurica!
 I'm the upstream maintainer of mrpt, and was becoming desperate trying
 to debug in mips* for my lack of experience in cross-buidling, qemu,
 etc.

 So, on the build errors in mips (and other big-endian platforms): I
 *suspect* that some errors may be caused by missing byte-reordering in
 serialization, via mrpt::utils::CStream and/or the affected classes
 methods named readFromStream() and writeToStream(), so that's where
 you could first look at while debugging in mips*. At least, that's
 what I suspect, but couldn't check it because can't debug in those
 platforms! :-(

 About the other errors in this present bug: Yes, I'll study them.
 In the meanwhile, you can avoid them by, instead of running make
 test, running:

  tests/test_mrpt_base --gtest_filter=-*CSemaphore*

 to run all tests in the lib mrpt-base, excepting those that give you problems.
 For the other test sets, you can also try, for example:

 make run_tests_mrpt_opengl

 and so on. Hit TAB after make run_tests_mrpt_ to see the full list.

 Hope it helps!

 JL

 On Wed, Aug 20, 2014 at 6:12 PM, Jurica Stanojkovic
 jurica.stanojko...@imgtec.com wrote:
 Package: mrpt
 Version: 1:1.2.1-1
 Severity: serious
 Tags: sid
 Justification: FTBFS
 User: debian-mips-dev-disc...@lists.alioth.debian.org

 Hello,

 package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips* with the following
 message, but was previously built successfully on i386, amd64:

 i386 log:

 [--] 5 tests from Synch
 [ RUN  ] Synch.CSemaphore_named_6t_1init
 Exception in [auxiliary_thread_launcher_LIN/WIN]!!!:


  === MRPT EXCEPTION =
 mrpt::synch::CSemaphore::CSemaphore(unsigned int, unsigned int, const
 string), line 81:
 Creating semaphore (name='mrpt-demo-sem1') raised error: Function not
 implemented
 mrpt::synch::CSemaphore::CSemaphore(unsigned int, unsigned int, const
 string), line 87:
 /«PKGBUILDDIR»/libs/base/src/synch/CCriticalSection_unittest.cpp:53: Failure
 Value of: false
   Actual: false
 Expected: true
 Thread didn't finished in timeout! While testing: CSemaphore named:
 #threads=6, init count=1
 [  FAILED  ] Synch.CSemaphore_named_6t_1init (5000 ms)
 [ RUN  ] Synch.CSemaphore_named_10t_5init
 Exception in [auxiliary_thread_launcher_LIN/WIN]!!!:


  === MRPT EXCEPTION =
 mrpt::synch::CSemaphore::CSemaphore(unsigned int, unsigned int, const
 string), line 81:
 Creating semaphore (name='mrpt-demo-sem1') raised error: Function not
 implemented
 mrpt::synch::CSemaphore::CSemaphore(unsigned int, unsigned int, const
 string), line 87:
 /«PKGBUILDDIR»/libs/base/src/synch/CCriticalSection_unittest.cpp:53: Failure
 Value of: false
   Actual: false
 Expected: true
 Thread didn't finished in timeout! While testing: CSemaphore named:
 #threads=10, init count=5
 [  FAILED  ] Synch.CSemaphore_named_10t_5init (5000 ms

Bug#758725: package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips*

2014-08-20 Thread Jurica Stanojkovic
Package: mrpt
Version: 1:1.2.1-1
Severity: serious
Tags: sid
Justification: FTBFS
User: debian-mips-dev-disc...@lists.alioth.debian.org

Hello,

package mrpt_1:1.2.1-1 FTBFS on i386, amd64, mips* with the following message, 
but was previously built successfully on i386, amd64:

i386 log:

[--] 5 tests from Synch
[ RUN  ] Synch.CSemaphore_named_6t_1init
Exception in [auxiliary_thread_launcher_LIN/WIN]!!!:


 === MRPT EXCEPTION =
mrpt::synch::CSemaphore::CSemaphore(unsigned int, unsigned int, const string), 
line 81:
Creating semaphore (name='mrpt-demo-sem1') raised error: Function not 
implemented
mrpt::synch::CSemaphore::CSemaphore(unsigned int, unsigned int, const string), 
line 87:
/«PKGBUILDDIR»/libs/base/src/synch/CCriticalSection_unittest.cpp:53: Failure
Value of: false
  Actual: false
Expected: true
Thread didn't finished in timeout! While testing: CSemaphore named: #threads=6, 
init count=1
[  FAILED  ] Synch.CSemaphore_named_6t_1init (5000 ms)
[ RUN  ] Synch.CSemaphore_named_10t_5init
Exception in [auxiliary_thread_launcher_LIN/WIN]!!!:


 === MRPT EXCEPTION =
mrpt::synch::CSemaphore::CSemaphore(unsigned int, unsigned int, const string), 
line 81:
Creating semaphore (name='mrpt-demo-sem1') raised error: Function not 
implemented
mrpt::synch::CSemaphore::CSemaphore(unsigned int, unsigned int, const string), 
line 87:
/«PKGBUILDDIR»/libs/base/src/synch/CCriticalSection_unittest.cpp:53: Failure
Value of: false
  Actual: false
Expected: true
Thread didn't finished in timeout! While testing: CSemaphore named: 
#threads=10, init count=5
[  FAILED  ] Synch.CSemaphore_named_10t_5init (5000 ms)
[ RUN  ] Synch.CriticalSections_Simple
[   OK ] Synch.CriticalSections_Simple (1 ms)
[ RUN  ] Synch.CriticalSections_NoDoubleEnter
[   OK ] Synch.CriticalSections_NoDoubleEnter (1 ms)
[ RUN  ] Synch.CriticalSections_Multi
[   OK ] Synch.CriticalSections_Multi (1557 ms)
[--] 5 tests from Synch (11560 ms total)

...

[--] Global test environment tear-down
[==] 138 tests from 23 test cases ran. (11643 ms total)
[  PASSED  ] 136 tests.
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] Synch.CSemaphore_named_6t_1init
[  FAILED  ] Synch.CSemaphore_named_10t_5init

 2 FAILED TESTS
make[4]: *** [tests/CMakeFiles/run_tests_mrpt_base] Error 1
tests/CMakeFiles/run_tests_mrpt_base.dir/build.make:52: recipe for target 
'tests/CMakeFiles/run_tests_mrpt_base' failed
make[4]: Leaving directory '/«PKGBUILDDIR»/obj-i586-linux-gnu'
make[3]: *** [tests/CMakeFiles/run_tests_mrpt_base.dir/all] Error 2
CMakeFiles/Makefile2:5096: recipe for target 
'tests/CMakeFiles/run_tests_mrpt_base.dir/all' failed
make[3]: Leaving directory '/«PKGBUILDDIR»/obj-i586-linux-gnu'
make[2]: *** [tests/CMakeFiles/test.dir/rule] Error 2
CMakeFiles/Makefile2:5455: recipe for target 'tests/CMakeFiles/test.dir/rule' 
failed
make[2]: Leaving directory '/«PKGBUILDDIR»/obj-i586-linux-gnu'
make[1]: *** [test] Error 2
Makefile:1665: recipe for target 'test' failed
make[1]: Leaving directory '/«PKGBUILDDIR»/obj-i586-linux-gnu'
dh_auto_test: make -j1 test ARGS+=-j1 returned exit code 2
make: *** [build-arch] Error 2
debian/rules:44: recipe for target 'build-arch' failed
dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2


Could someone please help with this regression?

I am working on resolving other build issues for mrpt package build on mips and 
mipsel, but I can not resolve them until this regression gets resolved.

Thanks!
Jurica



Bug#756591: package magics++_2.18.15-6 FTBFS on mips

2014-07-31 Thread Jurica Stanojkovic
Package: magics++
Version: 2.18.15-6
Severity: important
Tags: sid patch
Justification: FTBFS
User: debian-mips-dev-disc...@lists.alioth.debian.org
Usertags: mips-patch

Hello,

Package magics++_2.18.15-6 FTBFS on mips:
https://buildd.debian.org/status/fetch.php?pkg=magics%2B%2Barch=mipsver=2.18.15-6stamp=1406359409

For this package there is a special case in debian/rules and debian/control 
just for mips.
Patch removes this special case.

debian/rules:
# Don't use emoslib on mips
WITH_EMOSLIB:= --with-emos-libraries=/usr/lib --enable-bufr
ifeq ($(ARCH), mips)
  WITH_EMOSLIB:=
endif

debian/control:
Build-Depends: ... libemos-dev [!mips]

I have attached a patch.
With this patch package builds without an issue.

Regards,
Jurica
diff -upNr magics++-2.18.15-orig/debian/control magics++-2.18.15/debian/control
--- magics++-2.18.15-orig/debian/control	2014-07-22 18:02:34.0 +0200
+++ magics++-2.18.15/debian/control	2014-07-30 09:53:48.0 +0200
@@ -2,7 +2,7 @@ Source: magics++
 Section: science
 Priority: optional
 Maintainer: Alastair McKinstry mckins...@debian.org
-Build-Depends: debhelper  (= 9) , dh-buildinfo, libnetcdf-dev, libgl1-mesa-dev, libgd2-dev, libemos-dev [!mips], libgrib-api-dev, libterralib-dev, libjasper-dev, libcairo2-dev, libpango1.0-dev, autoconf, automake, libtool, gfortran, ttf-dejavu-core, libxml-parser-perl, python-all-dev (= 2.6.6-3) , swig, chrpath, python-numpy, libopenjpeg-dev, ghostscript, zlib1g-dev, dh-autoreconf (= 4~), libboost-dev, python-instant, python3-all-dev, libproj-dev, libqt4-dev
+Build-Depends: debhelper  (= 9) , dh-buildinfo, libnetcdf-dev, libgl1-mesa-dev, libgd2-dev, libemos-dev, libgrib-api-dev, libterralib-dev, libjasper-dev, libcairo2-dev, libpango1.0-dev, autoconf, automake, libtool, gfortran, ttf-dejavu-core, libxml-parser-perl, python-all-dev (= 2.6.6-3) , swig, chrpath, python-numpy, libopenjpeg-dev, ghostscript, zlib1g-dev, dh-autoreconf (= 4~), libboost-dev, python-instant, python3-all-dev, libproj-dev, libqt4-dev
 Standards-Version: 3.9.5
 Homepage: https://software.ecmwf.int/wiki/display/MAGP/Magics
 X-Python-Version: = 2.6
diff -upNr magics++-2.18.15-orig/debian/rules magics++-2.18.15/debian/rules
--- magics++-2.18.15-orig/debian/rules	2014-07-22 18:02:34.0 +0200
+++ magics++-2.18.15/debian/rules	2014-07-30 09:53:00.0 +0200
@@ -16,11 +16,7 @@ CFLAGS += -fPIC
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
-# Don't use emoslib on mips
 WITH_EMOSLIB:= --with-emos-libraries=/usr/lib --enable-bufr
-ifeq ($(ARCH), mips)
-  WITH_EMOSLIB:=
-endif
 
 override_dh_auto_clean:
 	find . -type l -exec rm {} \;


Bug#749909: package freefoam_0.1.0+dfsg-1 FTBFS mips(el)

2014-05-30 Thread Jurica Stanojkovic
Package: freefoam
Version: 0.1.0+dfsg-1
Severity: important
Tags: sid patch
Justification: FTBFS
User: debian-mips-dev-disc...@lists.alioth.debian.org
Usertags: mips-patch

After the bug number 735248 
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735248) has been resolved,
following errors were found while building package freefoam on mips(el):



cd 
/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu/doc/Doxygen
  /usr/bin/python 
/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu/doc/Doxygen/fixupDoxygen.py
Fixing up Doxygen generated API documentation
- Parsing *_source.html
- Computing mangled file names
- Fixing #include linkes in the *_source.html files
- Fixing remaining #include links and expanding placeholders
make[3]: Leaving directory 
'/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu'
/usr/bin/cmake -E cmake_progress_report 
/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu/CMakeFiles
[ 47%] Built target apidoc-all
make[2]: Leaving directory 
'/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu'
Makefile:119: recipe for target 'all' failed
make[1]: *** [all] Error 2



[ 92%] Building CXX object 
applications/utilities/mesh/manipulation/setSet/CMakeFiles/setSet.dir/writeFuns.C.o
cd 
/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu/applications/utilities/mesh/manipulation/setSet
  /usr/bin/g++   -DDP -DNoRepository -DREADLINE=1 -DSiCortex64 -g -O2 
-Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fpermissive 
-D_FORTIFY_SOURCE=2 
-I/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu/include
-o CMakeFiles/setSet.dir/writeFuns.C.o -c 
/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/applications/utilities/mesh/manipulation/setSet/writeFuns.C
/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/applications/utilities/mesh/manipulation/setSet/writeFuns.C:29:23:
 fatal error: standards.h: No such file or directory
 #include standards.h
   ^
compilation terminated.
applications/utilities/mesh/manipulation/setSet/CMakeFiles/setSet.dir/build.make:106:
 recipe for target 
'applications/utilities/mesh/manipulation/setSet/CMakeFiles/setSet.dir/writeFuns.C.o'
 failed
make[3]: *** 
[applications/utilities/mesh/manipulation/setSet/CMakeFiles/setSet.dir/writeFuns.C.o]
 Error 1
make[3]: Leaving directory 
'/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu'
CMakeFiles/Makefile2:12815: recipe for target 
'applications/utilities/mesh/manipulation/setSet/CMakeFiles/setSet.dir/all' 
failed
make[2]: *** 
[applications/utilities/mesh/manipulation/setSet/CMakeFiles/setSet.dir/all] 
Error 2
make[2]: Leaving directory 
'/build/freefoam-5sB8KW/najnoviji-original/freefoam-0.1.0+dfsg/obj-mips-linux-gnu'
Makefile:119: recipe for target 'all' failed
make[1]: *** [all] Error 2



I have attached a patch resolving these issues.
Patch freefoam-doc-and-mips.diff is attached.
Most of this patch is taken from upstream.
With it, freefoam package builds without an error on mips and mipsel.
libxml2-utils is added as dependency (for package asciidoc) to a 
Build-Depends-Indep group in order to override issue 692274
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=692274)


Regards,
Jurica
diff -upNr freefoam-0.1.0+dfsg-orig/debian/control freefoam-0.1.0+dfsg/debian/control
--- freefoam-0.1.0+dfsg-orig/debian/control	2012-07-30 05:28:49.0 +
+++ freefoam-0.1.0+dfsg/debian/control	2014-05-23 13:01:12.0 +
@@ -9,11 +9,12 @@ Vcs-Git: git://git.debian.org/git/debian
 Vcs-Browser: http://git.debian.org/?p=debian-science/packages/freefoam.git
 DM-Upload-Allowed: yes
 Homepage: http://freefoam.wiki.sourceforge.net/
-Build-Depends: cdbs, debhelper (= 5.0.24), python-support, cmake, flex, 
- gawk, python, libreadline6-dev, zlib1g-dev, libscotch-dev, 
- mpi-default-dev, mpi-default-bin, paraview (= 3.8), doxygen, 
- libjs-jquery, asciidoc, xmlto, docbook-utils, dvipng, asymptote, 
- texlive-science, dblatex, dpkg-dev (= 1.16.1~), graphviz
+Build-Depends: cdbs, debhelper (= 5.0.24), python-support, cmake, flex, gawk,
+ python, libreadline6-dev, zlib1g-dev, libscotch-dev, mpi-default-dev,
+ mpi-default-bin, paraview (= 3.8), dpkg-dev (= 1.16.1~)
+Build-Depends-Indep: doxygen,
+ libjs-jquery, asciidoc, docbook-utils, dvipng, asymptote, texlive-science,
+ dblatex, graphviz, libxml2-utils
 Standards-Version: 3.9.3
 
 Package: libfreefoam1
diff -upNr freefoam-0.1.0+dfsg-orig/debian/freefoam-dev-doc.install freefoam-0.1.0+dfsg/debian/freefoam-dev-doc.install
--- freefoam-0.1.0+dfsg-orig/debian/freefoam-dev-doc.install	2012-07-31 13:24:02.0 +
+++ freefoam-0.1.0+dfsg/debian/freefoam-dev-doc.install	2014-05-23 13:01:12.0 

Bug#749501: package osmium_0.0~20111213-g7f3500a-3 FTBFS on big endian.

2014-05-27 Thread Jurica Stanojkovic
Package: osmium
Version: 0.0~20111213-g7f3500a-3
Severity: important
Tags: sid patch
Justification: FTBFS
User: debian-mips-dev-disc...@lists.alioth.debian.org
Usertags: mips-patch

Hello,

Package osmium_ FTBFS on mips big-endian.

mips build log:
https://buildd.debian.org/status/fetch.php?pkg=osmiumarch=mipsver=0.0~20111213-g7f3500a-3stamp=1397047060

Test values are hard-coded in little-endian.
I am sending a patch which detects endianess used and adds big-endian test 
values.

Best Regards,
Jurica
--- osmium-0.0~20111213-g7f3500a.orig/include/osmium/geometry.hpp
+++ osmium-0.0~20111213-g7f3500a/include/osmium/geometry.hpp
@@ -23,6 +23,7 @@ You should have received a copy of the L
 */
 
 #include sstream
+#include endian.h
 
 #ifdef OSMIUM_WITH_GEOS
 # include geos/geom/GeometryFactory.h
@@ -40,6 +41,14 @@ You should have received a copy of the L
 #include osmium/exceptions.hpp
 #include osmium/osm/types.hpp
 
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# define BYTE_ORDER_LITTLE_ENDIAN
+#elif __BYTE_ORDER == __BIG_ENDIAN
+# define BYTE_ORDER_BIG_ENDIAN
+#else
+# error unknown byte order
+#endif
+
 namespace Osmium {
 
 /**
@@ -161,7 +173,11 @@ namespace Osmium {
  * - (optionally) the SRID
  */
 inline void write_binary_wkb_header(std::ostream out, bool with_srid, uint32_t type) {
+#ifdef BYTE_ORDER_LITTLE_ENDIAN // LITTLE_ENDIAN
 write_binaryuint8_t(out, wkbNDR);
+#else // BIG_ENDIAN
+	write_binaryuint8_t(out, wkbXDR);
+#endif
 if (with_srid) {
 write_binaryuint32_t(out, type | wkbSRID);
 write_binaryuint32_t(out, srid);
@@ -178,7 +194,11 @@ namespace Osmium {
  * - (optionally) the SRID
  */
 inline void write_hex_wkb_header(std::ostream out, bool with_srid, uint32_t type) {
+#ifdef BYTE_ORDER_LITTLE_ENDIAN // LITTLE_ENDIAN
 write_hexuint8_t(out, wkbNDR);
+#else // BIG_ENDIAN
+write_hexuint8_t(out, wkbXDR);
+#endif
 if (with_srid) {
 write_hexuint32_t(out, type | wkbSRID);
 write_hexuint32_t(out, srid);
--- osmium-0.0~20111213-g7f3500a.orig/test/testgroup_ogr/geometry/test_geometry.cpp
+++ osmium-0.0~20111213-g7f3500a/test/testgroup_ogr/geometry/test_geometry.cpp
@@ -53,7 +53,11 @@ BOOST_AUTO_TEST_CASE(polygon_from_way) {
 OGRPolygon* ogrpolygon = polygon.create_ogr_geometry();
 std::string ogrwkb;
 ogrwkb.resize(ogrpolygon-WkbSize());
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
 ogrpolygon-exportToWkb(wkbNDR, (unsigned char*)ogrwkb.c_str());
+#else
+ogrpolygon-exportToWkb(wkbXDR, (unsigned char*)ogrwkb.c_str());
+#endif
 output_test_stream osmiumwkb;
 osmiumwkb  polygon.as_WKB();
 BOOST_CHECK_EQUAL(osmiumwkb.str().size(), ogrpolygon-WkbSize());
--- osmium-0.0~20111213-g7f3500a.orig/test/testgroup_plain/geometry/test_linestring_geometry.cpp
+++ osmium-0.0~20111213-g7f3500a/test/testgroup_plain/geometry/test_linestring_geometry.cpp
@@ -47,19 +47,35 @@ BOOST_AUTO_TEST_CASE(output) {
 
 std::ostringstream out_wkb;
 out_wkb  line2.as_WKB();
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
 BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_wkb.str()), 010200030007400740FE3F0740FE3FFE3F);
+#else
+BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_wkb.str()), 020003400740073FFE40073FFE3FFE);
+#endif
 
 std::ostringstream out_ewkb;
 out_ewkb  line2.as_WKB(true);
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
 BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_ewkb.str()), 010220E610030007400740FE3F0740FE3FFE3F);
+#else
+BOOST_CHECK_EQUAL(Osmium::Test::to_hex(out_ewkb.str()), 00200210E60003400740073FFE40073FFE3FFE);
+#endif
 
 std::ostringstream out_hexwkb;
 out_hexwkb  line1.as_HexWKB();
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
 BOOST_CHECK_EQUAL(out_hexwkb.str(), 0102000300FE3FFE3FFE3F074007400740);
+#else
+BOOST_CHECK_EQUAL(out_hexwkb.str(), 0200033FFE3FFE3FFE400740074007);
+#endif
 
 std::ostringstream out_hexewkb;
 out_hexewkb  line1.as_HexWKB(true);
+#ifdef BYTE_ORDER_LITTLE_ENDIAN
 BOOST_CHECK_EQUAL(out_hexewkb.str(), 010220E6100300FE3FFE3FFE3F074007400740);
+#else
+BOOST_CHECK_EQUAL(out_hexewkb.str(), 00200210E600033FFE3FFE3FFE400740074007);
+#endif
 }
 
 BOOST_AUTO_TEST_SUITE_END()
--- 

Bug#685112: freefoam: FTBFS - build output directories not created

2014-05-23 Thread Jurica Stanojkovic
Control: block 685112 by 735248

Hello,

I can confirm that cmake issue (735248) is blocking freefoam.

After removing multiarch-python-include-dirs.diff patch from cmake,
package freefoam builds further on mips and mipsel (with changed cmake).

Regards!
Jurica


Bug#748228: package kbtin_1.0.14-1 FTBFS on big endian architectures

2014-05-15 Thread Jurica Stanojkovic
Package: kbtin
Version: 1.0.14-1
Severity: serious
Tags: sid patch
Justification: FTBFS
User: debian-mips-dev-disc...@lists.alioth.debian.org
Usertags: mips-patch

Hello,

Package kbtin_1.0.14-1 FTBFS on all big endian architectures (mips, powerpc, 
s390x, sparc).

complet build logs:
mips
https://buildd.debian.org/status/fetch.php?pkg=kbtinarch=mipsver=1.0.14-1stamp=1383184670
powerpc
https://buildd.debian.org/status/fetch.php?pkg=kbtinarch=powerpcver=1.0.14-1stamp=1362306329
s390x
https://buildd.debian.org/status/fetch.php?pkg=kbtinarch=s390xver=1.0.14-1stamp=1398863294
sparc
https://buildd.debian.org/status/fetch.php?pkg=kbtinarch=sparcver=1.0.14-1stamp=1361136299

I was able to build package kbtin_1.0.14-1 on mips (big endian) with following 
patch.
File ttyrec_big_endian.patch is attached.

These changes are already in master branch for kbtin package on git.
https://github.com/kilobyte/kbtin/commit/a5c0ef55f909ddc3487d355c25f40b3c18c93946

Regards,
Jurica
--- kbtin-1.0.14.orig/files.c
+++ kbtin-1.0.14/files.c
@@ -273,7 +273,7 @@ void write_log(struct session *ses, char
 if (ses-logtype==2)
 {
 ttyrec_timestamp(th);
-th.len=n;
+th.len=to_little_endian(n);
 if (fwrite(th, 1, sizeof(struct ttyrec_header), ses-logfile)
 sizeof(struct ttyrec_header))
 {
--- kbtin-1.0.14.orig/tintin.h
+++ kbtin-1.0.14/tintin.h
@@ -363,10 +363,10 @@ typedef char pvars_t[10][BUFFER_SIZE];
 
 #ifdef WORDS_BIGENDIAN
 # define to_little_endian(x) ((uint32_t) ( \
-(((uint32_t)(x) ((uint32_t)0x00ffU)  24)) | \
-(((uint32_t)(x) ((uint32_t)0xff00U)   8)) | \
-(((uint32_t)(x) ((uint32_t)0x00ffU)   8)) | \
-(((uint32_t)(x) ((uint32_t)0xff00U)  24
+((uint32_t)(x) (uint32_t)0x00ffU)  24 | \
+((uint32_t)(x) (uint32_t)0xff00U)   8 | \
+((uint32_t)(x) (uint32_t)0x00ffU)   8 | \
+((uint32_t)(x) (uint32_t)0xff00U)  24))
 #else
 # define to_little_endian(x) ((uint32_t)(x))
 #endif


Bug#743503: package lnav FTBFS on big endian architectures

2014-04-03 Thread Jurica Stanojkovic
Package: lnav
Version: 0.7.0-2
Severity: serious
Tags: sid
Justification: FTBFS

Hello,

Package zbackup FTBFS on all big-endian architectures.

build logs:
mips:
https://buildd.debian.org/status/fetch.php?pkg=lnavarch=mipsver=0.7.0-2stamp=1396446363
powerpc:
https://buildd.debian.org/status/fetch.php?pkg=lnavarch=powerpcver=0.7.0-2stamp=1396439887
s390x:
https://buildd.debian.org/status/fetch.php?pkg=lnavarch=s390xver=0.7.0-2stamp=1396439366
sparc:
https://buildd.debian.org/status/fetch.php?pkg=lnavarch=sparcver=0.7.0-2stamp=1396440324

I have attached patch resolving this issue.
Patch was tested on mips and and package was built correctly.

Thanks!
Jurica
Description: patch for big-endian architectures 
Author: Jurica Stanojkovic jurica.stanojko...@imgtec.com 
--- lnav-0.7.0.orig/src/line_buffer.cc
+++ lnav-0.7.0/src/line_buffer.cc
@@ -182,7 +182,7 @@ throw (error)
 throw error(errno);
 }
 }
-this-lb_file_time = *((int32_t *)gz_id[4]);
+this-lb_file_time = le32toh(*((int32_t *)gz_id[4]));
 if (this-lb_file_time  0)
 this-lb_file_time = 0;
 this-lb_gz_offset = lseek(this-lb_fd, 0, SEEK_CUR);
diff -upNr lnav-0.7.0-orig/debian/patches/big-endian.patch lnav-0.7.0/debian/patches/big-endian.patch
--- lnav-0.7.0-orig/debian/patches/big-endian.patch	1970-01-01 00:00:00.0 +
+++ lnav-0.7.0/debian/patches/big-endian.patch	2014-04-03 13:18:51.0 +
@@ -0,0 +1,13 @@
+Description: patch for big-endian architectures 
+Author: Jurica Stanojkovic jurica.stanojko...@imgtec.com 
+--- lnav-0.7.0.orig/src/line_buffer.cc
 lnav-0.7.0/src/line_buffer.cc
+@@ -182,7 +182,7 @@ throw (error)
+ throw error(errno);
+ }
+ }
+-this-lb_file_time = *((int32_t *)gz_id[4]);
++this-lb_file_time = le32toh(*((int32_t *)gz_id[4]));
+ if (this-lb_file_time  0)
+ this-lb_file_time = 0;
+ this-lb_gz_offset = lseek(this-lb_fd, 0, SEEK_CUR);
diff -upNr lnav-0.7.0-orig/debian/patches/series lnav-0.7.0/debian/patches/series
--- lnav-0.7.0-orig/debian/patches/series	2014-04-02 11:12:27.0 +
+++ lnav-0.7.0/debian/patches/series	2014-04-03 12:58:52.0 +
@@ -1 +1,2 @@
 default-to-var-log-syslog-on-Debian.patch
+big-endian.patch


Bug#743503: package lnav FTBFS on big endian architectures

2014-04-03 Thread Jurica Stanojkovic
Hi Salvatore,

Yes I meant lnav. 
(Saved template)
 Sorry!

Thanks!
Jurica

From: Salvatore Bonaccorso [salvatore.bonacco...@gmail.com] on behalf of 
Salvatore Bonaccorso [car...@debian.org]
Sent: 03 April 2014 16:11
To: Jurica Stanojkovic; 743...@bugs.debian.org
Subject: Re: Bug#743503: package lnav FTBFS on big endian architectures

Control: tags -1 + confirmed pending

Hi Jurica,

On Thu, Apr 03, 2014 at 01:48:58PM +, Jurica Stanojkovic wrote:
 Package zbackup FTBFS on all big-endian architectures.

I suppose you mean lnav :)

I'm indeed already aware of it[1].

 [1] https://lists.debian.org/debian-s390/2014/04/msg0.html
 [2] https://github.com/tstack/lnav/issues/93

Thanks for your patch!

Regards,
Salvatore


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#738571: FTBFS on mips(el)

2014-02-10 Thread Jurica Stanojkovic
Package:ray
Version:2.3.0-1
User: debian-mips-dev-disc...@lists.alioth.debian.org
Severity: important

Package ray failed to build from source on mips(el).

mips build log:
https://buildd.debian.org/status/fetch.php?pkg=rayarch=mipsver=2.3.0-1stamp=1391601072

mipsel build log:
https://buildd.debian.org/status/fetch.php?pkg=rayarch=mipselver=2.3.0-1stamp=1391599807

Thanks!
Jurica

--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#738571: FTBFS on mips(el)

2014-02-10 Thread Jurica Stanojkovic
Tags: patch

This is an openmpi issue.

Currently mpi-defaults for mips and mipsel is built with mpich.
Instead of a package mpich, openmpi should be used for building of mpi-defaults.
Until recently openmpi for mips and mipsel was not available.

I have attached a patch that contains debian changes of mpi-default package.

Thanks!
Jurica
diff -uNr mpi-defaults.orig/debian/control mpi-defaults/debian/control
--- mpi-defaults.orig/debian/control	2013-10-26 13:33:29.0 +
+++ mpi-defaults/debian/control	2014-02-10 16:44:45.0 +
@@ -5,10 +5,10 @@
 Uploaders: Adam C. Powell, IV hazel...@debian.org, Manuel Prinz man...@debian.org
 Standards-Version: 3.9.2
 Build-Depends: debhelper,
- libopenmpi-dev (= 1.4.3-2.1) [alpha armel armhf i386 amd64 lpia ia64 powerpc sparc kfreebsd-i386 kfreebsd-amd64 hurd-i386],
- openmpi-bin (= 1.4.3-2.1) [alpha armel armhf i386 amd64 lpia ia64 powerpc sparc kfreebsd-i386 kfreebsd-amd64 hurd-i386],
- libmpich-dev [!alpha !armel !armhf !i386 !amd64 !lpia !ia64 !powerpc !sparc !kfreebsd-i386 !kfreebsd-amd64 !hurd-i386],
- mpich [!alpha !armel !armhf !i386 !amd64 !lpia !ia64 !powerpc !sparc !kfreebsd-i386 !kfreebsd-amd64 !hurd-i386]
+ libopenmpi-dev (= 1.4.3-2.1) [alpha armel armhf i386 amd64 lpia ia64 powerpc sparc kfreebsd-i386 kfreebsd-amd64 hurd-i386 mips mipsel],
+ openmpi-bin (= 1.4.3-2.1) [alpha armel armhf i386 amd64 lpia ia64 powerpc sparc kfreebsd-i386 kfreebsd-amd64 hurd-i386 mips mipsel],
+ libmpich-dev [!alpha !armel !armhf !i386 !amd64 !lpia !ia64 !powerpc !sparc !kfreebsd-i386 !kfreebsd-amd64 !hurd-i386 !mips !mipsel],
+ mpich [!alpha !armel !armhf !i386 !amd64 !lpia !ia64 !powerpc !sparc !kfreebsd-i386 !kfreebsd-amd64 !hurd-i386 !mips !mipsel]
 Vcs-Browser: http://anonscm.debian.org/git/?p=debian-science/packages/mpi-defaults.git
 Vcs-Git: git://anonscm.debian.org/debian-science/packages/mpi-defaults.git
 


Bug#735558: package zbackup FTBFS on big endian architectures

2014-02-03 Thread Jurica Stanojkovic
Tags: patch
User: debian-mips-dev-disc...@lists.alioth.debian.org
Usertags: mips-patch

Hello,

I have attached patch which is obtained from upstream:
https://github.com/zbackup/zbackup/compare/1.2...master

Patch adds support for big endian architectures.

Patched package was successfully built and tested on mips.
Backups made on little endian were successfully restored on little and big 
endian.
Backups made on big endian were successfully restored on little and big endian.

Thanks!
Juricadiff -upNr zbackup-1.2-orig/debian/patches/big-endian-support.patch zbackup-1.2/debian/patches/big-endian-support.patch
--- zbackup-1.2-orig/debian/patches/big-endian-support.patch	1970-01-01 00:00:00.0 +
+++ zbackup-1.2/debian/patches/big-endian-support.patch	2014-02-03 14:03:14.0 +
@@ -0,0 +1,38 @@
+--- zbackup-1.2.orig/endian.hh
 zbackup-1.2/endian.hh
+@@ -12,9 +12,7 @@
+ #include endian.h
+ #endif
+ 
+-#if __BYTE_ORDER != __LITTLE_ENDIAN
+-#error Please add support for architectures different from little-endian.
+-#endif
++#if __BYTE_ORDER == __LITTLE_ENDIAN
+ 
+ /// Converts the given host-order value to big-endian value
+ inline uint32_t toBigEndian( uint32_t v ) { return htonl( v ); }
+@@ -25,4 +23,24 @@ inline uint64_t toLittleEndian( uint64_t
+ inline uint32_t fromLittleEndian( uint32_t v ) { return v; }
+ inline uint64_t fromLittleEndian( uint64_t v ) { return v; }
+ 
++#elif __BYTE_ORDER == __BIG_ENDIAN
++
++// Note: the functions used are non-standard. Add more ifdefs if needed
++
++/// Converts the given host-order value to big-endian value
++inline uint32_t toBigEndian( uint32_t v ) { return v; }
++/// Converts the given host-order value to little-endian value
++inline uint32_t toLittleEndian( uint32_t v ) { return htole32( v ); }
++inline uint64_t toLittleEndian( uint64_t v ) { return htole64( v ); }
++/// Converts the given little-endian value to host-order value
++inline uint32_t fromLittleEndian( uint32_t v ) { return le32toh( v ); }
++inline uint64_t fromLittleEndian( uint64_t v ) { return le64toh( v ); }
++
++#else
++
++#error Please add support for architectures different from little-endian and\
++big-endian.
++
++#endif
++
+ #endif
diff -upNr zbackup-1.2-orig/debian/patches/series zbackup-1.2/debian/patches/series
--- zbackup-1.2-orig/debian/patches/series	1970-01-01 00:00:00.0 +
+++ zbackup-1.2/debian/patches/series	2014-02-03 14:03:14.0 +
@@ -0,0 +1 @@
+big-endian-support.patch
--- zbackup-1.2.orig/endian.hh
+++ zbackup-1.2/endian.hh
@@ -12,9 +12,7 @@
 #include endian.h
 #endif
 
-#if __BYTE_ORDER != __LITTLE_ENDIAN
-#error Please add support for architectures different from little-endian.
-#endif
+#if __BYTE_ORDER == __LITTLE_ENDIAN
 
 /// Converts the given host-order value to big-endian value
 inline uint32_t toBigEndian( uint32_t v ) { return htonl( v ); }
@@ -25,4 +23,24 @@ inline uint64_t toLittleEndian( uint64_t
 inline uint32_t fromLittleEndian( uint32_t v ) { return v; }
 inline uint64_t fromLittleEndian( uint64_t v ) { return v; }
 
+#elif __BYTE_ORDER == __BIG_ENDIAN
+
+// Note: the functions used are non-standard. Add more ifdefs if needed
+
+/// Converts the given host-order value to big-endian value
+inline uint32_t toBigEndian( uint32_t v ) { return v; }
+/// Converts the given host-order value to little-endian value
+inline uint32_t toLittleEndian( uint32_t v ) { return htole32( v ); }
+inline uint64_t toLittleEndian( uint64_t v ) { return htole64( v ); }
+/// Converts the given little-endian value to host-order value
+inline uint32_t fromLittleEndian( uint32_t v ) { return le32toh( v ); }
+inline uint64_t fromLittleEndian( uint64_t v ) { return le64toh( v ); }
+
+#else
+
+#error Please add support for architectures different from little-endian and\
+big-endian.
+
+#endif
+
 #endif


Bug#736332: [Pkg-javascript-devel] Bug#736332: libv8-3.14: support for mips big endian

2014-01-22 Thread Jurica Stanojkovic
Hello,

I was closely collaborating with v8 mips team to make libv8 debian patch.
What I have heard is that they are planning  to upstream patches for big-endian 
to google trunk for future versions, but it will not be so soon.

Until then, the mips support for v8 big-endian is on a separate branch of the 
github repo for v8 mips port.
The review for big-endian patch is done internally inside mips v8 team.

Regards,
Jurica




From: Luca BRUNO [lu...@debian.org]
Sent: 22 January 2014 14:25
To: Jurica Stanojkovic; 736...@bugs.debian.org
Subject: Re: [Pkg-javascript-devel] Bug#736332: libv8-3.14: support for mips 
big endian

Jurica Stanojkovic jurica.stanojko...@imgtec.com wrote:

 I have attached a patch that enables building of package
 libv8-3.14_3.14.5.8-5 on mips big endian architecture.

 Big endian support for mips is on this branch:
 https://github.com/paul99/v8m-rb/tree/dm-mipsbe-3.14

Thanks a lot for improving libv8 portability.
Do you have any info to add about the upstreaming status of this? I see
you are in good relation with libv8 upstream, so I presume you already
submitted a pull-request. Is the review already ongoing/done somewhere?
Or is it a backport for something already landed?

Thanks, Luca

--
  .''`.  |   ~[ Luca BRUNO ~ (kaeso) ]~
 : :'  : | Email: lucab (AT) debian.org ~ Debian Developer
 `. `'`  | GPG Key ID: 0x3BFB9FB3   ~ Free Software supporter
   `-| HAM-radio callsign: IZ1WGT   ~ Networking sorcerer


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#735558: package zbackup FTBFS on big endian architectures

2014-01-16 Thread Jurica Stanojkovic
Package: zbackup
Version: 1.2-1
Severity: serious
Tags: sid
Justification: FTBFS

Hello,

Package zbackup FTBFS on following architectures:
mips, powerpc, s390x, sparc,

with following message:
/«PKGBUILDDIR»/endian.hh:16:2: error: #error Please add support for 
architectures different from little-endian.

complete build logs:
https://buildd.debian.org/status/fetch.php?pkg=zbackuparch=mipsver=1.2-1stamp=1378799603
https://buildd.debian.org/status/fetch.php?pkg=zbackuparch=powerpcver=1.2-1stamp=1378512654
https://buildd.debian.org/status/fetch.php?pkg=zbackuparch=s390xver=1.2-1stamp=1382881263
https://buildd.debian.org/status/fetch.php?pkg=zbackuparch=sparcver=1.2-1stamp=1378512899


Big endian support for this package is added upstream.
I have tested new version of source on mips and package was built and installed 
correctly.
https://github.com/zbackup/zbackup

Could someone please update version of zbackup?
If needed i could provide patch for this version.


Thanks!
Jurica


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#712885: fop does not generate pdf files on mips - wheezy

2014-01-03 Thread Jurica Stanojkovic
Hello,

This issue is resolved with new version of openjdk-6 (openjdk-6_6b29-1.13.0-1 
or  openjdk-6_6b29-1.13.0-2)

This was issue with lcms (1) used with previous versions of openjdk-6 
(6b27-1.12.7-2 jessie, 6b27-1.12.5-1 wheezy).
New version of openjdk-6 is using lcms2.

Thanks!
Jurica

--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#695563: liblinux-prctl-perl: FTBFS on mips and mipsel

2013-12-24 Thread Jurica Stanojkovic
Hello,

This is a kernel related problem.

We had a chance to try some preliminary seccomp support (mode 2) for mips 
kernel (3.10)

With the support added to kernel, seccomp strict mode (mode 1) was also working 
correctly for mips(el) and this package was built successfully.

Until kernel gets fixed this issue will remain for mips(el).
As a temporary solution this whole package, or just a seccomp test, could be 
excluded from mips(el) build.

Regards,
Jurica

--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#732027: openmpi: support for mips, mipsel, mips64, and mips64el

2013-12-12 Thread Jurica Stanojkovic
:sltiu   v0,v1,1
 End of assembler dump.

with a patch, resulting code is:
 Dump of assembler code for function opal_atomic_cmpset_32:
0x00400ce8 +0: ll  v1,0(a0)
0x00400cec +4: bne v1,a1,0x400cfc done1
0x00400cf0 +8: ori v0,a2,0x0
0x00400cf4 +12:sc  v0,0(a0)
0x00400cf8 +16:beqzv0,0x400ce8 opal_atomic_cmpset_32
0x00400cfc +0: xor v1,v1,a1
 = 0x00400d00 +4: jr  ra
0x00400d04 +8: sltiu   v0,v1,1
 End of assembler dump.

Note the lines 0x00400d00 and 0x00400d04.
Without a patch line  sltiu   v0,v1,1 is never executed 
because after a line  jr  ra
instruction  moveat,at is inserted in a delay slot of 
a jr instruction. 


We would be happy to provide more information if needed.


Thanks!
JuricaDescription: Patches MIPS.asm and mips/atomic.h files to a 1.7.3 version of source
Author: Jurica Stanojkovic jurica.stanojko...@imgtec.com

--- openmpi-1.6.5.orig/opal/asm/base/MIPS.asm
+++ openmpi-1.6.5/opal/asm/base/MIPS.asm
@@ -1,26 +1,48 @@
 START_FILE
 
+#ifdef __linux__
 #include sys/asm.h
+#else
+#include asm.h
+#endif
 #include regdef.h
 	
 	TEXT
 
 	ALIGN(8)
 LEAF(opal_atomic_mb)
-	sync
+#ifdef __linux__
+	.set mips2
+#endif
+	sync
+#ifdef __linux__
+	.set mips0
+#endif	
 	j	ra
 END(opal_atomic_mb)
 
 	
 	ALIGN(8)
 LEAF(opal_atomic_rmb)
-	sync
+#ifdef __linux__
+	.set mips2
+#endif
+	sync
+#ifdef __linux__
+	.set mips0
+#endif
 	j	ra
 END(opal_atomic_rmb)
 	
 	
 LEAF(opal_atomic_wmb)
-	sync
+#ifdef __linux__
+	.set mips2
+#endif
+	sync
+#ifdef __linux__
+	.set mips0
+#endif
 	j	ra
 END(opal_atomic_wmb)
 
@@ -28,10 +50,22 @@ END(opal_atomic_wmb)
 LEAF(opal_atomic_cmpset_32)
 	.set noreorder
 retry1:
+#ifdef __linux__
+	.set mips2
+#endif
 	ll $3, 0($4) 
+#ifdef __linux__
+	.set mips0
+#endif
 	bne$3, $5, done1   
 	or $2, $6, 0  
+#ifdef __linux__
+	.set mips2
+#endif
 	sc $2, 0($4) 
+#ifdef __linux__
+	.set mips0
+#endif
 	beqz   $2, retry1
 done1: 
 	.set reorder  
@@ -45,13 +79,31 @@ END(opal_atomic_cmpset_32)
 LEAF(opal_atomic_cmpset_acq_32)
 	.set noreorder
 retry2:
+#ifdef __linux__
+	.set mips2
+#endif
 	ll $3, 0($4) 
+#ifdef __linux__
+	.set mips0
+#endif
 	bne$3, $5, done2   
 	or $2, $6, 0  
+#ifdef __linux__
+	.set mips2
+#endif
 	sc $2, 0($4) 
+#ifdef __linux__
+	.set mips0
+#endif
 	beqz   $2, retry2   
 done2: 
-	sync
+#ifdef __linux__
+	.set mips2
+#endif
+	sync
+#ifdef __linux__
+	.set mips0
+#endif
 	.set reorder  
 
 	xor	$3,$3,$5
@@ -62,12 +114,30 @@ END(opal_atomic_cmpset_acq_32)
 	
 LEAF(opal_atomic_cmpset_rel_32)
 	.set noreorder
-	sync
+#ifdef __linux__
+	.set mips2
+#endif
+	sync
+#ifdef __linux__
+	.set mips0
+#endif
 retry3:
+#ifdef __linux__
+	.set mips2
+#endif
 	ll $3, 0($4) 
+#ifdef __linux__
+	.set mips0
+#endif
 	bne$3, $5, done3   
 	or $2, $6, 0  
+#ifdef __linux__
+	.set mips2
+#endif
 	sc $2, 0($4) 
+#ifdef __linux__
+	.set mips0
+#endif
 	beqz   $2, retry3   
 done3: 
 	.set reorder  
@@ -77,7 +147,7 @@ done3:
 	sltu	$2,$3,1
 END(opal_atomic_cmpset_rel_32)
 	
-	
+#ifdef __mips64	
 LEAF(opal_atomic_cmpset_64)
 		.set noreorder
 retry4:
@@ -128,3 +198,4 @@ done6:
 	j	ra
 	sltu	$3,$4,1
 END(opal_atomic_cmpset_rel_64)
+#endif /* __mips64 */
--- openmpi-1.6.5.orig/opal/include/opal/sys/mips/atomic.h
+++ openmpi-1.6.5/opal/include/opal/sys/mips/atomic.h
@@ -23,10 +23,17 @@
 #if OPAL_WANT_SMP_LOCKS
 
 /* BWB - FIX ME! */
+#ifdef __linux__
+#define MB() __asm__ __volatile__(.set mips2; sync; .set mips0: : :memory)
+#define RMB() __asm__ __volatile__(.set mips2; sync; .set mips0: : :memory)
+#define WMB() __asm__ __volatile__(.set mips2; sync; .set mips0: : :memory)
+#define SMP_SYNC .set mips2; sync; .set mips0
+#else
 #define MB() __asm__ __volatile__(sync: : :memory)
 #define RMB() __asm__ __volatile__(sync: : :memory)
 #define WMB() __asm__ __volatile__(sync: : :memory)
 #define SMP_SYNC sync
+#endif
 
 #else
 
@@ -46,8 +53,10 @@
 #define OPAL_HAVE_ATOMIC_MEM_BARRIER 1
 
 #define OPAL_HAVE_ATOMIC_CMPSET_32 1
-#define OPAL_HAVE_ATOMIC_CMPSET_64 1
 
+#ifdef __mips64
+#define OPAL_HAVE_ATOMIC_CMPSET_64 1
+#endif
 
 /**
  *
@@ -93,10 +102,16 @@ static inline int opal_atomic_cmpset_32(
__asm__ __volatile__ (.set noreorder\n
  .set noat \n
  1:\n
+#ifdef __linux__
+ .set mips2 \n\t
+#endif
  ll %0, %2 \n /* load *addr into ret */
  bne%0, %z3, 2f\n /* done if oldval != ret */
  or $1, %z4, 0 \n /* tmp = newval (delay

Bug#732027: openmpi: support for mips, mipsel, mips64, and mips64el

2013-12-12 Thread Jurica Stanojkovic
No i did not.

Should I do that?

Regards,
Jurica

From: Sylvestre Ledru [sylves...@debian.org]
Sent: 12 December 2013 17:55
To: Jurica Stanojkovic; 732...@bugs.debian.org
Subject: Re: Bug#732027: openmpi: support for mips, mipsel, mips64, and mips64el

Hello,


On 12/12/2013 17:34, Jurica Stanojkovic wrote:
 I have attached patches that enable building of package openmpi_1.6.5-5
 on following architectures: mips, mipsel, mips64, mips64el.


Excellent. Many thanks. Did you forwarded that upstream too ?


I will upload it very soon.

Sylvestre


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#732027: openmpi: support for mips, mipsel, mips64, and mips64el

2013-12-12 Thread Jurica Stanojkovic

Feel free to send patches upstream.

Sure, no problem, I will be sending debian/ patch next time.

Thanks!
Jurica


From: Sylvestre Ledru [sylves...@debian.org]
Sent: 12 December 2013 18:04
To: Jurica Stanojkovic; 732...@bugs.debian.org
Subject: Re: Bug#732027: openmpi: support for mips, mipsel, mips64, and mips64el

As you wish :)
I can do it for you if you prefer (I am in touch with them).

Just a minor comment, next time, please provide a patch also for the
change in debian/ :)

Sylvestre
PS: I am build the package with your changes.


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#724469: FTBFS on all big-endian architectures

2013-11-21 Thread Jurica Stanojkovic
Hello,

I have attached a patch resolving reported issue on mips architecture.
We believe that this fix will work also on other 32-bit big endian 
architectures, but additional work will be needed for 64-bit big endian.
Could someone, please test this patch on other big endian architectures.

Best regards,
Jurica
Description: patch resolve issues on mips big endian architecture.
Author: Jurica Stanojkovic jurica.stanojko...@imgtec.com
--- libglib-object-introspection-perl-0.016.orig/gperl-i11n-invoke-c.c
+++ libglib-object-introspection-perl-0.016/gperl-i11n-invoke-c.c
@@ -180,7 +180,32 @@ invoke_c_code (GICallableInfo *info,
 		ccroak (Could not prepare a call interface);
 	}
 
-	ffi_call (cif, func_pointer, return_value, iinfo.args);
+	if(iinfo.return_type_ffi==ffi_type_sint8)
+	{
+		ffi_sarg result;
+		ffi_call (cif, func_pointer, result, iinfo.args);
+		return_value.v_int8=result;
+	}
+	else if(iinfo.return_type_ffi==ffi_type_uint8)
+	{
+		ffi_arg result;
+		ffi_call (cif, func_pointer, result, iinfo.args);
+		return_value.v_uint8=result;
+	}
+	else if(iinfo.return_type_ffi==ffi_type_sint16)
+	{
+		ffi_sarg result;
+		ffi_call (cif, func_pointer, result, iinfo.args);
+		return_value.v_int16=result;
+	}
+	else if(iinfo.return_type_ffi==ffi_type_uint16)
+	{
+		ffi_arg result;
+		ffi_call (cif, func_pointer, result, iinfo.args);
+		return_value.v_uint16=result;
+	}
+else
+		ffi_call (cif, func_pointer, return_value, iinfo.args);
 
 	/* free call-scoped data */
 	_invoke_free_after_call_handlers (iinfo);


Bug#727719: ergo: FTBFS on mips/mipsel

2013-10-25 Thread Jurica Stanojkovic
Package: ergo
Version: 3.3.1-1
Severity: serious
Tags: sid
Justification: FTBFS

Package ergo failed to build from source on mips/mipsel because R3000 used
in integrals_hermite.cc is already defined.

Full build logs:
https://buildd.debian.org/status/fetch.php?pkg=ergoarch=mipsver=3.3.1-1stamp=1380475129
https://buildd.debian.org/status/fetch.php?pkg=ergoarch=mipselver=3.3.1-1stamp=1380477528

I have attached a patch resolving the issue.

Best regards,
Jurica

--- ergo-3.3.1.orig/source/integrals/integrals_hermite.cc
+++ ergo-3.3.1/source/integrals/integrals_hermite.cc
@@ -30,6 +30,9 @@
 #include cmath
 #include stdio.h
 
+#ifdef R3000
+ #undef R3000
+#endif
 
 int
 get_related_integrals_hermite(const IntegralInfo  integralInfo,