Bug#1038737: FTBFS on mips64el: Unable to import PyChromecast

2023-06-21 Thread Dmitry Shachnev
Hi Adrian!

On Wed, Jun 21, 2023 at 12:25:53PM +0300, Adrian Bunk wrote:
> python3-pychromecast is also an unconditional runtime dependency,
> so building on an architecture without it would anyway be pointless
> (and for release architectures break testing migration).
>
> Trying on the porterbox for mips64el, I think the original problem was 
> just a timeout in the cmake "import pychromecast" test, the patch below
> works for me.

Indeed, your patch is the proper fix. Thank you!

--
Dmitry Shachnev


signature.asc
Description: PGP signature


Bug#1038737: FTBFS on mips64el: Unable to import PyChromecast

2023-06-21 Thread Adrian Bunk
On Tue, Jun 20, 2023 at 08:31:34PM +0300, Dmitry Shachnev wrote:
> Source: photoqt
> Version: 3.3+ds-1
>...
> I have attached a patch which should fix this problem. At least it seems to
> do so on riscv64.
> 
> Also, I think with my change you can drop disable-pychromecast patch which
> is currently commented out anyway.

python3-pychromecast is also an unconditional runtime dependency,
so building on an architecture without it would anyway be pointless
(and for release architectures break testing migration).

Trying on the porterbox for mips64el, I think the original problem was 
just a timeout in the cmake "import pychromecast" test, the patch below
works for me.

> Dmitry Shachnev

cu
Adrian


diff -Nru photoqt-3.3+ds/debian/control photoqt-3.3+ds/debian/control
--- photoqt-3.3+ds/debian/control   2023-06-19 07:17:44.0 +
+++ photoqt-3.3+ds/debian/control   2023-06-19 07:17:44.0 +
@@ -23,7 +23,7 @@
  python3-pip,
  python3-dev,
  python3-requests,
- python3-pychromecast [!ia64 !kfreebsd-amd64 !kfreebsd-i386 !sparc64 !sh4 
!riscv64 !m68k !hppa !mips64el],
+ python3-pychromecast,
  qtbase5-dev,
  qt5-qmake,
  qttools5-dev,
diff -Nru photoqt-3.3+ds/debian/patches/disable-pychromecast 
photoqt-3.3+ds/debian/patches/disable-pychromecast
--- photoqt-3.3+ds/debian/patches/disable-pychromecast  2022-04-08 
07:02:42.0 +
+++ photoqt-3.3+ds/debian/patches/disable-pychromecast  1970-01-01 
00:00:00.0 +
@@ -1,56 +0,0 @@
-Description: 
- TODO: Put a short summary on the line above and replace this paragraph
- with a longer explanation of this change. Complete the meta-information
- with other relevant fields (see below for details). To make it easier, the
- information below has been extracted from the changelog. Adjust it or drop
- it.
- .
- photoqt (2.6-1) unstable; urgency=medium
- .
-   * New upstream version.
-Author: Gürkan Myczko 
-

-The information above should follow the Patch Tagging Guidelines, please
-checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
-are templates for supplementary fields that you might want to add:
-
-Origin: , 
-Bug: 
-Bug-Debian: https://bugs.debian.org/
-Bug-Ubuntu: https://launchpad.net/bugs/
-Forwarded: 
-Reviewed-By: 
-Last-Update: 2022-04-08
-
 photoqt-2.6.orig/CMakeLists.txt
-+++ photoqt-2.6/CMakeLists.txt
-@@ -318,17 +318,17 @@ if(CHROMECAST)
- message(FATAL_ERROR "** Unable to locate Python3 Interpreter... is it 
installed?")
- else()
- execute_process(COMMAND ${Python3_EXECUTABLE} -c "import 
pychromecast" RESULT_VARIABLE EXIT_CODE OUTPUT_QUIET TIMEOUT 2)
--if(NOT ${EXIT_CODE} EQUAL 0)
--# try installing it with pip
--message(">> Attempt to install pychromecast locally using pip...")
--execute_process(COMMAND ${Python3_EXECUTABLE} -m pip install 
pychromecast --user RESULT_VARIABLE EXIT_CODE OUTPUT_QUIET TIMEOUT 2)
--execute_process(COMMAND ${Python3_EXECUTABLE} -c "import 
pychromecast" RESULT_VARIABLE EXIT_CODE OUTPUT_QUIET TIMEOUT 2)
--if(NOT ${EXIT_CODE} EQUAL 0)
--message(FATAL_ERROR "** Unable to locate Python3 module 
pychromecast. Please first install it or disable Chromecast support.")
--else()
--message(">> Success!")
--endif()
--endif()
-+#if(NOT ${EXIT_CODE} EQUAL 0)
-+## try installing it with pip
-+#message(">> Attempt to install pychromecast locally using 
pip...")
-+#execute_process(COMMAND ${Python3_EXECUTABLE} -m pip install 
pychromecast --user RESULT_VARIABLE EXIT_CODE OUTPUT_QUIET TIMEOUT 2)
-+#execute_process(COMMAND ${Python3_EXECUTABLE} -c "import 
pychromecast" RESULT_VARIABLE EXIT_CODE OUTPUT_QUIET TIMEOUT 2)
-+#if(NOT ${EXIT_CODE} EQUAL 0)
-+#message(FATAL_ERROR "** Unable to locate Python3 module 
pychromecast. Please first install it or disable Chromecast support.")
-+#else()
-+#message(">> Success!")
-+#endif()
-+#endif()
- include_directories(${Python3_INCLUDE_DIRS})
- target_link_libraries(${PROJECT_NAME} ${Python3_LIBRARIES})
- message("** Chromecast support enabled")
diff -Nru 
photoqt-3.3+ds/debian/patches/increase-pychromecast-test-timeout.patch 
photoqt-3.3+ds/debian/patches/increase-pychromecast-test-timeout.patch
--- photoqt-3.3+ds/debian/patches/increase-pychromecast-test-timeout.patch  
1970-01-01 00:00:00.0 +
+++ photoqt-3.3+ds/debian/patches/increase-pychromecast-test-timeout.patch  
2023-06-19 07:17:44.0 +
@@ -0,0 +1,14 @@
+Description: Increase the timeout for the pychromecast test
+Author: Adrian Bunk 
+
+--- photoqt-3.3+ds.orig/CMakeLists.txt
 photoqt-3.3+ds/CMakeLists.txt
+@@ -370,7 +370,7 @@ if(CHROMECAST)
+ elseif(NOT ${Python3_Interpreter_FOUND})
+ message(FATAL_ERROR "** Unable to locate P

Bug#1038737: FTBFS on mips64el: Unable to import PyChromecast

2023-06-20 Thread Dmitry Shachnev
Source: photoqt
Version: 3.3+ds-1
Severity: serious
Tags: ftbfs patch
Justification: fails to build from source (but built successfully in the past)

Dear Maintainer,

The latest photoqt upload failed to build on mips64el, m68k and riscv64.
mips64el is a release architecture, this I set severity to serious.

The error is:

  Traceback (most recent call last):
File "", line 1, in 
  ModuleNotFoundError: No module named 'pychromecast'
  CMake Error at CMakeLists.txt:386 (message):
** Unable to import PyChromecast, make sure it is installed.  Enabling the
CHROMECAST_PIPINSTALL option allows CMake to try to install it locally
using pip.


  -- Configuring incomplete, errors occurred!

I have attached a patch which should fix this problem. At least it seems to
do so on riscv64.

Also, I think with my change you can drop disable-pychromecast patch which
is currently commented out anyway.

--
Dmitry Shachnev
--- photoqt-3.3+ds/debian/rules
+++ photoqt-3.3+ds/debian/rules
@@ -13,10 +13,7 @@
 ifeq ($(DEB_BUILD_ARCH_OS),kfreebsd)
 MAGICK = -DGRAPHICSMAGICK=OFF -DIMAGEMAGICK=OFF
 endif
-ifeq ($(DEB_BUILD_ARCH_OS),ia64)
-CHROMECAST = -DCHROMECAST=OFF
-endif
-ifeq ($(DEB_BUILD_ARCH_OS),x86_64)
+ifneq (,$(filter $(DEB_BUILD_ARCH),ia64 kfreebsd-amd64 kfreebsd-i386 sparc64 sh4 riscv64 m68k hppa mips64el))
 CHROMECAST = -DCHROMECAST=OFF
 endif
 ifeq ($(DEB_BUILD_ARCH_OS),hppa)


signature.asc
Description: PGP signature