×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Nokia Developer Expert
    Join Date
    Jun 2009
    Posts
    36

    Question Scratchbox compile differences: x86 v. Armel and UI..

    Hi (again),

    Continuing development of DOFCalculator.

    Code runs fine and displays correctly in QTCreator (very good tool for dev and debug).

    In scratchbox:
    a) X86. builds and runs but UI shapes and sizes are mangled (MainWndow size set to just fill screen on N900). Been trying to read up on Hildonisation but documentation says this should be the default state for all the widgets.

    b) ARMEL build fails

    So two questions:
    1. Am I missing some step or library or ? to create a hildonised look and feel?
    2. What is causing the link failure.

    Note I've run apt-get update and upgrade (made no difference) in both configurations (x86 and Armel). The apt-get update throws a couple of failures before terminating (below as well)

    Your help once again much appreciated.
    BR David

    ARMEL compile output

    [sbox-FREMANTLE_ARMEL: ~/workspaceqt/CameraDOF/CameraDepthOfField] > /opt/qt4-maemo5/bin/qmake -project
    [sbox-FREMANTLE_ARMEL: ~/workspaceqt/CameraDOF/CameraDepthOfField] > /opt/qt4-maemo5/bin/qmake CameraDepthOfField.pro
    [sbox-FREMANTLE_ARMEL: ~/workspaceqt/CameraDOF/CameraDepthOfField] > make
    g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -DQT_GL_NO_SCISSOR_TEST -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include -I. -I. -I. -o dof_functions.o dof_functions.cpp
    g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -DQT_GL_NO_SCISSOR_TEST -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include -I. -I. -I. -o main.o main.cpp
    g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -DQT_GL_NO_SCISSOR_TEST -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include -I. -I. -I. -o mainwindow.o mainwindow.cpp
    g++ -c -pipe -O3 -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -W -D_REENTRANT -DQT_GL_NO_SCISSOR_TEST -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/mkspecs/linux-g++-maemo5 -I. -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_ARMEL/opt/qt4-maemo5/include -I. -I. -I. -o moc_mainwindow.o moc_mainwindow.cpp
    g++ -Wl,-rpath-link,/usr/lib -Wl,-O1 -Wl,--hash-style=gnu -Wl,-rpath,/opt/qt4-maemo5/lib -o CameraDepthOfField dof_functions.o main.o mainwindow.o moc_mainwindow.o -L/opt/qt4-maemo5/lib -lQtGui -L/opt/qt4-maemo5/lib -L/usr/X11R6/lib -lQtCore -lpthread
    mainwindow.o: In function `QList<QString>::detach_helper()':
    mainwindow.cpp.text._ZN5QListI7QStringE13detach_helperEv[QList<QString>::detach_helper()]+0x18): undefined reference to `QListData::detach3()'
    mainwindow.o: In function `Ui_MainWindow::setupUi(QMainWindow*)':
    mainwindow.cpp.text._ZN13Ui_MainWindow7setupUiEP11QMainWindow[Ui_MainWindow::setupUi(QMainWindow*)]+0x274): undefined reference to `QWidget::setInputMethodHints(QFlags<Qt::InputMethodHint>)'
    mainwindow.cpp.text._ZN13Ui_MainWindow7setupUiEP11QMainWindow[Ui_MainWindow::setupUi(QMainWindow*)]+0xa7c): undefined reference to `QWidget::setInputMethodHints(QFlags<Qt::InputMethodHint>)'
    mainwindow.cpp.text._ZN13Ui_MainWindow7setupUiEP11QMainWindow[Ui_MainWindow::setupUi(QMainWindow*)]+0x1764): undefined reference to `QWidget::setInputMethodHints(QFlags<Qt::InputMethodHint>)'
    collect2: ld returned 1 exit status
    make: *** [CameraDepthOfField] Error 1

    X86 Make....

    [sbox-FREMANTLE_X86: ~/workspaceqt/CameraDOF/CameraDepthOfField] > make
    g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_X86/opt/qt4-maemo5/mkspecs/linux-g++ -I. -I/targets/FREMANTLE_X86/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_X86/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_X86/opt/qt4-maemo5/include -I. -I. -I. -o dof_functions.o dof_functions.cpp
    g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_X86/opt/qt4-maemo5/mkspecs/linux-g++ -I. -I/targets/FREMANTLE_X86/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_X86/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_X86/opt/qt4-maemo5/include -I. -I. -I. -o main.o main.cpp
    g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_X86/opt/qt4-maemo5/mkspecs/linux-g++ -I. -I/targets/FREMANTLE_X86/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_X86/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_X86/opt/qt4-maemo5/include -I. -I. -I. -o mainwindow.o mainwindow.cpp
    g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/targets/FREMANTLE_X86/opt/qt4-maemo5/mkspecs/linux-g++ -I. -I/targets/FREMANTLE_X86/opt/qt4-maemo5/include/QtCore -I/targets/FREMANTLE_X86/opt/qt4-maemo5/include/QtGui -I/targets/FREMANTLE_X86/opt/qt4-maemo5/include -I. -I. -I. -o moc_mainwindow.o moc_mainwindow.cpp
    g++ -Wl,-rpath-link,/usr/lib -Wl,-O1 -Wl,-rpath,/opt/qt4-maemo5/lib -o CameraDepthOfField dof_functions.o main.o mainwindow.o moc_mainwindow.o -L/opt/qt4-maemo5/lib -lQtGui -L/opt/qt4-maemo5/lib -L/usr/X11R6/lib -lQtCore -lpthread

    Ign http://repository.maemo.org fremantle/4bc37c7c77ebe90177c050b805a8dc79/nokia-binaries Packages/DiffIndex
    Get:4 http://repository.maemo.org fremantle Release [7150B]
    Ign http://repository.maemo.org fremantle Release
    Get:5 http://repository.maemo.org fremantle/sdk/free Packages [197kB]
    Ign http://repository.maemo.org fremantle/free Packages/DiffIndex
    Ign http://repository.maemo.org fremantle/non-free Packages/DiffIndex
    Ign http://repository.maemo.org fremantle/free Sources/DiffIndex
    Get:6 http://repository.maemo.org fremantle/sdk/non-free Packages [2963B]
    Get:7 http://repository.maemo.org fremantle/sdk/free Sources [78.3kB]
    Get:8 http://repository.maemo.org fremantle/tools/free Packages [26.2kB]
    Get:9 http://repository.maemo.org fremantle/tools/non-free Packages [500B]
    Get:10 http://repository.maemo.org fremantle/tools/free Sources [12.2kB]
    Get:11 http://repository.maemo.org fremantle/4bc37c7c77ebe90177c050b805a8dc79/nokia-binaries Packages [67.2kB]
    Ign http://repository.maemo.org fremantle/free Packages/DiffIndex
    Ign http://repository.maemo.org fremantle/non-free Packages/DiffIndex
    Ign http://repository.maemo.org fremantle/free Sources/DiffIndex
    Get:12 http://repository.maemo.org fremantle/free Packages [2311kB]
    Get:13 http://repository.maemo.org fremantle/non-free Packages [51.9kB]
    Get:14 http://repository.maemo.org fremantle/free Sources [368kB]
    Hit http://repository.maemo.org fremantle/free packages
    Hit http://repository.maemo.org fremantle/non-free Packages
    Hit http://repository.maemo.org fremantle/free Sources
    Fetched 3130kB in 12s (261kB/s)
    Reading package lists... Done
    W: GPG error: http://repository.maemo.org fremantle Release: Couldn't access keyring: 'No such file or directory'
    W: GPG error: http://repository.maemo.org fremantle Release: Couldn't access keyring: 'No such file or directory'

  2. #2
    Registered User
    Join Date
    Nov 2008
    Posts
    15

    Re: Scratchbox compile differences: x86 v. Armel and UI..

    Quote Originally Posted by davidmct View Post
    Hi (again),
    mainwindow.o: In function `QList<QString>::detach_helper()':
    mainwindow.cpp.text._ZN5QListI7QStringE13detach_helperEv[QList<QString>::detach_helper()]+0x18): undefined reference to `QListData::detach3()'
    I had this same problem also with both 4.5.x and 4.6.0 libs installed at the same time even though I used qmake from 4.6. I had to completely remove 4.5.x to make linking work... I wonder if there is some other way? I didn't investigate it that much, but I think the linker tries to fetch some libraries from 4.5.x first before 4.6 or something.

    >> Johannes <<

  3. #3
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Scratchbox compile differences: x86 v. Armel and UI..

    Quote Originally Posted by kleimola View Post
    I had this same problem also with both 4.5.x and 4.6.0 libs installed at the same time even though I used qmake from 4.6. I had to completely remove 4.5.x to make linking work... I wonder if there is some other way? I didn't investigate it that much, but I think the linker tries to fetch some libraries from 4.5.x first before 4.6 or something.

    >> Johannes <<
    You need to modify LD_LIBRARY_PATH in such a way that /opt/qt4-maemo5/lib will precede other paths. Particularly /usr/lib.

  4. #4
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    82

    Re: Scratchbox compile differences: x86 v. Armel and UI..

    Quote Originally Posted by davidmct View Post
    In scratchbox:
    a) X86. builds and runs but UI shapes and sizes are mangled (MainWndow size set to just fill screen on N900). Been trying to read up on Hildonisation but documentation says this should be the default state for all the widgets.
    Did you start your app with "run-standalone.sh CameraDepthOfField"? If not, try it out.

  5. #5
    Registered User
    Join Date
    Nov 2008
    Posts
    15

    Re: Scratchbox compile differences: x86 v. Armel and UI..

    Quote Originally Posted by vivainio View Post
    Did you start your app with "run-standalone.sh CameraDepthOfField"? If not, try it out.
    Btw, is that needed on the actual device or not? Some people say no, but on a Forum Nokia Qt course I attended it was used? I assume that it is not needed on the device but it doesn't harm either.

    >> Johannes <<

  6. #6
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Scratchbox compile differences: x86 v. Armel and UI..

    Quote Originally Posted by kleimola View Post
    Btw, is that needed on the actual device or not? Some people say no, but on a Forum Nokia Qt course I attended it was used? I assume that it is not needed on the device but it doesn't harm either.

    >> Johannes <<
    It's not need on the device, if you have user permissions, running applications as root may cause side effects and not advised. But if you use it will make no difference.

  7. #7
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Scratchbox compile differences: x86 v. Armel and UI..

    Quote Originally Posted by davidmct View Post
    Hi (again),

    Continuing development of DOFCalculator.

    Code runs fine and displays correctly in QTCreator (very good tool for dev and debug).
    I cannot agree with you on this. Most of the problem you have come from the fact you are using Qt Creator

    Quote Originally Posted by davidmct View Post
    In scratchbox:
    a) X86. builds and runs but UI shapes and sizes are mangled (MainWndow size set to just fill screen on N900). Been trying to read up on Hildonisation but documentation says this should be the default state for all the widgets.
    I guess the problem is that Qt Designer hardcoded some fixed sized in your UI and with new screen size layout is broken. Another problem may be in the way how you use layouts to arrange widgets.

    The easiest way to fix compilation problem is to remove Qt 4.5.3 and reinstall Qt 4.6.

  8. #8
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    82

    Re: Scratchbox compile differences: x86 v. Armel and UI..

    Quote Originally Posted by kleimola View Post
    Btw, is that needed on the actual device or not? Some people say no, but on a Forum Nokia Qt course I attended it was used? I assume that it is not needed on the device but it doesn't harm either.
    It's needed (at least) if you happen to be running as root (e.g. in ssh session, if you won't do "su - user" for one reason or another).

    You can check whether it's needed by looking at the output of "env".

  9. #9
    Nokia Developer Expert
    Join Date
    Jun 2009
    Posts
    36

    Smile Re: Scratchbox compile differences: x86 v. Armel and UI..

    Thanks everyone.

    I've modified /scratchbox/etc/profile to change LD_LIBRARY_PATH in such a way that /opt/qt4-maemo5/lib precedes other paths as suggested.

    I also found I could get rid of a keyring problem with:

    cd /tmp
    wget http://repository.maemo.org/extras-d...ras-pubkey.asc
    apt-key add fremantle-extras-pubkey.asc
    apt-get update
    apt-get update

    from
    http://wiki.maemo.org/Developer_freq...libhildonhelp0

    Will let you know how the UI layout goes. I've also created some scripts to run and close the application as I kept forgetting to close the application when exiting:

    #!/bin/bash
    if [ $# -gt 0 ]; then
    export DISPLAY=:2
    af-sb-init.sh start
    run-standalone.sh ./$1

    read pause

    af-sb-init stop
    exit 0

    else
    echo "Loads, runs and exits scratchpad application"
    echo "usage: ./LoadRunApp.sh appname"
    exit 1
    fi

  10. #10
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Scratchbox compile differences: x86 v. Armel and UI..

    Quote Originally Posted by davidmct View Post
    I also found I could get rid of a keyring problem with:
    It's only warning, not a real problem.

    Quote Originally Posted by davidmct View Post
    I've also created some scripts to run and close the application as I kept forgetting to close the application when exiting:
    You don't need to start and stop application framework every time you launch your application.
    You can kill you application with
    Code:
    kill -15 $(pidof YOUR_APP_BINARY_NAME)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •