Package Details: caj2pdf-qt 0.1.6-1

Git Clone URL: https://aur.archlinux.org/caj2pdf-qt.git (read-only, click to copy)
Package Base: caj2pdf-qt
Description: CAJ 转 PDF 转换器(GUI 版本)
Upstream URL: https://caj2pdf-qt.sainnhe.dev
Licenses: GPL
Conflicts: caj2pdf-qt
Provides: caj2pdf-qt
Submitter: sainnhe
Maintainer: sainnhe
Last Packager: sainnhe
Votes: 1
Popularity: 0.000001
First Submitted: 2021-11-20 13:48 (UTC)
Last Updated: 2024-03-31 03:41 (UTC)

Latest Comments

1 2 Next › Last »

chestNut_Lsj commented on 2023-02-27 09:47 (UTC)

@sainnhe 学习到很多,非常感谢!

sainnhe commented on 2023-02-27 08:32 (UTC)

@chestNut_Lsj:

  1. 为什么在conda虚拟环境中安装软件包会这样报错

Arch 的软件包都是用的系统的库,但 conda 有自己的库,两者不一致。

  1. 我该查找什么样的关键字来获取这部分知识

学会自己看一下日志,看到你怀疑有问题的部分就 google。比如这次有一大堆的 Trackback,就有几个地方很值得怀疑,一个是它说 tcl 可能没有正确安装(所以我叫你安装 tcl 试试),一个是它的 python 版本有问题,还有就是 python 路径也不对,包含了 anaconda。当然其实这些都需要经验,接触多了你就知道了。

chestNut_Lsj commented on 2023-02-27 08:25 (UTC)

@sainnhe 果然是这个原因,我之前在学习python和pytorch的时候,为了环境的稳定就让终端会话默认开启conda环境,那个版本是python 3.9.15。当关闭conda环境后再次安装就一切正常了,多谢您的耐心解答。 另外想请教一下为什么在conda虚拟环境中安装软件包会这样报错,或者我该查找什么样的关键字来获取这部分知识?还望不吝赐教

sainnhe commented on 2023-02-27 08:16 (UTC)

@chestNut_Lsj: 问题不在 dist,在 python 打包失败,你没看到一堆的 Traceback 吗?

我现在感觉是你的 python 环境有问题,想确认几件事:

  1. 为啥你的 python 还是 3.9?Arch Linux 不是早就升成 3.10 了吗?
  2. 你的操作系统是 Arch Linux 还是 Arch Linux 衍生发行版?
  3. 你是不是在 anaconda 环境里打包的?

chestNut_Lsj commented on 2023-02-27 08:05 (UTC)

@sainnhe 安装tcl后也并没有解决,报错仍然有关dist目录

sainnhe commented on 2023-02-27 07:40 (UTC)

@chestNut_Lsj: 可能缺一个依赖,试试 pacman -S tcl

chestNut_Lsj commented on 2023-02-27 07:34 (UTC)

@sainnhe 完整的makepkg输出如下:

❯ makepkg -f -s
==> 正在创建软件包:caj2pdf-qt 0.1.5-1 (Mon 27 Feb 2023 03:33:04 PM CST)
==> 正在检查运行时依赖关系...
==> 正在检查编译时依赖关系==> 获取源代码...
  -> 找到 caj2pdf-qt
  -> 找到 caj2pdf
  -> 找到 dev.sainnhe.caj2pdf-qt.desktop
==> 正在验证 source 文件,使用md5sums...
    caj2pdf-qt ... 通过    caj2pdf ... 通过    dev.sainnhe.caj2pdf-qt.desktop ... 通过==> 正在释放源码...
  -> 正在解压缩 caj2pdf-qt,使用 bsdtar
  -> 正在解压缩 caj2pdf,使用 bsdtar
==> 正在删除现存的 $pkgdir/ 目录...
==> 正在开始 build()...
已初始化空的 Git 仓库于 /home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/.git/
[master(根提交) ec7d3eb] Init
 21 files changed, 5421 insertions(+)
 create mode 100644 .github/ISSUE_TEMPLATE/bug_cn.md
 create mode 100644 .gitignore
 create mode 100644 HNParsePage.py
 create mode 100644 LICENSE
 create mode 100644 README.md
 create mode 100755 caj2pdf
 create mode 100644 cajparser.py
 create mode 100755 jbig2dec.py
 create mode 100755 jbigdec.py
 create mode 100644 lib/JBigDecode.cc
 create mode 100644 lib/JBigDecode.h
 create mode 100644 lib/bin/libjbig2codec-w32.dll
 create mode 100644 lib/bin/libjbig2codec-w64.dll
 create mode 100644 lib/bin/libjbigdec-w32.dll
 create mode 100644 lib/bin/libjbigdec-w64.dll
 create mode 100644 lib/decode_jbig2data.cc
 create mode 100644 lib/decode_jbig2data_x.cc
 create mode 100644 lib/jbigdec.cc
 create mode 100644 pdfwutils.py
 create mode 100644 requirements.txt
 create mode 100644 utils.py
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting imagesize==1.3.0
  Using cached https://mirrors.aliyun.com/pypi/packages/60/d6/5e803b17f4d42e085c365b44fda34deb0d8675a1a910635930b831c43f07/imagesize-1.3.0-py2.py3-none-any.whl (5.2 kB)
Collecting PyPDF2==2.2.0
  Using cached https://mirrors.aliyun.com/pypi/packages/3f/1e/9204070476be4b6f598e4c042590385341c6019c862cc73892f31f17b45c/PyPDF2-2.2.0-py3-none-any.whl (189 kB)
Collecting typing-extensions
  Using cached https://mirrors.aliyun.com/pypi/packages/31/25/5abcd82372d3d4a3932e1fa8c3dbf9efac10cc7c0d16e78467460571b404/typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Installing collected packages: typing-extensions, imagesize, PyPDF2
Successfully installed PyPDF2-2.2.0 imagesize-1.3.0 typing-extensions-4.5.0
WARNING: You are using pip version 22.0.4; however, version 23.0.1 is available.
You should consider upgrading via the '/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/bin/python -m pip install --upgrade pip' command.
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting pyinstaller
  Using cached https://mirrors.aliyun.com/pypi/packages/f4/3f/82a27d1b1effafdf6d4cf324e1c41ea139a27a372ad0ab685baaa353ab03/pyinstaller-5.8.0-py3-none-manylinux2014_x86_64.whl (651 kB)
Collecting altgraph
  Using cached https://mirrors.aliyun.com/pypi/packages/cc/ff/88d277ba936d226b0f6dbd6711145f90fcfeed3aa9455c1c2f62c8ffec5b/altgraph-0.17.3-py2.py3-none-any.whl (21 kB)
Collecting pyinstaller-hooks-contrib>=2021.4
  Using cached https://mirrors.aliyun.com/pypi/packages/4d/d5/9c71e599b681aff484b6dc83fb93878ba94dff4a8c098a0571af1c569084/pyinstaller_hooks_contrib-2023.0-py2.py3-none-any.whl (255 kB)
Requirement already satisfied: setuptools>=42.0.0 in ./venv/lib/python3.9/site-packages (from pyinstaller) (58.1.0)
Installing collected packages: altgraph, pyinstaller-hooks-contrib, pyinstaller
Successfully installed altgraph-0.17.3 pyinstaller-5.8.0 pyinstaller-hooks-contrib-2023.0
WARNING: You are using pip version 22.0.4; however, version 23.0.1 is available.
You should consider upgrading via the '/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/bin/python -m pip install --upgrade pip' command.
35 WARNING: Assuming this is not an Anaconda environment or an additional venv/pipenv/... environment manager is being used on top, because the conda-meta folder /home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/conda-meta does not exist.
Traceback (most recent call last):
  File "/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/bin/pyinstaller", line 8, in <module>
    sys.exit(_console_script_run())
  File "/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/lib/python3.9/site-packages/PyInstaller/__main__.py", line 194, in _console_script_run
    run()
  File "/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/lib/python3.9/site-packages/PyInstaller/__main__.py", line 161, in run
    parser = generate_parser()
  File "/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/lib/python3.9/site-packages/PyInstaller/__main__.py", line 128, in generate_parser
    import PyInstaller.building.build_main
  File "/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/lib/python3.9/site-packages/PyInstaller/building/build_main.py", line 28, in <module>
    from PyInstaller.building.api import COLLECT, EXE, MERGE, PYZ
  File "/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/lib/python3.9/site-packages/PyInstaller/building/api.py", line 31, in <module>
    from PyInstaller.building.splash import Splash  # argument type validation in EXE
  File "/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/lib/python3.9/site-packages/PyInstaller/building/splash.py", line 22, in <module>
    from PyInstaller.utils.hooks import tcl_tk as tcltk_utils
  File "/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/lib/python3.9/site-packages/PyInstaller/utils/hooks/tcl_tk.py", line 65, in <module>
    ) = _get_tcl_tk_info()
  File "/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/lib/python3.9/site-packages/PyInstaller/isolated/_parent.py", line 404, in wrapped
    return call(function, *args, **kwargs)
  File "/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/lib/python3.9/site-packages/PyInstaller/isolated/_parent.py", line 373, in call
    return isolated.call(function, *args, **kwargs)
  File "/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/lib/python3.9/site-packages/PyInstaller/isolated/_parent.py", line 311, in call
    raise RuntimeError(f"Child process call to {function.__name__}() failed with:\n" + output)
RuntimeError: Child process call to _get_tcl_tk_info() failed with:
  File "/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/lib/python3.9/site-packages/PyInstaller/isolated/_child.py", line 63, in run_next_command
    output = function(*args, **kwargs)
  File "/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/lib/python3.9/site-packages/PyInstaller/utils/hooks/tcl_tk.py", line 43, in _get_tcl_tk_info
    tcl = tkinter.Tcl()
  File "/opt/anaconda/lib/python3.9/tkinter/__init__.py", line 2372, in Tcl
    return Tk(screenName, baseName, className, useTk)
  File "/opt/anaconda/lib/python3.9/tkinter/__init__.py", line 2270, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories: 
    /build/anaconda/pkg/anaconda/opt/anaconda/lib/tcl8.6 /home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/lib/tcl8.6 /home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/lib/tcl8.6 /home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/venv/library /home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/library /home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/tcl8.6.12/library /home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/tcl8.6.12/library



This probably means that Tcl wasn't installed properly.
-- The CXX compiler identification is GNU 12.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/build
[  6%] Automatic MOC and UIC for target caj2pdf
[  6%] Built target caj2pdf_autogen
[ 31%] Building CXX object CMakeFiles/caj2pdf.dir/src/main.cpp.o
[ 31%] Building CXX object CMakeFiles/caj2pdf.dir/caj2pdf_autogen/mocs_compilation.cpp.o
[ 31%] Building CXX object CMakeFiles/caj2pdf.dir/src/slots/main.cpp.o
[ 31%] Building CXX object CMakeFiles/caj2pdf.dir/src/events.cpp.o
[ 37%] Building CXX object CMakeFiles/caj2pdf.dir/src/slots/page2.cpp.o
[ 50%] Building CXX object CMakeFiles/caj2pdf.dir/src/threads/conversion.cpp.o
[ 50%] Building CXX object CMakeFiles/caj2pdf.dir/src/slots/page3.cpp.o
[ 56%] Building CXX object CMakeFiles/caj2pdf.dir/src/caj2pdf.cpp.o
[ 75%] Building CXX object CMakeFiles/caj2pdf.dir/src/slots/page1.cpp.o
[ 75%] Building CXX object CMakeFiles/caj2pdf.dir/src/ui/main.cpp.o
[ 68%] Building CXX object CMakeFiles/caj2pdf.dir/src/threads/execution.cpp.o
[ 81%] Building CXX object CMakeFiles/caj2pdf.dir/src/ui/page1.cpp.o
[ 87%] Building CXX object CMakeFiles/caj2pdf.dir/src/ui/page2.cpp.o
[ 93%] Building CXX object CMakeFiles/caj2pdf.dir/src/ui/page3.cpp.o
[100%] Linking CXX executable caj2pdf
[100%] Built target caj2pdf
==> 正在进入 fakeroot 环境...
==> 正在开始 package()...
install: 对 '/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/dist/caj2pdf' 调用 stat 失败: 没有那个文件或目录==> 错误: 在 package() 中发生一个错误。    正在放弃...

sainnhe commented on 2023-02-27 07:28 (UTC)

@chestNut_Lsj: 能把完整的 makepkg 日志发过来吗?问题出在前面

chestNut_Lsj commented on 2023-02-27 07:09 (UTC)

@sainnhe: 我尝试了克隆包后makepkg的办法,报错和之前是一致的:

[ 93%] Building CXX object CMakeFiles/caj2pdf.dir/src/ui/page3.cpp.o
[100%] Linking CXX executable caj2pdf
[100%] Built target caj2pdf
==> 正在进入 fakeroot 环境...
==> 正在开始 package()...
install: 对 '/home/westwoods/Downloads/clone_pkgs/caj2pdf-qt/src/caj2pdf-qt-0.1.5/caj2pdf/dist/caj2pdf'
 调用 stat 失败: 没有那个文件或目录
==> 错误: 在 package() 中发生一个错误。
    正在放弃...

我又去对应目录查看了一下,发现原因出在~/src/caj2pdf-qt-0.0.5/caj2pdf/这个目录下,是没有dist目录的,而caj2pdf文件直接存在于此——~/src/caj2pdf-qt-0.0.5/caj2pdf/。我尝试修改了PKGBUILD文件第66行的对应目录,去掉了/dist,结果可以通过makepkg的构建,但程序无法正确运行。 作为一个linux小白,到这一步不会修缮了,还请赐教。

sainnhe commented on 2023-02-26 23:25 (UTC)

@chestNut_Lsj: 能试试克隆这个包然后 makepkg 吗?我这边直接 makepkg 是正常的。

$ git clone --depth 1 https://aur.archlinux.org/caj2pdf-qt.git
$ cd caj2pdf-qt
$ makepkg -s