Helping out with creating HPKG for LAZARUS

[cross-posted from haikuware]


I’ve built already fpc hpkg which is needed for making lazarus and i ported qt4pas which is also essential, but still i cant
properly build lazarus :<. The problem might be trivial. for example:

when i build lazarus [1.0.4] everything goes fine, until runtime. When i want to run it lazarus complains about missing libs [which already in the system {qt libs} as a hpkg pack], so i re-copied qt libs into lazarus’s lib directory. After that when starting lazarus im getting ‘missing symbol: UnWind GetRegionStart’ error :confused:

Any help will be apreciated, since we will all benefit from having an excellent Rapid Application Development IDE.

these two [fpc+qt4pas] are already in haikuware [just uploaded]

btw. Im using gcc2h [hrev47061] with official QT libs from HaikuDepot and compiling lazarus in terminal with:
setarch x86

Hi streak!

I’m afraid I can’t help you with those porting issues. But I would strongly recommend using haikuporter and creating a recipe for your hpkgs. Only then you can be certain to have created the package in a clean environment and that all dependencies are met.
Never mind if you want to get your recipe added to haikuports or some other repository, you’re developing open or closed source software, ports or native Haiku apps. As soon as you want to distribute a HPKG in the end, you should use haikuporter.


please keep up the effort. As you said, we really need a good IDE on Haiku, and Lazarus would be perfect!!

Hi Streak!

long time no see you

This missing symbol error is about any missing functionality in some lib that have built.
Maybe you don’t link a lib that you building against libroot (-lroot)

try again and let me see the results


OK, here we go straight from the begining:

Its a quick guide how i TRIED to build proper lazarus on newest nightlies [and how i failed miserably in half way :/]. I need some help with haiku quirks before i’ll give up on haiku completely. I think it is my last attempt… :confused:

I used latest nightly gcc2h [10 may 2015 - hrev49160] and installed additional gcc + qt4 + qt4 dev using pkgman required to compile LAZARUS

1). I downloaded
2). Unpacked and from terminal and started ./ from terminal
3). When asked i selected /boot/home/config/non-packaged and installed with all options
here i tested that fpc is fully working: i typed ppc386 and get positive answer.
4). Downloaded from
file: and unpacked it
5). To build qt4pas i needed to switch arch’s to gcc4 by using: “setarch x86” from terminal
6). Then i i typed from terminal in qt4pas dir: “qmake” and "make"
7) I created* libraries [because i used gcc4 these libs are for gcc4h/gcc4/gcc2h architectures]

and now i’m on the crossroads because:
I tried to create a hpkg lib to use with qt’s libs while compilation but:
i failed to make a hpkg’s for qt4pas. eg. i think i properly created the package using .packageInfo with this content:


name qt4pas
version 2.5-1
architecture x86
summary "qt4pas"
description "The Free Pascal Qt4 binding allows Free Pascal to interface with the C++ Library Qt."
packager "StreaK"
vendor "Haiku Project"
licenses {
copyrights {
“Copyright © 2015 by Jan Van Hijfte
provides {
qt4pas = 2.5-1
lib:qt4pas = 2.5-1
requires {
haiku >= r1~alpha4_pm_hrev46213-1
urls {
source-urls {

and with this dir structure:

> develop --> lib ----> x86 ------> ------> ------> ------> .PackageInfo

and using this command: package create -C qt4pas-release qt4pas-2.5-1-x86.hpkg

When i try to install it into system im getting info: that this hpkg cant be installed on this system :confused:



After puckipedia suggestions i modified the .packageInfo file with:

name qt4pas version 2.5-1 architecture x86_gcc2 summary "qt4pas" description "The Free Pascal Qt4 binding allows Free Pascal to interface with the C++ Library Qt." packager "StreaK " vendor "Haiku Project" licenses { "MIT" } copyrights { "Copyright (C) 2015 by Jan Van Hijfte " } provides { qt4pas_x86 = 2.5-1 lib:qt4pas_x86 = 2.5-1 } requires { haiku >= r1~alpha4_pm_hrev46213-1 } urls { "" } source-urls { "Download " }

[the hpkg here: ]
[ the content of hpkg on screenshot: ]

  1. i downloaded a src lazarus version that i was sure it will be working on haiku because i compiled it on pre-PM haiku a year and half ago:

and compiled lazarus by using these commands:

setarch x86

it compiled successfull with -lQt4pas but after clicking on lazarus it complains missing qt4pas lib.


how it can be possible if i installed this lib with hpkg and even compiled lazarus using it. Without qt4pas lib i cant build lazarus , so i have no idea what’s going on :confused:

Just to repeat what said yesterday in the IRC channel: since Qt4 can only be built with gcc4, you need an FPC that is also built using gcc4. Otherwise you are mixing the two versions and this won’t work well.

We should fix this cleanly by doing an haikuports recipe for fpc, qt4pas, and Lazarus, but building fpc in the package environment is a bit tricky because the compiler needs to be bootstrapped. This is because fpc itself is written in pascal, so you need another compiler to build it.