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

Bug#791347: src:libexplain: FTBFS on ppc64el



Package: src:libexplain
Version: 1.4.D001-2
Severity: normal
Tags: patch

Dear Maintainer,

While trying to build the package on ppc64el, the test t0056a fails on
an error related with the O_LARGEFILE flag.

PATH=`pwd`/bin:$PATH /bin/sh test/00/t0056a.sh
3c3
< which is unsuitable for writing (O_RDONLY | O_LARGEFILE)
---
> which is unsuitable for writing (O_RDONLY | 0200000)
FAILED test of write vs EINVAL
make[1]: *** [t0056a] Error 1
Makefile:40798: recipe for target 't0056a' failed
make[1]: Leaving directory '/«PKGBUILDDIR»'
dh_auto_test: make -j1 check returned exit code 2
make: *** [build-arch] Error 2
dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2


The attached patch includes a workaround to set O_LARGEFILE_HIDDEN to
the proper value on ppc64el architecture.

Thanks for considering this patch.

Regards,
Erwan.

-- System Information:
Debian Release: jessie/sid
    APT prefers unstable
    APT policy: (500, 'unstable')
Architecture: ppc64el (ppc64le)

Kernel: Linux 3.16.0-4-powerpc64le
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



diff -Naur a/debian/patches/ppc64el-largefile.patch b/debian/patches/ppc64el-largefile.patch
--- a/debian/patches/ppc64el-largefile.patch	1970-01-01 01:00:00.000000000 +0100
+++ b/debian/patches/ppc64el-largefile.patch	2015-07-03 17:44:40.517180785 +0200
@@ -0,0 +1,16 @@
+diff -Naur a/libexplain/ac/fcntl.h b/libexplain/ac/fcntl.h
+--- a/libexplain/ac/fcntl.h	2015-07-03 17:24:03.657246523 +0200
++++ b/libexplain/ac/fcntl.h	2015-07-03 17:31:13.741223664 +0200
+@@ -58,7 +58,12 @@
+  * flags values returned by the kernel.
+  */
+ #if defined(__linux__) && (O_LARGEFILE == 0)
++#if !defined(__PPC64__)
+ #define O_LARGEFILE_HIDDEN 0100000
++#else
++/* workaround for ppc64el */
++#define O_LARGEFILE_HIDDEN 0200000
++#endif
+ #endif
+ 
+ 
diff -Naur a/debian/patches/series b/debian/patches/series
--- a/debian/patches/series	2015-07-03 17:24:02.861246565 +0200
+++ b/debian/patches/series	2015-07-03 17:34:19.833213774 +0200
@@ -1,2 +1,3 @@
 autofoo.patch
 alpha-fcntl-h.patch
+ppc64el-largefile.patch

Reply to: