Lazarus + Qt4 in FreeBSD

classic Classic list List threaded Threaded
31 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Lazarus + Qt4 in FreeBSD

papelhigienico@gmail.com
Hi!

How to build lazarus with Qt4?? I set the interface of lazarus to Qt and try rebuild only LCL, but when it is rebuilding, it stops because it don't found qt4.pas.

I'm doing all steps of wiki (<a href="http://wiki.lazarus.freepascal.org/Qt_Interface%29." target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://wiki.lazarus.freepascal.org/Qt_Interface)...

Qt 4.3.1 is installed from ports and my Lazarus snapshot verion 0.9.25 of 22-nov-2007...




_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

Mattias Gaertner
On Thu, 22 Nov 2007 13:50:59 -0200
"[hidden email]" <[hidden email]> wrote:

> Hi!
>
> How to build lazarus with Qt4?? I set the interface of lazarus to Qt
> and try rebuild only LCL, but when it is rebuilding, it stops because
> it don't found qt4.pas.
>
> I'm doing all steps of wiki
> (http://wiki.lazarus.freepascal.org/Qt_Interface).<http://wiki.lazarus.freepascal.org/Qt_Interface%29.>
> ..

The page is still correct and it works here under linux.
Please open a terminal and try this:

cd lazarus/lcl
make LCL_PLATFORM=qt clean all OPT=-vut > log.txt

Then take a look at log.txt and find out, why FPC does not find/like the
file lcl/interfaces/qt/qt4.pas

 
> Qt 4.3.1 is installed from ports and my Lazarus snapshot verion
> 0.9.25 of 22-nov-2007...


Mattias
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

Den Jean
In reply to this post by papelhigienico@gmail.com
On Thursday 22 November 2007 04:50:59 pm [hidden email] wrote:
> Qt 4.3.1 is installed from ports and my Lazarus snapshot verion 0.9.25 of
> 22-nov-2007...

probably because the linker does not find libqt4intf.so.
I have so bsd experience. Are you interested in
creating a libqt4intf.so for bsd :-). ?
if so start from the linux source code and compile script.

kind regards,

Den Jean


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

papelhigienico@gmail.com
I'm interested, but I don't know the correct steps to do the libqt4intf... I do:

1) Copy Qt4 sources to my home directory;

2) Build Qt4;

3) Copy the compile_lib.bash to compile_lib_fbsd.sh and change it to use my Qt4 (in my home directory)

4) Run compile_libfbsd.sh

5) Put the libqt4intf.so in /usr/local/lib....

6) Rebuild Lazarus without sucess... :(

How you do the libqt4intf.so in Linux?


Fabio Luis Girardi


2007/11/24, Den Jean <[hidden email]>:
On Thursday 22 November 2007 04:50:59 pm [hidden email] wrote:
> Qt 4.3.1 is installed from ports and my Lazarus snapshot verion 0.9.25 of
> 22-nov-2007...

probably because the linker does not find libqt4intf.so.
I have so bsd experience. Are you interested in
creating a libqt4intf.so for bsd :-). ?
if so start from the linux source code and compile script.

kind regards,

Den Jean


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

Den Jean
On Saturday 01 December 2007 12:28:21 pm [hidden email] wrote:
> 6) Rebuild Lazarus without sucess... :(

in point 5 you succesfully got a libqt4intf.so ?. Great.
So the rest is just compiling lazarus.

cd lazarus
make LCL_PLATFORM=qt clean all OPT=dUSE_QT_4_3

and look at output

The option USE_QT_4_3 is if you use the Qt 4.3.1 libs.
Do not add it if you used the Qt 4.2.3 libs.
 
Did you put llibQtCore.so.4 and libQtGui.so.4 in /usr/local/lib as well ?
and ran ldconfig or the bsd equivalent ?

The resulting executable ofcourse depends on Qt :-)

 ldd ./lazarus | grep -i qt
        libqt4intf.so => /usr/lib/libqt4intf.so (0xb7d21000)
        libQtCore.so.4 => /usr/lib/qt4/lib/libQtCore.so.4 (0xb7a51000)
        libQtGui.so.4 => /usr/lib/qt4/lib/libQtGui.so.4 (0xb7294000)

(/usr/lib on my system)


regards,

Den Jean
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

papelhigienico@gmail.com
I'm stupid!!!


In lcl/interfaces/qt/qt4.pas is wrote:

{$IFDEF MSWINDOWS}
QtIntf  = 'libqt4intf.dll';
{$ENDIF}
{$IFDEF LINUX}
QtIntf  = 'libqt4intf.so';
{$ENDIF}
{$IFDEF DARWIN}
QtIntf  = '';
{$ENDIF}


FREEBSD... not found!! :D

I sugest add this:

{$IFDEF FREEBSD}
QtIntf  = 'libqt4intf.so';
{$ENDIF}


Fabio Luis Girardi


2007/12/2, Den Jean <[hidden email]>:
On Saturday 01 December 2007 12:28:21 pm [hidden email] wrote:
> 6) Rebuild Lazarus without sucess... :(

in point 5 you succesfully got a libqt4intf.so ?. Great.
So the rest is just compiling lazarus.

cd lazarus
make LCL_PLATFORM=qt clean all OPT=dUSE_QT_4_3

and look at output

The option USE_QT_4_3 is if you use the Qt 4.3.1 libs.
Do not add it if you used the Qt 4.2.3 libs.

Did you put llibQtCore.so.4 and libQtGui.so.4 in /usr/local/lib as well ?
and ran ldconfig or the bsd equivalent ?

The resulting executable ofcourse depends on Qt :-)

ldd ./lazarus | grep -i qt
        libqt4intf.so => /usr/lib/libqt4intf.so (0xb7d21000)
        libQtCore.so.4 => /usr/lib/qt4/lib/libQtCore.so.4 (0xb7a51000)
        libQtGui.so.4 => /usr/lib/qt4/lib/libQtGui.so.4 (0xb7294000)

(/usr/lib on my system)


regards,

Den Jean
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

papelhigienico@gmail.com
Hi!!


If you ran ldd libqt4intf.so, what is the output?

Fabio Luis Girardi


2007/12/4, [hidden email] <[hidden email]>:
I'm stupid!!!


In lcl/interfaces/qt/qt4.pas is wrote:

{$IFDEF MSWINDOWS}
QtIntf  = 'libqt4intf.dll';
{$ENDIF}
{$IFDEF LINUX}
QtIntf  = 'libqt4intf.so';
{$ENDIF}
{$IFDEF DARWIN}
QtIntf  = '';
{$ENDIF}


FREEBSD... not found!! :D

I sugest add this:

{$IFDEF FREEBSD}
QtIntf  = 'libqt4intf.so';
{$ENDIF}


Fabio Luis Girardi


2007/12/2, Den Jean <[hidden email]>:
On Saturday 01 December 2007 12:28:21 pm [hidden email] wrote:
> 6) Rebuild Lazarus without sucess... :(

in point 5 you succesfully got a libqt4intf.so ?. Great.
So the rest is just compiling lazarus.

cd lazarus
make LCL_PLATFORM=qt clean all OPT=dUSE_QT_4_3

and look at output

The option USE_QT_4_3 is if you use the Qt 4.3.1 libs.
Do not add it if you used the Qt 4.2.3 libs.

Did you put llibQtCore.so.4 and libQtGui.so.4 in /usr/local/lib as well ?
and ran ldconfig or the bsd equivalent ?

The resulting executable ofcourse depends on Qt :-)

ldd ./lazarus | grep -i qt
        libqt4intf.so => /usr/lib/libqt4intf.so (0xb7d21000)
        libQtCore.so.4 => /usr/lib/qt4/lib/libQtCore.so.4 (0xb7a51000)
        libQtGui.so.4 => /usr/lib/qt4/lib/libQtGui.so.4 (0xb7294000)

(/usr/lib on my system)


regards,

Den Jean
_______________________________________________
fpc-pascal maillist  -  [hidden email]
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.freepascal.org/mailman/listinfo/fpc-pascal



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

Den Jean
On Tuesday 04 December 2007 05:08:15 pm [hidden email] wrote:
> {$IFDEF FREEBSD}
>  QtIntf  = 'libqt4intf.so';
>  {$ENDIF}

but there are many LINUX ifdefs. (see below)
It would be complicated to add "... or FREEBSD or NETBSD"  everywhere etc.

I am considering to replace LINUX with UNIX everywhere,
but need to check if this does not break things.

Can you also read Lazarus Qt Widget Set List.

I will ask there what they think about that.

$ grep -ir LINUX qt4.pas lib
qt4.pas:{$IFDEF LINUX}
qt4.pas:{$ifdef DARWIN or LINUX }
qt4.pas:{$ifdef LINUX }
qt4.pas:{$ifdef LINUX }
qt4.pas:{$ifdef LINUX }
qt4.pas:{$ifdef DARWIN or LINUX }
qt4.pas:{$ifdef DARWIN or LINUX }
qt4.pas:{$ifdef LINUX }
qt4.pas:{$ifdef LINUX }
qt4.pas:{$ifdef LINUX }
qt4.pas:{$ifdef LINUX }
qt4.pas:{$ifdef DARWIN or LINUX }
qt4.pas:{$ifdef DARWIN or LINUX }
qt4.pas:{$ifdef LINUX }
qt4.pas:{$IFDEF LINUX}
lib/qcoreapplication.hb:#if defined DARWIN || LINUX
lib/qcoreapplication.cppb:#if defined DARWIN || LINUX
lib/qapplication.hb:#if defined LINUX
lib/qapplication.hb:#if defined LINUX
lib/qapplication.cppb:#if defined LINUX
lib/qapplication.cppb:#if defined LINUX
lib/qwidget.hb:#if defined LINUX
lib/qwidget.hb:#if defined DARWIN || LINUX
lib/qwidget.cppb:#if defined LINUX
lib/qwidget.cppb:#if defined DARWIN || LINUX
lib/qcursor.hb:#if defined DARWIN || LINUX
lib/qcursor.hb:#if defined LINUX
lib/qcursor.cppb:#if defined DARWIN || LINUX
lib/qcursor.cppb:#if defined LINUX
lib/qx11info_x11.hb:#if defined LINUX
lib/qx11info_x11.cppb:#if defined LINUX
lib/qx11info_x11.cppb:#if defined LINUX
lib/qcolor.hb:#if defined LINUX
lib/qcolor.cppb:#if defined LINUX
lib/qregion.hb:#if defined LINUX
lib/qregion.cppb:#if defined LINUX
lib/qprinter.hb:#if defined DARWIN || LINUX
lib/qprinter.cppb:#if defined DARWIN || LINUX
lib/qfont.hb:#if defined DARWIN || LINUX
lib/qfont.cppb:#if defined DARWIN || LINUX
lib/qpixmap.hb:#if defined LINUX
lib/qpixmap.cppb:#if defined LINUX



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

Den Jean
In reply to this post by papelhigienico@gmail.com
On Tuesday 04 December 2007 05:08:15 pm [hidden email] wrote:
> If you ran ldd libqt4intf.so, what is the output?


$ ldd -r libqt4intf.so
        linux-gate.so.1 =>  (0xffffe000)
        libQtCore.so.4 => /usr/lib/qt4/lib/libQtCore.so.4 (0xb7be8000)
        libQtGui.so.4 => /usr/lib/qt4/lib/libQtGui.so.4 (0xb742b000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb733d000)
        libm.so.6 => /lib/i686/libm.so.6 (0xb7318000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb730b000)
        libc.so.6 => /lib/i686/libc.so.6 (0xb71cb000)
        libz.so.1 => /lib/libz.so.1 (0xb71b8000)
        librt.so.1 => /lib/i686/librt.so.1 (0xb71af000)
        libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb7198000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7194000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb716c000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0xb7164000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0xb714b000)
        libXi.so.6 => /usr/lib/libXi.so.6 (0xb7142000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7139000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb7131000)
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb712c000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb7122000)
        libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb711f000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb70a4000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7075000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xb7066000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb6f62000)
        /lib/ld-linux.so.2 (0x80000000)
        libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb6e2d000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xb6e2a000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb6e24000)
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

papelhigienico@gmail.com
Hi!!

I can build lazarus with Qt in FreeBSD, but when I ran ./startlazarus... crash!

Attached the script that build libqt4intf.so in FreeBSD (test)

Fabio Luis Girardi


2007/12/7, Den Jean <[hidden email]>:
On Tuesday 04 December 2007 05:08:15 pm [hidden email] wrote:
> If you ran ldd libqt4intf.so, what is the output?


$ ldd -r libqt4intf.so
         linux-gate.so.1 =>  (0xffffe000)
        libQtCore.so.4 => /usr/lib/qt4/lib/libQtCore.so.4 (0xb7be8000)
        libQtGui.so.4 => /usr/lib/qt4/lib/libQtGui.so.4 (0xb742b000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb733d000)
        libm.so.6 => /lib/i686/libm.so.6 (0xb7318000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb730b000)
        libc.so.6 => /lib/i686/libc.so.6 (0xb71cb000)
        libz.so.1 => /lib/libz.so.1 (0xb71b8000)
        librt.so.1 => /lib/i686/librt.so.1 (0xb71af000)
        libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb7198000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7194000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb716c000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0xb7164000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0xb714b000)
        libXi.so.6 => /usr/lib/libXi.so.6 (0xb7142000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7139000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb7131000)
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb712c000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb7122000)
         libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb711f000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb70a4000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7075000)
         libXext.so.6 => /usr/lib/libXext.so.6 (0xb7066000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb6f62000)
        /lib/ld-linux.so.2 (0x80000000)
        libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb6e2d000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xb6e2a000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb6e24000)
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

compile_lib.sh (668 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

Felipe Monteiro de Carvalho
On Dec 11, 2007 8:05 PM, [hidden email]
<[hidden email]> wrote:
> I can build lazarus with Qt in FreeBSD, but when I ran ./startlazarus...
> crash!

In cases of crashes, please create a backtrace

http://wiki.lazarus.freepascal.org/Creating_a_Backtrace_with_GDB

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

Den Jean
In reply to this post by papelhigienico@gmail.com
On Tuesday 11 December 2007 08:05:49 pm [hidden email] wrote:
> Attached the script that build libqt4intf.so in FreeBSD (test)

try to run the demoes of c++ qt4
e.g.
cd qt-x11-opensource-src-4.3.1/demos/textedit
./textedit


try to build the demo of the fpc qt4 bindings and run those

make sure you do not have 2 Qt's mixed in the library paths.
Although different versions are claimed to be compatible, a
different ./configure by distrib vendor may even make a same
version a completely different Qt lib.

There is a help about in the bindings mainwindow demo that gives the Qt
version.

use ldd to find the the path of the used lib on your system

ldd ./mainwindow | grep -i qt
        libqt4intf.so => /usr/lib/libqt4intf.so (0xb7d3f000)
        libQtCore.so.4 => /usr/lib/qt4/lib/libQtCore.so.4 (0xb7a6f000)
        libQtGui.so.4 => /usr/lib/qt4/lib/libQtGui.so.4 (0xb72b2000)
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

papelhigienico@gmail.com
I ran qt4 demos and all right! Lazarus demos crash...

Attached is the backtrace of lazarus and ldd of lazarus example (hello).

I will update my lazarus to a recent snapshot...


Fabio Luis Girardi


2007/12/11, Den Jean <[hidden email]>:
On Tuesday 11 December 2007 08:05:49 pm [hidden email] wrote:
> Attached the script that build libqt4intf.so in FreeBSD (test)

try to run the demoes of c++ qt4
e.g.
cd qt-x11-opensource-src-4.3.1/demos/textedit
./textedit


try to build the demo of the fpc qt4 bindings and run those

make sure you do not have 2 Qt's mixed in the library paths.
Although different versions are claimed to be compatible, a
different ./configure by distrib vendor may even make a same
version a completely different Qt lib.

There is a help about in the bindings mainwindow demo that gives the Qt
version.

use ldd to find the the path of the used lib on your system

ldd ./mainwindow | grep -i qt
        libqt4intf.so => /usr/lib/libqt4intf.so (0xb7d3f000)
        libQtCore.so.4 => /usr/lib/qt4/lib/libQtCore.so.4 (0xb7a6f000)
        libQtGui.so.4 => /usr/lib/qt4/lib/libQtGui.so.4 (0xb72b2000)
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

backtraces.txt (9K) Download Attachment
ldd.txt (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

Den Jean
On Wednesday 12 December 2007 12:24:02 pm [hidden email] wrote:
> $28cf59fa in qt_memfill32_sse2 () from /usr/local/lib/libQtGui.so.4

do you have a sse2 capable processor ?

http://en.wikipedia.org/wiki/SSE2

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

Den Jean
On Wednesday 12 December 2007 07:33:15 pm Den Jean wrote:
> do you have a sse2 capable processor ?

compile and run pure pascal (no qt or lazarus) program below to check anyhow
(more verbose version of testsse2 of svn/fpctrunk/tests/test/testsse2.pp)

{ %OPT=-OaVARMAX=16 -OaVARMIN=16 }
{ %CPU=i386 }
uses
   mmx;

{ only a small test to see if it works in principle }

var
  b : byte;
  q : array[0..15] of byte;

begin
  if is_sse2_cpu then
    begin
    writeln('executing sse2 instructions ...');
    asm
{$ifdef FPC_PIC}
       call .LPIC
.LPIC:
       popl %ecx
{$ifdef darwin}
       movdqa    %xmm1,%xmm2
       movdqa    q-.LPIC(%ecx),%xmm4
       psubq     %xmm1,%xmm2
       psubq     q-.LPIC(%ecx),%xmm4
{$else darwin}
       addl      $_GLOBAL_OFFSET_TABLE_,%ecx
       movdqa    %xmm1,%xmm2
       movdqa    q@GOT(%ecx),%xmm4
       psubq     %xmm1,%xmm2
       psubq     q@GOT(%ecx),%xmm4
{$endif darwin}
{$else FPC_PIC}
       movdqa    %xmm1,%xmm2
       movdqa    q,%xmm4
       psubq     %xmm1,%xmm2
       psubq     q,%xmm4
{$endif FPC_PIC}
    end;
    end else writeln('not sse2 cpu');
end.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

papelhigienico@gmail.com
Yes, I have an CPU SSE2 enabled (AMD Athlon 64 X2 3600+)


I ran fpc test and the output is:

%fpc teste1.pas
Free Pascal Compiler version 2.2.0 [2007/09/02] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: FreeBSD/ELF for i386
Compiling teste1.pas
teste1.pas(10,2) Note: Local variable "b" not used
Linking teste1
41 lines compiled, 1.1 sec
1 note(s) issued
%./teste1
executing sse2 instructions ...
%


Fabio Luis Girardi

2007/12/12, Den Jean <[hidden email]>:
On Wednesday 12 December 2007 07:33:15 pm Den Jean wrote:
> do you have a sse2 capable processor ?

compile and run pure pascal (no qt or lazarus) program below to check anyhow
(more verbose version of testsse2 of svn/fpctrunk/tests/test/testsse2.pp)

{ %OPT=-OaVARMAX=16 -OaVARMIN=16 }
{ %CPU=i386 }
uses
   mmx;

{ only a small test to see if it works in principle }

var
  b : byte;
  q : array[0..15] of byte;

begin
  if is_sse2_cpu then
    begin
    writeln('executing sse2 instructions ...');
    asm
{$ifdef FPC_PIC}
       call .LPIC
.LPIC:
       popl %ecx
{$ifdef darwin}
       movdqa    %xmm1,%xmm2
       movdqa     q-.LPIC(%ecx),%xmm4
       psubq     %xmm1,%xmm2
       psubq     q-.LPIC(%ecx),%xmm4
{$else darwin}
       addl      $_GLOBAL_OFFSET_TABLE_,%ecx
       movdqa    %xmm1,%xmm2
       movdqa    q@GOT(%ecx),%xmm4
       psubq     %xmm1,%xmm2
       psubq     q@GOT(%ecx),%xmm4
{$endif darwin}
{$else FPC_PIC}
       movdqa    %xmm1,%xmm2
       movdqa    q,%xmm4
       psubq     %xmm1,%xmm2
       psubq     q,%xmm4
{$endif FPC_PIC}
    end;
    end else writeln('not sse2 cpu');
end.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

papelhigienico@gmail.com
I will try disable SSE2 instructions...

2007/12/14, [hidden email] <[hidden email]>:
Yes, I have an CPU SSE2 enabled (AMD Athlon 64 X2 3600+)


I ran fpc test and the output is:

%fpc teste1.pas
Free Pascal Compiler version 2.2.0 [2007/09/02] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: FreeBSD/ELF for i386
Compiling teste1.pas
teste1.pas(10,2) Note: Local variable "b" not used
Linking teste1
41 lines compiled, 1.1 sec
1 note(s) issued
%./teste1
executing sse2 instructions ...
%


Fabio Luis Girardi

2007/12/12, Den Jean <[hidden email]>:
On Wednesday 12 December 2007 07:33:15 pm Den Jean wrote:
> do you have a sse2 capable processor ?

compile and run pure pascal (no qt or lazarus) program below to check anyhow
(more verbose version of testsse2 of svn/fpctrunk/tests/test/testsse2.pp)

{ %OPT=-OaVARMAX=16 -OaVARMIN=16 }
{ %CPU=i386 }
uses
   mmx;

{ only a small test to see if it works in principle }

var
  b : byte;
  q : array[0..15] of byte;

begin
  if is_sse2_cpu then
    begin
    writeln('executing sse2 instructions ...');
    asm
{$ifdef FPC_PIC}
       call .LPIC
.LPIC:
       popl %ecx
{$ifdef darwin}
       movdqa    %xmm1,%xmm2
       movdqa     q-.LPIC(%ecx),%xmm4
       psubq     %xmm1,%xmm2
       psubq     q-.LPIC(%ecx),%xmm4
{$else darwin}
       addl      $_GLOBAL_OFFSET_TABLE_,%ecx
       movdqa    %xmm1,%xmm2
       movdqa    q@GOT(%ecx),%xmm4
       psubq     %xmm1,%xmm2
       psubq     q@GOT(%ecx),%xmm4
{$endif darwin}
{$else FPC_PIC}
       movdqa    %xmm1,%xmm2
       movdqa    q,%xmm4
       psubq     %xmm1,%xmm2
       psubq     q,%xmm4
{$endif FPC_PIC}
    end;
    end else writeln('not sse2 cpu');
end.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.freepascal.org/mailman/listinfo/fpc-pascal



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

Marco van de Voort
On Sat, Dec 15, 2007 at 11:25:59AM -0200, [hidden email] wrote:
> I will try disable SSE2 instructions...

My 3700+ already had SSE3, and afaik X2's are newer. So I would be very
surprised if it didn't support SSE2
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

Den Jean
In reply to this post by papelhigienico@gmail.com
On Saturday 15 December 2007 02:25:59 pm [hidden email] wrote:
>  I will try disable SSE2 instructions...

It was a long shot ...

can you tell us which freebsd ? if I have time I may give it a try

please try latest lazarus svn source again.
(you are already using fpc 2.2.0 I see, Ok).




_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Lazarus + Qt4 in FreeBSD

papelhigienico@gmail.com
Well, FreeBSD is my personal choice. It´s stable and fast, more than Linux or Windows (to me), because it has less drivers (and less bullshit, is a joke :D)  than... And have the ports system...

I´m creating a project ( http://pascalscada.blogspot.com in portuguese) to allow create industrial applications using lazarus or delphi, prataform independent (only on lazarus). I think that an application that ran in FreeBSD, ran in Linux too, but an application that ran in Linux can´t run in FreeBSD always. Because of this, it's my personal choice (to reduce tests between similar OS).

Why QT? Because GTK and GTK2 disapoint in some aspects. Some components of my project lost some properties under GTK (as Color property). Then Qt is my next choice to test my project...

Ok, I will try an updated snapshot of lazarus. And yes, I'm using fpc 2.2.0. I can't disable suport of SSE2 instructions on my QT4 instalation...


Fabio Luis Girardi


2007/12/17, Den Jean <[hidden email]>:
On Saturday 15 December 2007 02:25:59 pm [hidden email] wrote:
>  I will try disable SSE2 instructions...

It was a long shot ...

can you tell us which freebsd ? if I have time I may give it a try

please try latest lazarus svn source again.
(you are already using fpc 2.2.0 I see, Ok).




_______________________________________________
fpc-pascal maillist  -  [hidden email]
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
12