An update ...

This build error was on our production 32 bit systems. We are just know in the process of transitioning to 64 bit systems. (We have a lot of legacy and limited downtime opportunities to make big changes. We are also a little short on staff.)

I extracted this build issue into a simple test file, main.cpp, which is attached. I then tried to reproduce the build error on on both systems. These results are also attached. Bottom line the build issue is present only on 32 bit system.

I am guessing you all have transitioned to 64 bits for your build system, etc. What is your policy statement on 32 bit systems? Try not break them? They deserve to get broken? ??? For me I will probably just transition my work to 64 bits even if our legacy stays 32 bits for a while longer.

Sincerely,
Carl

On 5/15/2012 10:04 AM, Carl Schumann wrote:
Qt Developers,

For qtbase when I do a configure -developer-build; gmake on my Linux system I get a build error:
cd qtendian/ && gmake -f Makefile
/scratch/schumann/gerrit3/qtbase/tests/auto/corelib/global/qtendian
------Omitting successful compiles.------
g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_XCB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_TESTLIB_LIB -DQT_TESTCASE_BUILDDIR=\"/scratch/schumann/gerrit3/qtbase/tests/auto/corelib/global/qtendian\" -DQT_CORE_LIB -DQT_HAVE_SSE2 -DQT_HAVE_SSE3 -DQT_HAVE_SSSE3 -DQT_SHARED -I../../../../../mkspecs/linux-g++ -I. -I../../../../../include/QtCore -I../../../../../include/QtTest -I../../../../../include -I.moc/debug-shared -o .obj/debug-shared/tst_qtendian.o tst_qtendian.cpp tst_qtendian.cpp:75: error: integer constant is too large for 'long' type
The content of /scratch/schumann/gerrit3/qtbase/tests/auto/corelib/global/qtendian/tst_qtendian.cpp:75 is:
static const TestData inNativeEndian = { 0x0123456789abcdef, 0x00c0ffee, 0xcafe, 0xcf, '\0' };

TestData's first member is a quint64.  Based on
/scratch/schumann/gerrit3/qtbase/src/corelib/global/qglobal.h:203:typedef unsigned long long quint64; /* 64 bit unsigned */
and quint64's name I would expect it to be a 64-bit integer. Apparently, it is merely a long some how in my environment.

Any ideas please?  Thanks as always for any help.

Sincerely,
Carl Schumann



clx76:type_check $ g++ --version
g++ (GCC) 4.4.5 20110214 (Red Hat 4.4.5-6)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

clx76:type_check $ uname -a
Linux clx76.fnal.gov 2.6.32-220.13.1.el6.x86_64 #1 SMP Tue Apr 17 15:16:22 CDT 
2012 x86_64 x86_64 x86_64 GNU/Linux
clx76:type_check $ g++ main.cpp && ./a.out 
sizeof(short)              is 2
sizeof(int)                is 4
sizeof(long)               is 8
sizeof(long long)          is 8
sizeof(unsigned long long) is 8
clx76:type_check $ 
#include <iostream>

typedef signed char qint8;         /* 8 bit signed */
typedef unsigned char quint8;      /* 8 bit unsigned */
typedef short qint16;              /* 16 bit signed */
typedef unsigned short quint16;    /* 16 bit unsigned */
typedef int qint32;                /* 32 bit signed */
typedef unsigned int quint32;      /* 32 bit unsigned */
typedef long long qint64;           /* 64 bit signed */
typedef unsigned long long quint64; /* 64 bit unsigned */

struct TestData
{
    quint64 data64;
    quint32 data32;
    quint16 data16;
    quint8 data8;

    quint8 reserved;
};

static const TestData inNativeEndian = { 0x0123456789abcdef, 0x00c0ffee, 
0xcafe, 0xcf, '\0' };

int main( int argc, char *argv[] )
{
    std::cout << "sizeof(short)              is " << sizeof(short) << std::endl;
    std::cout << "sizeof(int)                is " << sizeof(int) << std::endl;
    std::cout << "sizeof(long)               is " << sizeof(long) << std::endl;
    std::cout << "sizeof(long long)          is " << sizeof(long long) << 
std::endl;
    std::cout << "sizeof(unsigned long long) is " << sizeof(unsigned long long) 
<< std::endl;
}
clx39:type_check $ g++ --version
g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

clx39:type_check $ uname -a
Linux clx39.fnal.gov 2.6.18-308.4.1.el5PAE #1 SMP Tue Apr 17 15:07:30 EDT 2012 
i686 i686 i386 GNU/Linux
clx39:type_check $ g++ main.cpp && ./a.out 
main.cpp:22: error: integer constant is too large for 'long' type
clx39:type_check $ 
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to