[fpc-pascal] Lazarus + Qt4 in FreeBSD

Den Jean Den.Jean at telenet.be
Fri Dec 21 01:20:30 CET 2007


On Wednesday 19 December 2007 11:37:33 am papelhigienico at gmail.com wrote:
> I do some tests in my FreeBSD 6.1. In another FreeBSD 6.2 I build QT from
> ports (that is an automated process, that applies some patchs before
> build). In my FreeBSD 6.1 I build QT without ports (./configure, make, make
> install) and I got the same result, but with a more detailed backtrace
> (because QT compiled with debug enabled).

I tried FreeBSD, but X always seg failed, so then I tried PC-BSD.

The qt4 ports install include files to close to qt3 include files (you fall on qt3 files first). The PREFIX stuff does not work. 
The qt4-gui ports does not link with the PREFIX (does not find libqtcore, whatever you do with ldconfig)

If you play with ldconfig, bash becomes unstable-> you cannot launch
any program or any new konsole anymore, the messages you get are common problems
(google says: update ports recompile everything, but my ports are fresh :-) -> 
reboot -> I have never rebooted this much :-(.    (BSD ? :-)

with LD_LIBRARY_PATH and a manually (no ports) compiled qt4 (put in /usr/local/KDE4) I can finally compile lazarus 
(some pthreads link hurdle aside)

lazarus compiled with:
#!/bin/bash
cd lazarus
export LD_LIBRARY_PATH=/usr/local/KDE4/lib
gmake LCL_PLATFORM=qt clean all OPT="-dDEBUG -dUSE_QT_4_3 -k'-L/usr/local/KDE4/lib' -k'-lpthread'"

qt4intf compiled with:
cat ./compile_lib.bash
#!/bin/bash
export QT4=/usr/local/KDE4
export QT4I=$QT4/include
export LD_LIBRARY_PATH=$QT4/lib
if [ -e "$LD_LIBRARY_PATH/libQtCore.so.4" ]
then
  g++ -D UNIX -I. -I$QT4I -I$QT4I/Qt -I$QT4I/QtGui -I$QT4I/QtCore -Iqlcl 
qtpas.cpp -o libqt4intf.so -shared -fPIC -Xlinker $QT4/lib/libQtCore.so.4 
$QT4/lib/libQtGui.so.4 "-soname=libqt4intf.so"
  strip --strip-all libqt4intf.so
else
  echo "Please Modify location of Qt4 in this script"
fi


lazarus runs, but has continuously exceptions:

 $2911D9EA
  $2911E1AA
  $291417EF
  $2881BAB8
  $082400DE  TQTTHEMESERVICES__DRAWELEMENT,  line 168 of qtthemes.pas
  $081BFF95  TCUSTOMSPEEDBUTTON__PAINTBACKGROUND,  line 629 
of ./include/speedbutton.inc
  $081BF6B2  TCUSTOMSPEEDBUTTON__PAINT,  line 518 of ./include/speedbutton.inc
  $0819B979  TGRAPHICCONTROL__WMPAINT,  line 64 
of ./include/graphiccontrol.inc
  $08060F91
  $08191C92  TCONTROL__PERFORM,  line 1016 of ./include/control.inc
  $0818710B  TWINCONTROL__PAINTCONTROLS,  line 4294 
of ./include/wincontrol.inc
  $08186E66  TWINCONTROL__PAINTHANDLER,  line 4233 of ./include/wincontrol.inc
QPainter::end: Painter ended with 2 saved states
TApplication.HandleException Access violation
  Stack trace:
  $28E88EE

I also noticed that the gtk2 version crashes when started with ./startlazarus but runs fine when started with ./lazarus ???

so something is wrong ... 



More information about the fpc-pascal mailing list