Qt4 does not compile

I’ve downloaded the latest Qt 4.7.8 from here: https://github.com/qt-haiku/qt4/archive/v4.8.7-haiku-1.zip

When i try to compile it, it tells me, that O_LARGEFILE is not defined. If i wire in the definiton to 0x00100000, then it laments about some PCH files which are corrupt.

I’ve tried to install the binary version from here: http://repo.hakilo.ru/x86_64/packages/libqt4-4.8.7-11-x86_64.hpkg
But it tells me it needs a different kernel.

How can i compile Qt4 under Haiku? Or is there an installable binary of it? This is R1/Beta 2.

Qt4 is decommisioned on Haiku years ago. If you insist to build it, try to use the patches from HaikuPorts. Do not expect an easy ride tho as it is old and untested on current Haiku.
Maybe somebody still posess the qt4 packages and can share it with you.
Or just use Qt5.

I’ve tried to use Qt5, but Haiku crashes when it tries to download it in the package manager. Actually it crashed when i tried to download the sources of Qt4 either. Both with wget and WebPositif. However, i could copy them through LAN ftp.
Maybe it’s because of the VM? I use VirtualBox 6.1.16.

Can you please point me at the patches in HaikuPorts? Which Qt4 version they are for?

(Why was Qt4 abandoned? A lot of software still uses it and Qt5 performs worse on weak or old machines.)

if haiku crash when download in package manager on virtualbox
check your vm…
make sure your vm use intel pro/1000 MT Desktop…

by the way… if you have interesting app that still on qt4 maybe be you can share (link source ) here … maybe some of people here can help you porting to qt5

Please check the virtualization guide: https://www.haiku-os.org/guides/virtualizing/
If your Haiku still crashes create a ticket at https://dev.haiku-os.org with a screenshot about the crash.

Ask the Qt developers. Probably they don’t plan to maintain older versions of their software forever. We certainly don’t plan to maintain other’s people old software versions forever, we have enough to do with our own things.

If you have an old machine, your system will perform a lot better if you don’t use Qt at all if you ask me.

1 Like

I’ve found no such option anywhere in VBox.

My app does not depend on Qt4, it depends on Lazarus which depends on Qt4 or Qt5 under Haiku. But Qt5 is more a resource hog than Qt4 (and i cannot install Qt5 due to the mentioned problem).

I’ve checked it. My installation did not divert from it at all, except, that i’ve created the HDD after the creation of the VM. Which - i guess - cannot be the reason for crashing.

I agree with you. Believe me, i would be the happiest, if Lazarus would use the native Haiku GUI toolkit and i would not have to suffer with the compilation/installation of Qt4/Qt5 at all.

see here image

Saw there. Thank you, the problem has been fixed. Now i can try to compile Lazarus with Qt5.

glad that help you

Hello TCH,

It is difficult to have working with QT5 but not imposible perhaps it is not stable.

I have working under Haiku 64 : Lazarus 2.1.0 Date 2020-11-02 FPC: 3.2.0 SVN Revision: 64096M

You can do:

Maybe other dependencies…

Is best to use latest Haiku versions…

Install fpc stable with default installation and decompress it sources to somewhere also.
Use fpcupdeluxe to install “Lazarus Only” using the fpc installed in system and also mark apply fpcupdeluxe patches…
I have installed fpc and lazarus in next paths:
/boot/home/config/non-packaged/lazarus
/boot/home/config/non-packaged/fpc_sources
Surely it will finaly with errors…and dont generate a functional Lazarus installation then…
Goto terminal and from command line…
go to lazarus/lcl/interfaces/qt5
qmake
make
make install

With this you have qt5pas.0 qt5.ppu and the

  • libQt5Pas.so
  • libQt5Pas.so.1
  • libQt5Pas.so.1.2
  • libQt5Pas.so.1.2.8

It refers to qt 5.6.1

I have put them in /lazarus and /boot/home/config/non-packaged/lib/

It also generated qt5pas.0 and qt5pas.ppu but deletes both when lazarus linking finalize.

Compile from lazarus directory with make LCL_PLATFORM=qt5

I have it in 64 bits mode, it is not stable and ever generates debug error for an unsupported debugger option (i dont not what).

You can add lazarus PATH in UserSetupEnvironment /boot/home/config/settings/boot/

lazarus

Hello jma_sp,

FreePascal 3.2.0 and it’s sources were already installed in the VM. I am now trying to start the build of Lazarus 2.0.10-2 (i would like to use the stable release), but make tells me: “make: -VSPTPSOTO: Command not found
I found no gmake in HaikuDepot if that is the problem.
(BTW, how did you move the DeskBar to the lower left corner?)

It compiles and generate an executable file but in IDE gets…DebugError

Do not use 2.0.10, use latest in trunk, now 2.1.0 best with fpcupdeluxe.
2.1.0 have now targets haiku and x86_64-haiku previous not, i havent tried for 32.
fpcupdeluxe finalize with error an do not generate a lazarus/startlazarus/lazbuild… then when finished with error you have to continue with a term session and commands as i writed previously.
And apply patches (enter fpcupdeluxe setup), donalfredo is making a good job but it have to enhance it yet.
OnlinePackageManager do not works for me in Lazarus, it gets resolution name error, i have change to ip but same, so if you use fpcupdeluxe you can donwload packages with it or packages.lazarus-ide.org.

fpcupdeluxe needs subversion, it creates a ./svn directory where he store a lot of files.

Lazarus linking need more packages that indicates 2.x versions, but Haiku have < 2.x, but finaly accept it.

qmake , as it uses qt5 you need install qt5 (also development packages).

You do not need gmake as Haiku not works with it yet.

Other options for LCL_PLATFORM are fpgui and nogui

When compiling it creates in every entry /lib/x86_64/… so when it needs .o it links to executable.
You can see a lot of them until fpcupdeluxe get error. It compiles a lot of things, components, ide, … also is a good idea to add fpc or ppcx86_64 fpmake to haiku path.

I see. Okay, i’ll try it with FPC deluxe and the snapshot version. (Qt5 is already installed. I have not found any separate development package for it, or did you meant Qt5 Tools? That is installed.)

BTW, you’ve mentioned

Is this means, that you have managed to build Lazarus with Qt4 too?

Select see all in Haiku Depot, including sourcecode, development…devel are neccesary for some packages and also when you create some applications that need extra libraries for dinamic/static linking.

Oh. So “Available” and “Installed” packages do not cover all the packages, source and development ones are separated from them. It’s not so intuitive, i have to say. I thought that two option is for to filter the rest out… Thanks for pointing out.