Bug#792272: x265: FTBFS on x32

2015-07-19 Thread Thorsten Glaser
Sebastian Ramacher dixit:

>If you want to port the asm code to x32, please submit your work upstream. I
>don't intend to carry patches for the asm code in a package where the asm code
>changes a lot with every release:

OK, completely understandable.

But, for now, just getting x265 compiled on x32 withOUT asm is the goal.

bye,
//mirabilos
-- 
 exceptions: a truly awful implementation of quite a nice idea.
 just about the worst way you could do something like that, afaic.
 it's like anti-design.   that too… may I quote you on that?
 sure, tho i doubt anyone will listen ;)


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



Bug#792272: x265: FTBFS on x32

2015-07-19 Thread Sebastian Ramacher
Hi Thorsen

On 2015-07-13 15:02:11, Thorsten Glaser wrote:
> Source: x265
> Version: 1.7-3
> Severity: important
> Tags: patch
> 
> Hi,
> 
> x265 is required for libav these days (and probably ffmpeg later).
> The attached patch makes it recognise x32 and handles it as a faux
> non-x86 processor architecture, which is not strictly correct, but
> achieves the goal to make x265 not use assembly code for it, as it
> fails there currently.
> 
> We’ll eventually want to port all those asm-using packages to x32
> proper, but for now, disabling asm is the way to go to get them
> compiling (and thus usable in the dependency chain – no idea if
> it’s actually usable as in, can decode a video in time, but we’ll
> see that later).

If you want to port the asm code to x32, please submit your work upstream. I
don't intend to carry patches for the asm code in a package where the asm code
changes a lot with every release:

$ git diff upstream/1.6 upstream/1.7 --stat -- **/*.asm
 source/common/x86/const-a.asm|   161 +-
 source/common/x86/dct8.asm   |   145 +-
 source/common/x86/intrapred16.asm|   502 +
 source/common/x86/intrapred8.asm |  7280 +++--
 source/common/x86/intrapred8_allangs.asm |  1160 +-
 source/common/x86/ipfilter16.asm |  1439 +-
 source/common/x86/ipfilter8.asm  | 24952 +
 source/common/x86/loopfilter.asm |   898 +-
 source/common/x86/mc-a.asm   | 6 +
 source/common/x86/pixel-a.asm|  1480 ++
 source/common/x86/pixel-util8.asm|   795 +-
 source/common/x86/pixeladd8.asm  |   305 +-
 source/common/x86/sad-a.asm  |99 +-
 source/common/x86/sad16-a.asm|84 +-
 source/common/x86/x86inc.asm | 3 +-
 15 files changed, 27437 insertions(+), 11872 deletions(-)

See https://bitbucket.org/multicoreware/x265/wiki/Contribute for details.

Cheers
-- 
Sebastian Ramacher


signature.asc
Description: Digital signature


Bug#792272: x265: FTBFS on x32

2015-07-13 Thread Thorsten Glaser
Source: x265
Version: 1.7-3
Severity: important
Tags: patch

Hi,

x265 is required for libav these days (and probably ffmpeg later).
The attached patch makes it recognise x32 and handles it as a faux
non-x86 processor architecture, which is not strictly correct, but
achieves the goal to make x265 not use assembly code for it, as it
fails there currently.

We’ll eventually want to port all those asm-using packages to x32
proper, but for now, disabling asm is the way to go to get them
compiling (and thus usable in the dependency chain – no idea if
it’s actually usable as in, can decode a video in time, but we’ll
see that later).

-- System Information:
Debian Release: stretch/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'buildd-unstable'), (500, 'unstable')
Architecture: x32 (x86_64)
Foreign Architectures: i386, amd64

Kernel: Linux 4.0.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/lksh
Init: sysvinit (via /sbin/init)
diff -Nru x265-1.7/debian/changelog x265-1.7/debian/changelog
--- x265-1.7/debian/changelog	2015-06-19 15:36:05.0 +0200
+++ x265-1.7/debian/changelog	2015-07-13 14:49:21.0 +0200
@@ -1,3 +1,10 @@
+x265 (1.7-3+x32.1) unreleased; urgency=low
+
+  * Non-maintainer upload.
+  * Fix building on x32 (without asm, for now)
+
+ -- Thorsten Glaser   Mon, 13 Jul 2015 14:49:06 +0200
+
 x265 (1.7-3) unstable; urgency=medium
 
   * debian/rules: Filter -Wl,-Bsymbolic-functions. (Closes: #789111)
diff -Nru x265-1.7/debian/patches/fix_x32.patch x265-1.7/debian/patches/fix_x32.patch
--- x265-1.7/debian/patches/fix_x32.patch	1970-01-01 01:00:00.0 +0100
+++ x265-1.7/debian/patches/fix_x32.patch	2015-07-13 14:48:58.0 +0200
@@ -0,0 +1,32 @@
+# DP: detect x32, handle as non-x86 and no-ASM for now, but enable PIC
+
+--- a/source/CMakeLists.txt
 b/source/CMakeLists.txt
+@@ -43,6 +43,10 @@ string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR
+ set(X86_ALIASES x86 i386 i686 x86_64 amd64)
+ list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
+ if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1")
++  if(CMAKE_LIBRARY_ARCHITECTURE STREQUAL "x86_64-linux-gnux32")
++message(STATUS "Detected x32 target system")
++set(X32 1)
++  else()
+ message(STATUS "Detected x86 target processor")
+ set(X86 1)
+ add_definitions(-DX265_ARCH_X86=1)
+@@ -50,6 +54,7 @@ if("${SYSPROC}" STREQUAL "" OR X86MATCH
+ set(X64 1)
+ add_definitions(-DX86_64=1)
+ endif()
++  endif()
+ elseif(${SYSPROC} STREQUAL "armv6l")
+ message(STATUS "Detected ARM target processor")
+ set(ARM 1)
+@@ -86,6 +91,8 @@ endif(UNIX)
+ 
+ if(X64 AND NOT WIN32)
+ option(ENABLE_PIC "Enable Position Independent Code" ON)
++elseif(X32)
++option(ENABLE_PIC "Enable Position Independent Code" ON)
+ else()
+ option(ENABLE_PIC "Enable Position Independent Code" OFF)
+ endif(X64 AND NOT WIN32)
diff -Nru x265-1.7/debian/patches/series x265-1.7/debian/patches/series
--- x265-1.7/debian/patches/series	2015-06-18 18:59:27.0 +0200
+++ x265-1.7/debian/patches/series	2015-07-13 14:46:22.0 +0200
@@ -1,3 +1,4 @@
 compile-flags.patch
 highbit-depth-path.patch
 gcc-check.patch
+fix_x32.patch