[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#808175: jffi: FTBFS on non-Linux arches



Package: jffi
Version: 1.2.7-8
Severity: wishlist
Tags: patch

Hi!

jffi FTBFS on arches other than Linux, for a couple of reasons, both
fixed in the attached patches.

nonlinux_endian_h.patch:

Include the system's <endian.h> for BYTE_ORDER definitions, not just on
Linux but on other platforms too.

nonlinux_platforms.patch:

debian/rules expects an output file called ../dist/jffi-*-Linux.jar,
its name basically determined by jffi-$(uname -m)-$(uname -s).jar
That is set by build.xml, not by jni/GNUmakefile.

On kfreebsd, $(uname -s) contains a forwardslash and this is not good
in filenames.  Since the naming is inconsequential anyway, just call it
jffi-*-Linux.jar even on kfreebsd on hurd.

Thanks!

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 10.1-0-amd64
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
From: Steven Chamberlain <steven@pyro.eu.org>
Date: Wed, 16 Dec 2015 18:56:35 +0000
Subject: just use platform=Linux for GNU/kFreeBSD and Hurd

--- a/build.xml
+++ b/build.xml
@@ -93,6 +93,13 @@
     <condition property="platform.os" value="Windows">
       <os family="Windows"/>
     </condition>
+    <!-- Treat GNU/kFreeBSD or Hurd just like Linux platform -->
+    <condition property="platform.os" value="Linux">
+      <or>
+        <os name="GNU/kFreeBSD"/>
+        <os name="GNU"/>
+      </or>
+    </condition>
     <!-- default to os.arch for the cpu -->
     <condition property="platform.cpu" value="${os.arch}">
       <not><isset property="platform.cpu"/></not>
From: Steven Chamberlain <steven@pyro.eu.org>
Date: Wed, 16 Dec 2015 14:49:13 +0000
Subject: include endian.h on other platforms than Linux

--- a/jni/jffi/endian.h
+++ b/jni/jffi/endian.h
@@ -36,7 +36,7 @@
 #include <sys/param.h>
 #include <sys/types.h>
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
 #  include_next <endian.h>
 #endif
 

Reply to: