Results 1 to 7 of 7

Thread: Qt 4.1.2 Fails to build on Linux

  1. #1
    Join Date
    Apr 2006
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Unhappy Qt 4.1.2 Fails to build on Linux

    Hello,

    I use Arch Linux and Frugalware Linux. I have built and installed Qt 4.1.1 open source edition on arch linux. It worked perfectly.

    However trying to compile Qt 4.1.2 fails with this error :

    network/q3dns.cpp: In constructor 'Q3DnsAnswer::Q3DnsAnswer(Q3DnsQuery*)':
    network/q3dns.cpp:267: internal compiler error: Segmentation fault

    It is the first time I have seen the compiler segfault. Arch has gcc 4.0.3 and frugalware has gcc 4.1. Both give the same error. I have posted the error here :

    http://aur.archlinux.org/packages.ph...phans=0&SeB=nd

    My comment is the last one, and the person above me too has the same type of error. I have confirmed one more person cannot compile it, and yet one more who can. Which is still confusing .. is it a random error ?

    The buildscript I use is this -- http://aur.archlinux.org/packages/qt4/qt4/PKGBUILD

    Basically I use this script because it helps me make a package for my distribution. Please help me, and post your results, and any suggestions.
    Since this is a p3 550mhz 256mb ram, it compiles very slow, and hence it may take some time before I can post my results.

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.1.2 Fails to build on Linux

    I guess here's the solution:
    Comment by: shastry on 20060310 [10:32:31]
    Hmm a compiler error. are you using stuff from testing ? (the new gcc/glibc combo may be?)
    Compiles fine using current... for everyone..

    If you are using testing stuff, try downgrading to current and give it a shot.

    Comment by: UnrealX on 20060310 [12:25:09]
    Downgraded to current and everything went fine. Thanks for this package again.
    I use GCC 3.3.6 on my system (PLD Linux) and everything compiles fine. I've tried GCC 4.x once and got random internal compiler errors (AFAIR I was using Qt 3 at that time).

  3. #3
    Join Date
    Apr 2006
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Qt 4.1.2 Fails to build on Linux

    Arch current contains gcc 4.0.3 and glibc 2.3.6, so shastry's comment is not longer valid. Also, the same system compiled and ran Qt 4.1.1 fine. I am posting that error message from gcc 4.1 based frugalware, though. The problem with gcc 4.1 is that it doesnt allow

    Qt Code:
    1. foo :: foo (args)
    To copy to clipboard, switch view to plain text mode 

    you need to type

    Qt Code:
    1. foo (args)
    To copy to clipboard, switch view to plain text mode 

    I experienced the same problem while compiling knemo, but the compiled didnt segfault at that time. Is there any gcc 4.1 patch for Qt 4.1.2 available ?

    Rohan.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.1.2 Fails to build on Linux

    Quote Originally Posted by rohandhruva
    gcc 4.1 is that it doesnt allow

    Qt Code:
    1. foo :: foo (args)
    To copy to clipboard, switch view to plain text mode 

    you need to type

    Qt Code:
    1. foo (args)
    To copy to clipboard, switch view to plain text mode 
    Well... that's really weird. A new kind of C++?

    Q3DnsAnswer::Q3DnsAnswer() looks like any other constructor --- there's nothing special about it:
    Qt Code:
    1. Q3DnsAnswer::Q3DnsAnswer( Q3DnsQuery * query_ )
    2. {
    3. ok = true;
    4.  
    5. answer = 0;
    6. size = 0;
    7. query = query_;
    8. pp = 0;
    9. rrs = new Q3PtrList<Q3DnsRR>;
    10. rrs->setAutoDelete( false );
    11. next = size;
    12. ttl = 0;
    13. label.clear();
    14. rr = 0;
    15.  
    16. Q3DnsRR * newrr = new Q3DnsRR( query->l );
    17. newrr->t = query->t;
    18. newrr->deleteTime = query->started + 10;
    19. newrr->expireTime = query->started + 10;
    20. newrr->nxdomain = true;
    21. newrr->current = true;
    22. rrs->append( newrr );
    23. }
    To copy to clipboard, switch view to plain text mode 

    Quote Originally Posted by rohandhruva
    Is there any gcc 4.1 patch for Qt 4.1.2 available ?
    I don't think so. IMO it is better to use a more reliable version of GCC, instead of changing the code.

  5. #5
    Join Date
    Apr 2006
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Qt 4.1.2 Fails to build on Linux

    Yes, I agree patching is not good. Now yet another person on gentoo reported it compiles just fine with gcc 4.1 , though
    Qt Code:
    1. USE="cups gif jpeg opengl png zlib -accessibility -debug -doc -examples -fire bird -mng -mysql -nas -nis -odbc -postgres -sqlite -xinerama"
    To copy to clipboard, switch view to plain text mode 
    meaning that he disabled so much of qt4 !
    Any more brainstorms please ?

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.1.2 Fails to build on Linux

    Quote Originally Posted by rohandhruva
    Now yet another person on gentoo reported it compiles just fine with gcc 4.1 , though
    Qt Code:
    1. USE="cups gif jpeg opengl png zlib -accessibility -debug -doc -examples -fire bird -mng -mysql -nas -nis -odbc -postgres -sqlite -xinerama"
    To copy to clipboard, switch view to plain text mode 
    meaning that he disabled so much of qt4 !
    The biggest difference is that the debug mode was disabled. AFAIR by default Qt is built in both debug and release mode. Did you try passing "-release" option to the configure utility?

    I found this line in the PKGBUILD file:
    sed -i "s|read acceptance|acceptance=yes|" configure
    Why don't you use "-confirm-license" instead?

  7. #7
    Join Date
    Apr 2006
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Qt 4.1.2 Fails to build on Linux

    Ok, i will try passing only -release instead of enabling debug. Also, that PKGBUILD i provided is "shastry"'s now my own, so I am sorry I didnt read ./configure -help fully I will use accept-licence from now on !

    Will post my results ASAP, but it will take about 7 hours to compile, so please keep giving more suggestions !

    Rohan.

    Edit :
    1) What difference does enabling / disabling debug make ? I am very new to qt, and I wanted to start off from learning qt4, not qt3.

    2) Is 'libtool-slay' proper for qt4 ? i.e. delete all .la files found in the package.

    3) Is it recomended to change the official qt CFLAGS ? Since arch and frugalware define their own cflags. However you can see shastry has sed'ed a bit to get qt4 follow them. Is that problematic ?
    Last edited by rohandhruva; 16th April 2006 at 22:02. Reason: Some questions

Similar Threads

  1. Qt + Linux + Eclipse - debug using debug build?
    By will49 in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2012, 06:27
  2. QWT fails in debug build
    By steg90 in forum Qwt
    Replies: 1
    Last Post: 11th November 2011, 06:53
  3. Release build fails to find some resource images
    By MrGarbage in forum Installation and Deployment
    Replies: 3
    Last Post: 8th December 2007, 16:04
  4. Qt 4.3 build fails Suse?linux
    By almost in forum Installation and Deployment
    Replies: 3
    Last Post: 19th July 2007, 21:23
  5. Build error on mac Platform::WaitMouseMoved
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 12th July 2007, 13:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.