[PyQt] Problem porting PyQt5 to FreeBSD

Guido Falsi mad at madpilot.net
Sun Apr 19 21:51:11 BST 2015


Hi,

I'm the maintainer of the FreeBSD port of calibre (with email
madpilot at FreeBSD.org there). Since calibre now requires PyQt5 and there
is, at present, no port in the FreeBSD ports collection for it I'm
trying to create a it but I'm having problems.

Calibre author Kovid Goyal suggested me to write to this list for help.

If necessary you can find some documentation on FreeBSD ports here:

https://www.freebsd.org/doc/handbook/ports.html

and a live listing here:

http://www.freshports.org/

I'm starting from the already existing ports for PyQt4 and modifying them.

I've created the necessary ports to build calibre but am hitting this
error message when trying to compile calibre:

sip: /usr/local/share/py-sip/PyQt5/QtGui/qopenglbuffer.sip:109: __or__()
unsupported function return type - provide %MethodCode and a C++ signature

(at the bottom of the message there is the error in it's context)

which looks strange. At the end of qopenglbuffer.sip there is a
definition for an overloaded | operator which I have not found in Qt
sources, if I remove that and modify the command line for sip to use -t
Qt_5_3_2 then compilation proceeds, failing later due to other problems.

This is anyway an hack, anyone has ideas or suggestions? Could this be a
problem with sip or PyQt5 on FreeBSD?

Thanks in advance for any help.

####### Building extension pictureflow #######
sip -w -c
/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/build/pyqt/pictureflow
-b
/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/build/pyqt/pictureflow/pictureflow.sip.sbf
-I/usr/local/share/py-sip/PyQt5 -x VendorID -t WS_X11 -t Qt_5_4_1 -x
PyQt_Accessibility -x PyQt_SSL -x PyQt_OpenGL -x PyQt_Desktop_OpenGL -x
Py_v3
/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/src/calibre/gui2/pictureflow/pictureflow.sip
sip: /usr/local/share/py-sip/PyQt5/QtGui/qopenglbuffer.sip:109: __or__()
unsupported function return type - provide %MethodCode and a C++ signature
Error while executing: sip -w -c
/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/build/pyqt/pictureflow
-b
/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/build/pyqt/pictureflow/pictureflow.sip.sbf
-I/usr/local/share/py-sip/PyQt5 -x VendorID -t WS_X11 -t Qt_5_4_1 -x
PyQt_Accessibility -x PyQt_SSL -x PyQt_OpenGL -x PyQt_Desktop_OpenGL -x
Py_v3
/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/src/calibre/gui2/pictureflow/pictureflow.sip

Traceback (most recent call last):
  File "setup.py", line 99, in <module>
    sys.exit(main())
  File "setup.py", line 85, in main
    command.run_all(opts)
  File
"/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/setup/__init__.py",
line 181, in run_all
    self.run_cmd(self, opts)
  File
"/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/setup/__init__.py",
line 178, in run_cmd
    cmd.run(opts)
  File
"/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/setup/extensions.py",
line 412, in run
    self.build(ext, dest)
  File
"/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/setup/extensions.py",
line 434, in build
    return self.build_pyqt_extension(ext, dest)
  File
"/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/setup/extensions.py",
line 578, in build_pyqt_extension
    sip = self.build_sip_files(ext, src_dir)
  File
"/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/setup/extensions.py",
line 563, in build_sip_files
    self.check_call(cmd)
  File
"/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/setup/extensions.py",
line 486, in check_call
    subprocess.check_call(*args, **kwargs)
  File "/usr/local/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sip', '-w', '-c',
'/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/build/pyqt/pictureflow',
'-b',
'/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/build/pyqt/pictureflow/pictureflow.sip.sbf',
'-I/usr/local/share/py-sip/PyQt5', '-x', 'VendorID', '-t', 'WS_X11',
'-t', 'Qt_5_4_1', '-x', 'PyQt_Accessibility', '-x', 'PyQt_SSL', '-x',
'PyQt_OpenGL', '-x', 'PyQt_Desktop_OpenGL', '-x', 'Py_v3',
'/wrkdirs/usr/ports/deskutils/calibre/work/calibre-src-2.25.0/src/calibre/gui2/pictureflow/pictureflow.sip']'
returned non-zero exit status 1
*** Error code 1

Stop.
make: stopped in /usr/ports/deskutils/calibre
-- 
Guido Falsi <mad at madpilot.net>


More information about the PyQt mailing list