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

Adrian Bunk bunk at debian.org
Wed Jun 21 10:25:53 BST 2023


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.000000000 +0000
+++ photoqt-3.3+ds/debian/control	2023-06-19 07:17:44.000000000 +0000
@@ -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.000000000 +0000
+++ photoqt-3.3+ds/debian/patches/disable-pychromecast	1970-01-01 00:00:00.000000000 +0000
@@ -1,56 +0,0 @@
-Description: <short summary of the patch>
- 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 <tar at debian.org>
-
----
-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: <vendor|upstream|other>, <url of original patch>
-Bug: <url in upstream bugtracker>
-Bug-Debian: https://bugs.debian.org/<bugnumber>
-Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
-Forwarded: <no|not-needed|url proving that it has been forwarded>
-Reviewed-By: <name and email of someone who approved the patch>
-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.000000000 +0000
+++ photoqt-3.3+ds/debian/patches/increase-pychromecast-test-timeout.patch	2023-06-19 07:17:44.000000000 +0000
@@ -0,0 +1,14 @@
+Description: Increase the timeout for the pychromecast test
+Author: Adrian Bunk <bunk at debian.org>
+
+--- 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 Python3 Interpreter... is it installed?")
+     else()
+-        execute_process(COMMAND ${Python3_EXECUTABLE} -c "import pychromecast" RESULT_VARIABLE EXIT_CODE OUTPUT_QUIET TIMEOUT 2)
++        execute_process(COMMAND ${Python3_EXECUTABLE} -c "import pychromecast" RESULT_VARIABLE EXIT_CODE OUTPUT_QUIET TIMEOUT 20)
+         if(NOT ${EXIT_CODE} EQUAL 0)
+             if(CHROMECAST_PIPINSTALL)
+                 # try installing it with pip
diff -Nru photoqt-3.3+ds/debian/patches/series photoqt-3.3+ds/debian/patches/series
--- photoqt-3.3+ds/debian/patches/series	2023-06-19 07:17:44.000000000 +0000
+++ photoqt-3.3+ds/debian/patches/series	2023-06-19 07:17:44.000000000 +0000
@@ -1 +1 @@
-#disable-pychromecast
+increase-pychromecast-test-timeout.patch
diff -Nru photoqt-3.3+ds/debian/rules photoqt-3.3+ds/debian/rules
--- photoqt-3.3+ds/debian/rules	2023-06-19 07:17:44.000000000 +0000
+++ photoqt-3.3+ds/debian/rules	2023-06-19 07:17:44.000000000 +0000
@@ -13,12 +13,6 @@
 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)
-    CHROMECAST = -DCHROMECAST=OFF
-endif
 ifeq ($(DEB_BUILD_ARCH_OS),hppa)
     FI = -DFREEIMAGE=OFF
 endif
@@ -39,5 +33,4 @@
 	-DLIBVIPS=ON \
 	-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \
 	$(MAGICK) \
-	$(CHROMECAST) \
 	$(FI)



More information about the Pkg-phototools-devel mailing list