Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Compilling Qt Creator 2.2 on FreeBSD
Forum Updated to NodeBB v4.3 + New Features

Compilling Qt Creator 2.2 on FreeBSD

Scheduled Pinned Locked Moved Installation and Deployment
32 Posts 5 Posters 19.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gustavo
    wrote on last edited by
    #3

    Thanks Tobias!

    Running c++filt get me this result:
    @c++filt _ZTVN5Botan11POSIX_TimerE

    vtable for Botan::POSIX_Timer
    @

    So, there's something in Botan build configuration preventing it to load this class at build time. Fortunately, I've noticed Qt Creator 2.0 was showing this same problem, and, for this version, there's a patch in FreeBSD ports, namely:
    @
    --- ./src/libs/3rdparty/botan/src/src.pro.orig 2010-08-24 11:46:09.000000000 +0400
    +++ ./src/libs/3rdparty/botan/src/src.pro 2010-11-29 03:49:46.829707166 +0300
    -564,10 +564,6
    timer/gettimeofday/tm_unix.cpp
    }

    -linux*-g++* {

    • SOURCES += timer/posix_rt/tm_posix.cpp
      -}
      +SOURCES += timer/posix_rt/tm_posix.cpp

    -linux*-g++* {

    • LIBS += -lrt
      -}
      +LIBS += -lrt

    @

    This fix the Botan::POSIX_Timer problem. Now I'm able to launch Qt Creator. Nevertheless, another problem has arrived: when I try to load a project file, a dialog appears displaying this message:

    bq. No valid qt versions found. Please add a qt version in Tools/Options or via the maintenance tool of the SDK

    This is really strange, because the path of my Qt local installation is already set up correctly in Tools/Options (Qt Creator just found it automatically). Any idea what went wrong this time?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #4

      Does "this patch":http://pastebin.com/7pQyvFDj fix the build for you?

      Is the Qt version marked as valid in Tools->Options->Qt4? My guess is that this worked. Is there any tool chain set up in Tools->Options->Qt4? Does it have a sane ABI (hover it, please)? My guess that this is what is going wrong here. If it indeed is: Can you please provide me with the output of gcc -dumpmachine? Thanks!

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gustavo
        wrote on last edited by
        #5

        Everything in Qt4 configuration seems to be ok:

        Name: Qt in PATH
        ABI: x86-linux-generic-elf-64bit
        mkspec: freebsd-g++
        qmake: /home/gustavo/opt/Qt-4.7.3/bin/qmake
        Version: 4.7.3
        QT_INSTALL_LIBS /home/gustavo/opt/Qt-4.7.3/demos
        QT_INSTALL_EXAMPLES /home/gustavo/opt/Qt-4.7.3/examples
        QT_INSTALL_DOCS /home/gustavo/opt/Qt-4.7.3/doc
        QT_INSTALL_DATA /home/gustavo/opt/Qt-4.7.3/
        QT_INSTALL_CONFIGURATION /etc/xdg
        QT_INSTALL_IMPORTS /home/gustavo/opt/Qt-4.7.3/imports
        QT_INSTALL_TRANSLATIONS /home/gustavo/opt/Qt-4.7.3/translations
        QMAKE_MKSPECS /home/gustavo/opt/Qt-4.7.3/mkspecs
        QT_INSTALL_PLUGINS /home/gustavo/opt/Qt-4.7.3/plugins
        QT_INSTALL_PREFIX /home/gustavo/opt/Qt-4.7.3/
        QT_INSTALL_HEADERS /home/gustavo/opt/Qt-4.7.3/include
        QT_VERSION 4.7.3
        QT_INSTALL_BINS /home/gustavo/opt/Qt-4.7.3/bin

        The output of gcc -dumpmachine:
        amd64-undermydesk-freebsd

        About the patch you provided, I'm gonna testing it to provide you a feedback.

        Thanks.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #6

          Yeap, it does not know "amd64-undermydesk-freebsd", so it will not recognize that this is something compatible with your freebsd Qt... Plus it obviously assumed your Qt to be linux, too.

          So there is quite a bit going wrong. Could you please send me your libQtCore.so (the actual lib, not the symlinks;)? That would be highly appreciated!

          1 Reply Last reply
          0
          • G Offline
            G Offline
            gustavo
            wrote on last edited by
            #7

            How do I send it to you? By mail?

            By the way, let me point a related usability bug in Qt Creator: at my work, only some projects are currently using any Qt library. Nonetheless, we want to use Qt Creator as our IDE for every C++ project, regardless of it being Qt based or not. So, for many projects, it's not necessary that Qt Creator finds any Qt configuration at all. But, with this bug, we are not able to use Qt Creator even for this non-Qt projects, because Qt Creator does require a working Qt configuration for every project.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              gustavo
              wrote on last edited by
              #8

              And the patch you provided fixed the build issue.
              Thanks!

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tobias.hunger
                wrote on last edited by
                #9

                We do not require a working Qt in Qt Creator. QMake based projects do, since qmake itself is part of Qt and we of course need to find that.

                You can use qmake based projects without Qt though, or CMake or generic projects (both of which do not even ask for Qt).

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  gustavo
                  wrote on last edited by
                  #10

                  Pretty interesting. I've never heard Qt Creator could use another file format besides .pro to set up a project structure. I was thinking one must use a .pro file in order to Qt Creator recognise and index a project tree even for non Qt projects. This is a usefull information.

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    tobias.hunger
                    wrote on last edited by
                    #11

                    The docs do mention it:

                    http://doc.qt.nokia.com/qtcreator-2.2/creator-project-cmake.html
                    http://doc.qt.nokia.com/qtcreator-2.2/creator-project-generic.html

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      tobias.hunger
                      wrote on last edited by
                      #12

                      Just opened http://bugreports.qt.nokia.com/browse/QTCREATORBUG-4879 about misdetection of freebsd binaires as linux.

                      This will make it hard to work on freebsd since Creator will not match up the compiler with the Qt version and thus block building:-/

                      The only workaround I can think of right now is to feed Qt Creator with a compiler that claims via "gcc -dumpmachine" to be targetting Linux. A small script wrapper should do that... then the (now misdetected) compiler will match up with the misdetected Qt and all should be well.

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        gustavo
                        wrote on last edited by
                        #13

                        Thank you, Tobias! I'm gonna try this workaround.

                        1 Reply Last reply
                        0
                        • B Offline
                          B Offline
                          Belisario
                          wrote on last edited by
                          #14

                          Hello All,

                          I've compile the qt-creator 2.2.0 and I have the exact same error when trying to run it, i.e.

                          bash-4.2# bin/qtcreator
                          Failed to load core: /export/home/Download/Qt-creator/lib/qtcreator/plugins/Nokia/libCore.so: Cannot load library /export/home/Download/Qt-creator/lib/qtcreator/plugins/Nokia/libCore.so: (ld.so.1: qtcreator: fatal: relocation error: file /download/Qt-creator/lib/qtcreator/libBotan.so.1: symbol _ZTVN5Botan11POSIX_TimerE: referenced symbol not found)

                          bash-4.2# nm -C /download/Qt-creator/lib/qtcreator/libBotan.so.1 | grep _ZTVN5Botan11POSIX_TimerE
                          [_ZTVN5Botan11POSIX_TimerE]
                          bash-4.2# nm /download/Qt-creator/lib/qtcreator/libBotan.so | grep _ZTVN5Botan11POSIX_TimerE
                          [7605] | 0| 0|NOTY |GLOB |0 |UNDEF |_ZTVN5Botan11POSIX_TimerE

                          and well the patch it seems to work for FreeBSD, but I'm working in Solaris 10 and well checking the file

                          vim /download/qt-creator-2.2.0-src/src/libs/3rdparty/botan/src/timer/gettimeofday/info.txt

                          realname "Unix Timer"

                          define TIMER_UNIX

                          load_on auto
                          modset unix,beos

                          <add>
                          tm_unix.cpp
                          tm_unix.h
                          </add>

                          <os>
                          aix
                          beos
                          cygwin
                          darwin
                          freebsd
                          dragonfly
                          hpux
                          irix
                          linux
                          netbsd
                          openbsd
                          qnx
                          solaris
                          tru64
                          </os>

                          <requires>
                          timer
                          </requires>

                          Solaris is listed as the "detected" OS, I don't know how to check if the compiler does a good detection of the OS, I have both libraries, librt et libposix4, which i read were the needed libraries to get all the posix timing routines.

                          Do you have any ideas on how getting qtcreator to run?

                          Thanks in advance

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            gustavo
                            wrote on last edited by
                            #15

                            Hi, Belisario!

                            In the file src/libs/3rdparty/botan/src/src.pro, did you try just removing the folowing lines: 287, 289, 571, 573, 575 and 577? If this works, we can do a small change in the patch Tobias provided to fix compilation in Solaris as well.

                            1 Reply Last reply
                            0
                            • B Offline
                              B Offline
                              Belisario
                              wrote on last edited by
                              #16

                              Thanks Gustavo, It runs now, qtcreator, but I have the exact same problemyou had, when trying to create or open a project it says no valid qt version found! but verifying under tools/options/qt4 Qtcreator has automatically taken the qmake on the PATH variable.

                              And on the shell where i ran the qtcreator i found these 3 different messages repeated:

                              QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv failed: Resource temporarily unavailable
                              QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv failed: Error 0
                              QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv failed: Error 0
                              QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv failed: Error 0
                              QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv failed: Error 0
                              QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv failed: Error 0
                              QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv failed: Error 0
                              QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv failed: No such file or directory

                              1 Reply Last reply
                              0
                              • B Offline
                                B Offline
                                Belisario
                                wrote on last edited by
                                #17

                                I just check and I'm guessing the problem is on the ABI value:

                                ABI: x86-linux-generic-elf-32bit

                                when i have a Solaris machine:

                                bash-4.2# gcc -dumpmachine
                                i386-pc-solaris2.10

                                1 Reply Last reply
                                0
                                • T Offline
                                  T Offline
                                  tobias.hunger
                                  wrote on last edited by
                                  #18

                                  No surprise there considering that the fix did not go into the 2.2 branch:-)

                                  Please try master (or backport the patch from there, the SHA is in the bugreport).

                                  1 Reply Last reply
                                  0
                                  • B Offline
                                    B Offline
                                    Belisario
                                    wrote on last edited by
                                    #19

                                    I'm sorry but I don't follow :D

                                    I cannot find the Master version, from where can I download it?

                                    1 Reply Last reply
                                    0
                                    • G Offline
                                      G Offline
                                      goetz
                                      wrote on last edited by
                                      #20

                                      You will have to clone the sources from "gitorious":https://qt.gitorious.org/qt-creator and build Creator yourself.

                                      Alternatively, you can try one of the snapshots on "get.qt.nokia.com":http://get.qt.nokia.com/qtcreator/snapshots/

                                      http://www.catb.org/~esr/faqs/smart-questions.html

                                      1 Reply Last reply
                                      0
                                      • B Offline
                                        B Offline
                                        Belisario
                                        wrote on last edited by
                                        #21

                                        Thanks Volker, I have the latest clone source, still work to do though for make it compile, nothing I haven' t done before, I will post a summary of changes I'll make thru all the process to see if ww can get it in the next fix

                                        1 Reply Last reply
                                        0
                                        • T Offline
                                          T Offline
                                          tobias.hunger
                                          wrote on last edited by
                                          #22

                                          Please send in merge requests through gitorious:-) Thanks!

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved