[PyQt] PyKDE4-4.0.2-1 release available

Jim Bublitz jbublitz at nwinternet.com
Sat Mar 29 22:51:36 GMT 2008


On Saturday 29 March 2008 09:25, you wrote:
> On Friday 28 March 2008 19:50:04 Jim Bublitz wrote:
> > On Friday 21 March 2008 11:24, Danny Pansters wrote:
> > > I've been trying to get this to build on FreeBSD, but the build fails
> > > with both gcc34 and gcc42:
> >
> > Sorry for the slow response - my email to Phil got delayed by a screwup
> > in my mail system.
> >
> > Phil noticed that the methods in the error output all involved mode_t and
> > time_t.  PyKDE4 typedefs those as uint and long respectively in
> > sip/kdecore/typedefs.sip. If FreeBSD is 2038-safe, then time_t is
> > probably 64 bit.
> >
> > Would you be able to find the correct types for FreeBSD, fix
> > typedefs.sip, and try a rebuild/recompile (you'll need to rebuild kdecore
> > and kio at a minimum)?
> >
> > Let me know if that works. If it does, I'll figure out a permanent fix.
> >
> > Jim
>
> Alright, this works:
>
> --- typedefs.sip.orig   2008-03-29 15:03:08.000000000 +0100
> +++ typedefs.sip.new    2008-03-29 17:12:08.000000000 +0100
> @@ -20,11 +20,11 @@
>  // You should have received a copy of the GNU General Public License
>  // along with this program.  If not, see <http://www.gnu.org/licenses/>.
>
> -typedef uint mode_t;
> +typedef ushort mode_t;
>
> -typedef long time_t;
> +typedef int time_t;
>
> -typedef ulong size_t;
> +typedef uint size_t;
>
>  typedef int ssize_t;
>
> @@ -36,7 +36,7 @@
>
>  typedef uint WFlags;
>
> -typedef long off_t;
> +typedef qlonglong off_t;
>
>  typedef uint uid_t;
>
>
> For completeness:
>
> FreeBSD typedefs       [qglobal.h] [on i386]
>
> unsigned int   size_t  [uint]      [uint32_t]
> int            time_t  [int]       [int32_t]
> int            ssize_t [int]       [int32_t]
> int            pid_t   [int]       [int32_t]
> unsigned short mode_t  [ushort]    [int16_t]
> long long      off_t   [qlonglong] [int64_t]
> unsigned int   uid_t   [uint]      [uint32_t]
> unsigned int   gid_t   [uint]      [uint32_t]
>
> Why are you not getting these from qplatformdefs.h but instead redefine
> them?

Because sip, when generating code, doesn't have access to any h files, so 
typedefs need to be provided in a .sip file. But thanks for the pointer to 
the h file - I wasn't aware of it.
>
> I get exactly one warning during compile, should this be worrying (dont
> think so):
>
> c++ -c -Wno-deprecated-declarations -pipe -fPIC -O2 -fno-strict-aliasing
> -pipe -Wall -W -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -I.
> -I../extra/kde402 -I/usr/local/kde4/include -I/usr/local/include/QtCore
> -I/usr/local/include/QtGui -I/usr/local/include/QtXml
> -I/usr/local/include/QtSvg -I/usr/local/kde4/include/solid
> -I/usr/local/kde4/include/kio -I/usr/local/kde4/include/kfile
> -I/usr/local/kde4/include/kssl -I/usr/local/include/python2.5
> -I/usr/local/share/qt4/mkspecs/freebsd-g++ -I/usr/local/include
> -o sipkioKIOJobUiDelegate.o sipkioKIOJobUiDelegate.cpp
> sipkioKIOJobUiDelegate.cpp: In function `PyObject*
> meth_KIO_JobUiDelegate_askFileRename(PyObject*, PyObject*)':
> sipkioKIOJobUiDelegate.cpp:747: warning: converting of negative value
> `-0x00000000000000001' to `long long unsigned int'
> sipkioKIOJobUiDelegate.cpp:748: warning: converting of negative value
> `-0x00000000000000001' to `long long unsigned int'

That happens because KDE programmers assign default argument values = -1 for 
unsigned types, and I've never been consistent in correcting that in the sip 
files. I should probably add a fix during my code generation from the h 
files, but it becomes a problem because unsigned long long, for example, can 
be written half a dozen different ways, and KDE uses all of them, plus 
typedefs.. 

> Anyway, thanks for the hint. If it's tedious to fix it on your end, it's no
> problem for me to just patch typedefs.sip in the freebsd port.

What does uname report for FreeBSD? I can check for that and swap in the 
correct typedefs.sip. 

I have some other fixes, so it'll be a few days before I release a tarball. If 
you want to go ahead and substitute a FreeBSD typedefs.sip for now, that's 
fine.

Jim


More information about the PyQt mailing list