Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on pip install pikepdf on Debian 9 - QPDFAnnotationObjectHelper.hh: No such file or directory #147

Closed
Lucas-C opened this issue Nov 2, 2020 · 5 comments

Comments

@Lucas-C
Copy link
Contributor

Lucas-C commented Nov 2, 2020

There are the steps I followed:

$ lsb_release -a
Distributor ID: Debian
Description:    Debian GNU/Linux 9.13 (stretch)
Release:        9.13
Codename:       stretch
$ apt install -y libxml2-dev libxslt-dev qpdf libqpdf-dev
$ apt-get -s install libqpdf-dev qpdf
libqpdf-dev is already the newest version (6.0.0-2).
qpdf is already the newest version (6.0.0-2).
$ pip3 --version
pip 20.2.4 from /home/lucas/.local/lib/python3.10/site-packages/pip (python 3.10)
$ pip3 install pikepdf
Collecting pikepdf
  Using cached pikepdf-1.19.3.tar.gz (2.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: pikepdf
  Building wheel for pikepdf (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python3.10 /home/lucas/.local/lib/python3.10/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpqol28chs
       cwd: /tmp/pip-install-ixcnvvbx/pikepdf
  Complete output (37 lines):
...
  gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -g -Og -Wall -fPIC -DVERSION_INFO="1.19.3" -I/tmp/pip-build-env-o0uq_xyp/overlay/lib/python3.10/site-packages/pybind11/include -I/usr/local/include/python3.10d -c src/qpdf/annotation.cpp -o build/temp.linux-x86_64-3.10-pydebug/src/qpdf/annotation.o -std=c++14 -fvisibility=hidden
  src/qpdf/annotation.cpp:16:46: fatal error: qpdf/QPDFAnnotationObjectHelper.hh: No such file or directory
   #include <qpdf/QPDFAnnotationObjectHelper.hh>
                                                ^
  compilation terminated.
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for pikepdf
Failed to build pikepdf
ERROR: Could not build wheels for pikepdf which use PEP 517 and cannot be installed directly
@Lucas-C
Copy link
Contributor Author

Lucas-C commented Nov 2, 2020

QPDFAnnotationObjectHelper.hh is indeed missing on my system, despite having installed the libqpdf-dev 6.0.0-2 package:

$ dpkg -L libqpdf-dev | grep 'include/qpdf/'
/usr/include/qpdf/Constants.h
/usr/include/qpdf/DLL.h
/usr/include/qpdf/Types.h
/usr/include/qpdf/qpdf-c.h
/usr/include/qpdf/Buffer.hh
/usr/include/qpdf/BufferInputSource.hh
/usr/include/qpdf/FileInputSource.hh
/usr/include/qpdf/InputSource.hh
/usr/include/qpdf/Pipeline.hh
/usr/include/qpdf/Pl_Buffer.hh
/usr/include/qpdf/Pl_Concatenate.hh
/usr/include/qpdf/Pl_Count.hh
/usr/include/qpdf/Pl_Discard.hh
/usr/include/qpdf/Pl_Flate.hh
/usr/include/qpdf/Pl_StdioFile.hh
/usr/include/qpdf/PointerHolder.hh
/usr/include/qpdf/QPDF.hh
/usr/include/qpdf/QPDFExc.hh
/usr/include/qpdf/QPDFObjGen.hh
/usr/include/qpdf/QPDFObject.hh
/usr/include/qpdf/QPDFObjectHandle.hh
/usr/include/qpdf/QPDFTokenizer.hh
/usr/include/qpdf/QPDFWriter.hh
/usr/include/qpdf/QPDFXRefEntry.hh
/usr/include/qpdf/QTC.hh
/usr/include/qpdf/QUtil.hh
/usr/include/qpdf/RandomDataProvider.hh

@Lucas-C
Copy link
Contributor Author

Lucas-C commented Nov 2, 2020

Seems like QPDFAnnotationObjectHelper.hh did not existed before QPDF 8.1.0: qpdf/qpdf@0b05111

I should have RTFM...

pikepdf requires: libqpdf 10.0.3 or higher from the QPDF project.

@jbarlow83
Copy link
Member

jbarlow83 commented Nov 2, 2020 via email

@Lucas-C
Copy link
Contributor Author

Lucas-C commented Nov 2, 2020

I did that and also installed libqpdf-dev 10.0.3-1 from Debian unstable channel.
The error has changed, but there is still an issue :

...
  Traceback (most recent call last):
    File "/home/lucas/.local/lib/python3.10/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
      main()
    File "/home/lucas/.local/lib/python3.10/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/lucas/.local/lib/python3.10/site-packages/pip/_vendor/pep517/_in_process.py", line 204, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/tmp/pip-build-env-0w3wltvt/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 216, in build_wheel
      return self._build_with_temp_dir(['bdist_wheel'], '.whl',
    File "/tmp/pip-build-env-0w3wltvt/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 202, in _build_with_temp_dir
      self.run_setup()
    File "/tmp/pip-build-env-0w3wltvt/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 145, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 157, in <module>
      setup(
    File "/tmp/pip-build-env-0w3wltvt/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/usr/local/lib/python3.10/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/local/lib/python3.10/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/local/lib/python3.10/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/pip-build-env-0w3wltvt/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 328, in run
      impl_tag, abi_tag, plat_tag = self.get_tag()
    File "/tmp/pip-build-env-0w3wltvt/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 278, in get_tag
      assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
  AssertionError: would build wheel with unsupported tag ('cp310', 'cp310d', 'linux_x86_64')
  ----------------------------------------
  ERROR: Failed building wheel for pikepdf

@Lucas-C
Copy link
Contributor Author

Lucas-C commented Nov 2, 2020

This new error is not related to pikepdf: pypa/wheel#354

Hence I'm closing this

@Lucas-C Lucas-C closed this as completed Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants