[Qt-interest] compile error when change from ubuntu/debian to centos

Iwan Budi Kusnanto iwanbk at gmail.com
Wed Jun 9 20:22:18 CEST 2010


On Thu, Jun 10, 2010 at 1:03 AM, Colin S. Miller
<no-spam-thank-you at csmiller.demon.co.uk> wrote:
> Iwan Budi Kusnanto wrote:
>> Hi,
>> my qt app was fine when built in ubuntu/debian.
>> In my centos machine, compilation failed.
>> Below is the  error message, any idea?
>>
>> [iwan at paijo travel]$ /usr/lib/qt4/bin/qmake
>> [iwan at paijo travel]$ make
>> g++ -c -pipe -O2 -Wall -W -D_REENTRANT  -DQT_NO_DEBUG -DQT_SQL_LIB
>> -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
>> -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/lib/qt4/include/QtCore
>> -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtGui
>> -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtSql
>> -I/usr/lib/qt4/include/QtSql -I/usr/lib/qt4/include -I. -I. -o main.o
>> main.cpp
>> /usr/lib/qt4/include/QtCore/qatomic_i386.h: In function ‘int
>> q_atomic_test_and_set_ptr(volatile void*, void*, void*)’:
>> /usr/lib/qt4/include/QtCore/qatomic_i386.h:58: error: cast from
>> ‘void*’ to ‘int’ loses precision
>> /usr/lib/qt4/include/QtCore/qatomic_i386.h:59: error: cast from
>> ‘void*’ to ‘int’ loses precision
>> /usr/lib/qt4/include/QtCore/qatomic_i386.h: In function ‘void*
>> q_atomic_set_ptr(volatile void*, void*)’:
>> /usr/lib/qt4/include/QtCore/qatomic_i386.h:98: error: cast from
>> ‘void*’ to ‘int’ loses precision
>> make: *** [main.o] Error 1
>>
>>
> Iwan,
>
> it looks like void* is now wider that int.
> As a guess, the new machine is using 64-bit pointers.
>
> What versions of GCC where you using, and were the
> machines running the 32 bit or 64 bit kernel?

Hi Colin,
[iwan at paijo travel]$ gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)

iwan at paijo travel]$ uname -a
Linux paijo.paijo.client.qvps.net 2.6.18-194.3.1.el5xen #1 SMP Thu May
13 13:49:53 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

The machine is a xen vps(virtual private server) running centos 5.5 64 bit.
Is Qt not compatible yet with 64 bit?
>
> HTH,
> Colin S. Miller
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>



-- 
Iwan Budi Kusnanto




More information about the Qt-interest-old mailing list