PythonQt.cpp:1932:42: fatal error: private/qmetaobjectbuilder_p.h: Aucun fichier ou dossier de ce type
#include <private qmetaobjectbuilder_p.h="">
^
compilation terminated.
Makefile:368 : la recette pour la cible « PythonQt.o » a échouée
make[1]: *** [PythonQt.o] Erreur 1
make[1] : on quitte le répertoire « /usr/local/PythonQt3.1/src »
Makefile:79 : la recette pour la cible « sub-src-make_default-ordered » a échouée
make: *** [sub-src-make_default-ordered] Erreur 2</private>
What I'm doing wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For certain features (such as the built-in help() function), Python checks whether it’s a tty. When you’re making an embedded console in PythonQt, this didn’t work. The patch below adds this to stdin.
Hi,
I don't have the qmetaobjectbuilder_p.h, so I add the sources with the qt maintenance tool. because you tell me about the private headers for QtCore. thank you :)
The make build the libPythonQt.so and libPythonQt_QtAll.so and stop again.
don't find :
PyUnicodeUCS2_decodeUTF16 and PyUnicodeUCS2_AsUTF8String :(
thank you for your help .
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I don't have the qmetaobjectbuilder_p.h, so I add the sources with the qt maintenance tool. because you tell me about the private headers for QtCore. thank you :)
The make build the libPythonQt.so and libPythonQt_QtAll.so and stop again.
don't find :
PyUnicodeUCS2_decodeUTF16 and PyUnicodeUCS2_AsUTF8String :(
I change the original PythonQtStdln.cpp for that :
#include "PythonQtStdIn.h"staticPyObject*PythonQtStdInRedirect_new(PyTypeObject*type,PyObject*/*args*/,PyObject*/*kwds*/){PythonQtStdInRedirect*self;self=(PythonQtStdInRedirect*)type->tp_alloc(type,0);self->_cb=NULL;self->_callData=NULL;return(PyObject*)self;}staticPyObject*PythonQtStdInRedirect_readline(PyObject*self,PyObject*args){PythonQtStdInRedirect*s=(PythonQtStdInRedirect*)self;QStringstring;if(s->_cb){string=(*s->_cb)(s->_callData);}returnPy_BuildValue("s",string.toLatin1().constData());}staticPyObjectPythonQtStdInRedirect_isatty(PyObject*self){Py_RETURN_TRUE;}staticPyMethodDefPythonQtStdInRedirect_methods[]={{"readline",(PyCFunction)PythonQtStdInRedirect_readline,METH_VARARGS,"read input line"},{"isatty",(PyCFunction)PythonQtStdInRedirect_isatty,METH_NOARGS,"is this a tty"},{NULL,NULL,0,NULL}};staticPyMemberDefPythonQtStdInRedirect_members[]={{NULL}};PyTypeObjectPythonQtStdInRedirectType={PyVarObject_HEAD_INIT(NULL,0)"PythonQtStdInRedirect",/*tp_name*/sizeof(PythonQtStdInRedirect),/*tp_basicsize*/0,/*tp_itemsize*/0,/*tp_dealloc*/0,/*tp_print*/0,/*tp_getattr*/0,/*tp_setattr*/0,/*tp_compare*/0,/*tp_repr*/0,/*tp_as_number*/0,/*tp_as_sequence*/0,/*tp_as_mapping*/0,/*tp_hash*/0,/*tp_call*/0,/*tp_str*/0,/*tp_getattro*/0,/*tp_setattro*/0,/*tp_as_buffer*/Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,/*tp_flags*/"PythonQtStdInRedirect",/*tp_doc*/0,/*tp_traverse*/0,/*tp_clear*/0,/*tp_richcompare*/0,/*tp_weaklistoffset*/0,/*tp_iter*/0,/*tp_iternext*/PythonQtStdInRedirect_methods,/*tp_methods*/PythonQtStdInRedirect_members,/*tp_members*/0,/*tp_getset*/0,/*tp_base*/0,/*tp_dict*/0,/*tp_descr_get*/0,/*tp_descr_set*/0,/*tp_dictoffset*/0,/*tp_init*/0,/*tp_alloc*/PythonQtStdInRedirect_new,/*tp_new*/};
during the make step I obtain this error :
"
In file included from /usr/local/include/python2.7/Python.h:87:0,
from PythonQtPythonInclude.h:59,
from PythonQtStdIn.h:46,
from PythonQtStdIn.cpp:42:
/usr/local/include/python2.7/boolobject.h:24:46: error: could not convert ‘(((void)(((PyObject)(& _Py_TrueStruct))->_object::ob_refcnt ++)), ((PyObject)(& _Py_TrueStruct)))’ from ‘PyObject {aka _object}’ to ‘PyObject {aka _object}’
#define Py_True ((PyObject *) &_Py_TrueStruct)
best regards,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
On my system I have :
python 2.7.12 & QT5.7
python.prf is : 2.7.
during the building of PythonQt I obtain :
PythonQt.cpp:1932:42: fatal error: private/qmetaobjectbuilder_p.h: Aucun fichier ou dossier de ce type
#include <private qmetaobjectbuilder_p.h="">
^
compilation terminated.
Makefile:368 : la recette pour la cible « PythonQt.o » a échouée
make[1]: *** [PythonQt.o] Erreur 1
make[1] : on quitte le répertoire « /usr/local/PythonQt3.1/src »
Makefile:79 : la recette pour la cible « sub-src-make_default-ordered » a échouée
make: *** [sub-src-make_default-ordered] Erreur 2</private>
What I'm doing wrong?
You are missing core-private, the private headers for QtCore.
Maybe you did not compile/install Qt completely?
Hello,
For certain features (such as the built-in help() function), Python checks whether it’s a tty. When you’re making an embedded console in PythonQt, this didn’t work. The patch below adds this to stdin.
Kind regards,
Sander Stoks
Index: PythonQtStdIn.cpp
--- PythonQtStdIn.cpp (revision 441)
+++ PythonQtStdIn.cpp (working copy)
@@ -61,10 +61,17 @@
return Py_BuildValue("s", string.toLatin1().constData());
}
+static PyObject PythonQtStdInRedirect_isatty(PyObject * /self/)
+{
+ Py_RETURN_TRUE;
+}
+
static PyMethodDef PythonQtStdInRedirect_methods[] = {
{"readline", (PyCFunction)PythonQtStdInRedirect_readline, METH_VARARGS,
"read input line"},
- {NULL, NULL, 0 , NULL} / sentinel /
+ {"isatty", (PyCFunction)PythonQtStdInRedirect_isatty, METH_NOARGS,
+ "is this a tty"},
+ {NULL, NULL, 0 , NULL} / sentinel */
};
static PyMemberDef PythonQtStdInRedirect_members[] = {
Hi,
I don't have the qmetaobjectbuilder_p.h, so I add the sources with the qt maintenance tool. because you tell me about the private headers for QtCore. thank you :)
The make build the libPythonQt.so and libPythonQt_QtAll.so and stop again.
don't find :
PyUnicodeUCS2_decodeUTF16 and PyUnicodeUCS2_AsUTF8String :(
thank you for your help .
Hi,
For future readers: if you were using apt-get to install Qt in your system, you can get this header by doing
sudo apt-get install qtbase5-private-dev
Regards,
Sander
Ok i will try that..
thanks you
Both windows or linux make have a problem with PythonQTdecorators...
Thank you for your answer.
I change the original PythonQtStdln.cpp for that :
during the make step I obtain this error :
"
In file included from /usr/local/include/python2.7/Python.h:87:0,
from PythonQtPythonInclude.h:59,
from PythonQtStdIn.h:46,
from PythonQtStdIn.cpp:42:
/usr/local/include/python2.7/boolobject.h:24:46: error: could not convert ‘(((void)(((PyObject)(& _Py_TrueStruct))->_object::ob_refcnt ++)), ((PyObject)(& _Py_TrueStruct)))’ from ‘PyObject {aka _object}’ to ‘PyObject {aka _object}’
#define Py_True ((PyObject *) &_Py_TrueStruct)
best regards,
Hello,
My apologies - my patch was for an unrelated issue, not related to Linux compilation. I thought I was posting a new topic.
Regards,
Sander Stoks