Results 1 to 6 of 6

Thread: QT 4.6.0 with threads - UIC segmentation error

  1. #1

    Default QT 4.6.0 with threads - UIC segmentation error

    Dear all,
    I am experiencing the famous "Segmentation Error" of UIC, and I would say I have found what make it happens. I did not find how to solve it.

    ./configure -verbose -embedded arm -xplatform qws/linux-arm-g++ -no-qvfb -no-fontconfig -dbus -force-pkg-config -no-freetype -no-iconv -no-javascript-jit -no-script -no-scripttools -no-webkit -depths all -qt-mouse-tslib -I/usr/local/linux-arm/include -I/home/edmondo/project/sdimage/part4/usr/include/ -L/usr/local/linux-arm/lib -L/home/edmondo/project/sdimage/part4/dbuslib -prefix /usr/local/qt4arm -lpthread

    This configuration does not work: when you make you get an error

    /home/edmondo/project/sysapps/host/qt-everywhere-opensource-src-4.6.1/bin/uic dialogs/qprintwidget.ui -o .uic/release-shared-emb-arm/ui_qprintwidget.h
    /home/edmondo/project/sysapps/host/qt-everywhere-opensource-src-4.6.1/bin/uic dialogs/qpagesetupwidget.ui -o .uic/release-shared-emb-arm/ui_qpagesetupwidget.h
    make[1]: *** [.uic/release-shared-emb-arm/ui_qpagesetupwidget.h] Segmentation fault
    make[1]: *** Cancellazione di `.uic/release-shared-emb-arm/ui_qpagesetupwidget.h'
    make[1]: Leaving directory `/home/edmondo/project/sysapps/host/qt-everywhere-opensource-src-4.6.1/src/gui'
    make: *** [sub-gui-make_default-ordered] Error 2


    The same happen building with -dbus-linked

    But, if you build without dbus, you do not need anymore -lpthread. And there it works!

    ./configure -verbose -embedded arm -xplatform qws/linux-arm-g++ -no-qvfb -no-fontconfig -fast -force-pkg-config -no-freetype -no-iconv -no-javascript-jit -no-script -no-scripttools -no-webkit -depths all -qt-mouse-tslib -I/usr/local/linux-arm/include -L/usr/local/linux-arm/lib -prefix /usr/local/qt4arm


    Any idea on how to solve that? please
    Regards
    Edmondo

  2. #2

    Default Re: QT 4.6.0 with threads - UIC segmentation error

    Dear all,
    I solved myself the mistery. It is very tricky and only thanks to a previous experience I wondered what was wrong.

    When you configure, the compiler and the linker look for libraries in LD_LIBRARY_PATH environment variable.
    Then, you call the configure passing -I and -L and you add further folders to the linking and include paths.

    Well, what happened to me and the other guys who have this uic error?
    The uic gets compiled against libraries in a certain folder but the includes used are not the right ones. Tipically, in one of the folders you specified with the -I option there is an header in conflict with one of the libraries. What you simply have to do is to verify that the folders you added with -I contain only the header you needs to link against the libraries you are specifying with the -L option.

    The reason for the segmentation error is very simple.
    Imagine you are linking against lib.so version 2. Version 2 contains for object A three methods in the header.
    Imagine you then include the objecta.h in the project, but it is version 1 and only includes two methods.

    What is going to happen is that, when you free or allocate an object A, this is going to have a size which is different from the expected one. This will result in a segmentation error, especially when you free the object.

    In my case I was compilng and linking against dbus.
    1) My -I/home/edmondo/project/sdimage/part4/usr/include/ is simply the /usr/include folders of a debian linux version for an ARM embedded device on a SD mounted on /home/edmondo/project/sdimage/part4/ .
    2) I was including this folders to contains the header for the dbus library which I was linking against: -L/home/edmondo/project/sdimage/part4/dbuslib
    3) the folder /home/edmondo/project/sdimage/part4/usr/include/ contains other includes! This were taken at the place of the ones of my host machine (my kubuntu laptop) but then uic was linked against the libraries of my kubuntu laptop.

    How did I solve that? I copied the dbus includes in a different folder, and i -I the folders containing only the dbus includes.

    Hope that can be helpful
    Best Regards
    Edmondo

  3. #3

    Default Re: QT 4.6.0 with threads - UIC segmentation error

    Anyways, that was not a matter of thread

  4. #4
    Join Date
    Sep 2009
    Posts
    39
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: QT 4.6.0 with threads - UIC segmentation error

    Hi to all...
    I need to know how to install Qt Embedded 4.6.1 for ARM compiler. Im using ARM 9 (i.MX31) Board. I need to compile phonon for board. I did like
    ./configure -embedded arm -nomake examples -nomake demos -phonon

    I'm getting errors as
    You have not explicitly asked to use pkg-config and are cross-compiling. pkg-config will not be used to automatically query cflag/lib parameters for dependencies


    phonon cannot be installed due to fuctionality tests. I need to know any changes has to be made on qconfig.pri or How to compile phonon

  5. #5

    Default Re: QT 4.6.0 with threads - UIC segmentation error

    1) please be aware the some of the test scripts contain bugs.for example, the test for symbol visibility if you use gcc 3.3.4 does not work.
    2) If you see my /configure call, you will see I excluded some packages. This is because they are already compiled for your host machine, and then of course they are not binary compatible with your ARM processor. In theory I guess you can include them by cross-compiling them and by adding them as libraries with the -L option
    3) Finally, I think I can help you. but please post all the output of your /configure.

    Best Regards
    Edmondo

  6. #6
    Join Date
    Nov 2010
    Posts
    1
    Qt products
    Qt/Embedded

    Default Re: QT 4.6.0 with threads - UIC segmentation error

    Also, It important in some cases, you MUST go to src/tools/bootstrap, do changes in makefile, make clean && make , and later go to src/tools/uic and re-make it, because it uses -lbootstrap WITH broken code.

Similar Threads

  1. Segmentation Fault
    By freekill in forum Qt Programming
    Replies: 2
    Last Post: 5th February 2010, 15:31
  2. Segmentation error at a simple return this->property ?
    By Daimonie in forum Qt Programming
    Replies: 6
    Last Post: 18th February 2009, 10:41
  3. segmentation fault error
    By sagi in forum Installation and Deployment
    Replies: 2
    Last Post: 25th July 2008, 05:37
  4. Replies: 9
    Last Post: 6th September 2007, 08:13
  5. segmentation fault
    By shamik in forum Qt Programming
    Replies: 3
    Last Post: 24th November 2006, 07:33

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
  •  
Qt is a trademark of The Qt Company.