qt 4.5.0 installation

Hi, guys.

Maybe some of you are using Qt. Just wanted to share my experience in installing Qt 4.5.0tp1. I'm doing this, because it took me some time to install. I came across some troubles which i have never faced up before.

1. Qt 4.5.0tp1 fails to compile with g++ version 4. So I had to use freebsd-g++34 as my QMAKESPEC.

2. Newly generated Makefiles have this row in it "export MACOSX_DEPLOYMENT_TARGET = 10.3". Regular make fails because of it. There are about 300 Makefiles which had to be fixed. So I wrote a small script (it is not perfect or the best, at least it works)

for i in `find . -name Makefile | xargs grep -l "export M"`
do
sed 's/^export/#export/g' $i > $i.bak
cp $i.bak $i

done

Only after these steps everything went fine.

Hope this saves your time.
 
Hello! Can you help me?

I have downloaded qt-4.5-beta and, i am trying to install it to my freebsd system:

Code:
> uname -a
FreeBSD  7.1-STABLE FreeBSD 7.1-STABLE #0: Fri Jan 23 14:10:40 MSK 2009     root@:/usr/obj/usr/src/sys/GENERIC  i386
>

The first step is configure. If I want to use spec freebsd-g++34, then configure fails:

Code:
> env | grep -i spec
QMAKESPEC=freebsd-g++
> setenv QMAKESPEC "freebsd-g++34"
> ./configure

This is the Qt/X11 Open Source Edition.

g++34: not found
g++34: not found
g++34: not found
g++34: not found
You are licensed to use this software under the terms of
the GNU General Public License (GPL) versions 2 or 3.

Type '2' to view the GNU General Public License version 2.
Type '3' to view the GNU General Public License version 3.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.

Do you accept the terms of either license? ^C
>

And when I use spec freebsd-g++, the compilation fails on gmake:

Code:
> ./configure
...
skipped
...
> gmake
...
...
gmake[1]: Entering directory `/usr/home/fr33man/devel/qt-x11-opensource-src-4.5.0-beta1/src/gui'
g++ -pipe -g -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -D_THREAD_SAFE -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/pango-1.0 -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -pthread -D_THREAD_SAFE -fPIC -DQT_SHARED -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_RASTER_IMAGEENGINE -DQT_HAVE_MMX -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_NO_OPENTYPE -DQT_NO_STYLE_MAC -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQ_INTERNAL_QAPP_SRC -DQT_NO_DEBUG -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/freebsd-g++ -I. -I../../include/QtCore -I../../include -I../../include/QtGui -I.rcc/release-shared -I../3rdparty/xorg -I/usr/local/include/freetype2 -I/usr/local/include/freetype2 -I../3rdparty/harfbuzz/src -Idialogs -I.moc/release-shared -I/usr/local/include -I.uic/release-shared -I/usr/local/include -x c++-header -c kernel/qt_gui_pch.h -o .pch/release-shared/QtGui.gch/c++
In file included from ../../include/QtCore/qatomic_arch.h:1,
                 from ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:202,
                 from ../../include/QtCore/qbasicatomic.h:1,
                 from ../../include/QtCore/../../src/corelib/thread/qatomic.h:41,
                 from ../../include/QtCore/qatomic.h:1,
                 from ../../include/QtCore/../../src/corelib/tools/qbytearray.h:41,
                 from ../../include/QtCore/qbytearray.h:1,
                 from ../../include/QtCore/../../src/corelib/tools/qstring.h:41,
                 from ../../include/QtCore/qstring.h:1,
                 from ../../include/QtCore/../../src/corelib/kernel/qobject.h:43,
                 from ../../include/QtCore/qobject.h:1,
                 from ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:40,
                 from ../../include/QtCore/qcoreapplication.h:1,
                 from kernel/qt_gui_pch.h:56:
../../include/QtCore/../../src/corelib/arch/qatomic_arch.h:83:4: error: #error "Qt has not been ported to this architecture"
In file included from ../../include/QtCore/qnamespace.h:1,
                 from ../../include/QtCore/../../src/corelib/kernel/qobjectdefs.h:40,
                 from ../../include/QtCore/qobjectdefs.h:1,
                 from ../../include/QtCore/../../src/corelib/kernel/qobject.h:42,
                 from ../../include/QtCore/qobject.h:1,
                 from ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:40,
                 from ../../include/QtCore/qcoreapplication.h:1,
...
skipped ....
....


>

Sorry for this long post...

And if it can help:

Code:
> pkg_info | grep qt4-
poppler-qt4-0.8.7   Qt4 bindings to poppler
qt4-assistant-4.4.1 Qt documentation browser
qt4-clucene-4.4.1   QtCLucene full text search library wrapper
qt4-corelib-4.4.1   Qt core library
qt4-dbus-4.4.1      Qt4 bindings for the D-BUS messaging system
qt4-designer-4.4.1  Qt ui editor
qt4-doc-4.4.1       Multiplatform C++ application framework
qt4-gui-4.4.1_1     Qt graphical user interface library
qt4-help-4.4.1      QtHelp module provides QHelpEngine API and is used by Assis
qt4-iconengines-4.4.1 Qt SVG icon engine plugin
qt4-imageformats-4.4.1 Qt imageformat plugins for GIF, JPEG, MNG and SVG
qt4-inputmethods-4.4.1 Qt input method plugins
qt4-libQtAssistantClient-4.4.1 Qt documentation browser integration library
qt4-linguist-4.4.1_1 Qt localisation tool
qt4-makeqpf-4.4.1   Qt qtopia font creator
qt4-moc-4.4.1       Qt meta object compiler
qt4-network-4.4.1   Qt network library
qt4-opengl-4.4.1    Qt OpenGL library
qt4-pixeltool-4.4.1 Qt screen magnification utility
qt4-porting-4.4.1   Qt utility to assist with porting Qt3 applications to Qt4
qt4-qdbusviewer-4.4.1 Qt4 D-BUS viewer
qt4-qmake-4.4.1     The build utility of the Qt project
qt4-qt3support-4.4.1 Qt3 compatibility library
qt4-qtestlib-4.4.1  Qt unit testing library
qt4-rcc-4.4.1       Qt resource compiler
qt4-script-4.4.1    Qt script
qt4-sql-4.4.1       Qt SQL library
qt4-sqlite-plugin-4.4.1 Qt SQLite 3.x database plugin
qt4-svg-4.4.1       Qt SVG library
qt4-uic-4.4.1       Qt user interface compiler
qt4-uic3-4.4.1      Qt backwards-compatible user interface compiler
qt4-webkit-4.4.1    Qt4 webkit engine
qt4-xml-4.4.1       Qt XML library
> g++ -v
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719  [FreeBSD]
>
 
I'm so sorry for the delay. Have you tried installing gcc34 and using freebsd-g++34 as QMAKESPEC. gcc34 compiled Qt for me.
 
I've installed qt-4.5 on my FreeBSD 7.1 and all is ok (thanks to lyuts). But i have another problem. When i'm trying to run any qt-4.5 application (such as designer or assistant) i can't see any characters. Only squares instead of them. I've tried to install window's fonts, but it isn't helps. What about you, fr33man? Can you see characters correctly? And does anybody know the solve of my problem? Thanks.
 
same problem

I have the same problem with fonts in Qt4.5 ond 7.1. Did you ever figure it out? I have tried lots of things and nothing seems to work.
 
I have been "fighting" with this problem for a long time, but didn't find any solution. But last week I have read that Martin Wilke (if I'm not mistaken) is working on qt 4.5.0 port for FreeBSD. So I'm planning on using ports he creates (since I suppose he has got more experience with qt =) ).

http://miwi.bsdcrew.de/2009/02/freebsd-qt-450-rc1/
 
lyuts said:
I have been "fighting" with this problem for a long time, but didn't find any solution. But last week I have read that Martin Wilke (if I'm not mistaken) is working on qt 4.5.0 port for FreeBSD. So I'm planning on using ports he creates (since I suppose he has got more experience with qt =) ).

http://miwi.bsdcrew.de/2009/02/freebsd-qt-450-rc1/

But you have the same problem. Currently I've no idea what the problem is. I'll spend next weekend to solve that.
 
Previously I used qt4.5.0 that i have compiled by myself and got this problem with fonts. That's why i thought that i might have done some wrong steps in compilation and decided to wait for a FreeBSD team person to port them. I suppose he can do the port better than me.
 
I would very much like to get a good working Qt-4.5.0 installed and I have checked out the rc1 repository from Martin Wilkes' site. But I don't know what to do next and would greatly appreciate just a little nudge in the right direction. I've used normal ports before and have a new tree which I obtained today.

I don't think the fonts problem will affect the application I want to try, because it only outputs to a terminal.

Thanks, John.
FreeBSD 7.1-RELEASE #0
 
Those files you have checked out are ports in fact. What you have to do is put them in your /usr/ports disrectory (but make a backup of ports that will be replaced, just in case). And then just do make install.

Note: If you have two moc's (1st for qt3 and another for qt4) installed make sure the installation uses qt4's moc. There had been such cases when qt3's moc has been used.
 
Thanks for the pointer lyuts.

It was all going well util:

Code:
===>   qt4-qt3support-4.5.0.rc1 depends on package: qt4-gui>=4.5.0-rc1 - not found
===>    Verifying install for qt4-gui>=4.5.0-rc1 in /usr/ports/x11-toolkits/qt4-gui
===>  Patching for qt4-gui-4.5.0.rc1
===>  Applying FreeBSD patches for qt4-gui-4.5.0.rc1
1 out of 1 hunks failed--saving rejects to src/gui/graphicsview/qgraphicsproxywidget.cpp.rej
=> Patch patch-src-gui-graphicsview-qgraphicsproxywidget.cpp failed to apply cleanly.
*** Error code 1

Stop in /usr/ports/x11-toolkits/qt4-gui.

The .rej file looks like this:
Code:
lappy# less work/qt-x11-opensource-src-4.5.0-rc1/src/gui/graphicsview/qgraphicsproxywidget.cpp.rej
***************
*** 521,529 ****
  {
      Q_D(QGraphicsProxyWidget);
      if (d->widget) {
-         QWidget *w = d->widget;
-         setWidget(0);
-         delete w;
      }
  }

--- 521,528 ----
  {
      Q_D(QGraphicsProxyWidget);
      if (d->widget) {
+       QObject::disconnect(d->widget, SIGNAL(destroyed()), this, SLOT(_q_removeWidgetSlot()));
+        delete d->widget;
      }
  }

Thanks again for some more help, if possible.
John.
 
Aha. A little more effort on my part led me to find that the patch was to the wrong lines in qgraphicsproxywidget.cpp

The first line referenced (521) actually appeared at 517, so the addition of four blank lines got me on the road again. :)
 
I am getting this problem too. This is with the official release. (I get it early, it's not scheduled for release until Tuesday).

I am raising an issue with Nokia support. PCH gets turned on by default, and it's buggy. It conflicts with existing Qt-3.3.8. And when I finally do get it built, all the text is white squares. I have send messages (and screenshots) to support, release manager, and community manager.

FreeBSD used to be a tier one platform for Trolltech. No longer. Nokia lists it as "community" supported. I don't know when we became second class citizens.
 
community supported

This really, really pisses me off. We have been a commercial Qt licensee for many years now. Just renewed the license 2 months ago. Trolltech/Nokia never bothered to tell us that they were removing FreeBSD as a supported platform. Not only that, they cut the supported platforms list to less than half what it was. Deploying Qt apps on FreeBSD systems was the whole reason we have been a Qt licensee all these years.

Great. Thank you, Nokia.
 
Good luck with QtCreator. It's got linux hardcoded in the project files. But if you change those to freebsd it will build. You'll also want to fix the install paths, because "/" is also hardcoded.
 
Thanks for the information

Thanks a lot to all for the useful information.
We too have support contract with Trolltech for many years. Yesterday I have learned that FreeBSD is not supported by Nokia anymore. Trolltech convinced us all the time that FreeBSD is a good choice and we went very well with it. I hope that there will be enough pressure from the FreeBSD community to Nokia for continuing FreeBSD support. Otherwise I do not understand why my company needs to pay Nokia for "support" instead of giving the money directly to the FreeBSD project.
 
I am trying to open discussions with Nokia over this issue. While the "community support" status changed back in Qt 4.3.0, it's only under Nokia's watch that Qt broke. Trolltech was engineering driven, while Nokia is marketing driven, and it affects how the communities are treated. It's nice that they are going to open up their repositories to us soon, but I fear that only means they expect us to do their work for them.
 
That is a really good idea. I don't understand why companies avoid supporting as much OSes as they can. And I'm sure that everybody is mad because of somebody disregarding our favorite OS.
 
Back
Top