Helping out with creating HPKG for LAZARUS

[cross-posted from haikuware]

Hiya

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]

http://haikuware.com/directory/view-details/hpkgs/fpc-264-hpkg

http://haikuware.com/directory/view-details/hpkgs/qt4pas

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

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.

Regards,
Humdinger

Streak,
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

Thanks

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 ftp://gd.tuwien.ac.at/languages/pascal/fpc/dist/2.6.4/i386-haiku/fpc-2.6.4.i386-haiku.tar
2). Unpacked and from terminal and started ./install.sh 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 http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html
file: http://users.telenet.be/Jan.Van.hijfte/qtforfpc/V2.5/qt4pas-V2.5_Qt4.5.3.tar.gz 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 libQt4pas.so.* 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 str@go2.pl"
vendor "Haiku Project"
licenses {
“MIT”
}
copyrights {
“Copyright © 2015 by Jan Van Hijfte test@example.com
}
provides {
qt4pas = 2.5-1
lib:qt4pas = 2.5-1
}
requires {
haiku >= r1~alpha4_pm_hrev46213-1
}
urls {
http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html/
}
source-urls {
“Download http://users.telenet.be/Jan.Van.hijfte/qtforfpc/V2.5/qt4pas-V2.5_Qt4.5.3.tar.gz
}

and with this dir structure:

> develop --> lib ----> x86 ------> libQt4pas.so ------> libQt4pas.so.5 ------> libQt4pas.so.5.2 ------> libQt4pas.so.5.2.5 .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:

image: http://oi58.tinypic.com/180n80.jpg


EDIT 1:

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 { "http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html/" } source-urls { "Download " }

[the hpkg here: http://www9.zippyshare.com/v/M5BYInXC/file.html ]
[ the content of hpkg on screenshot: http://oi60.tinypic.com/t56rgi.jpg ]

  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:
    http://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/Old%20releases/Lazarus%201.0.10/lazarus-1.0.10-0.tar.gz/download

and compiled lazarus by using these commands:

setarch x86
make LCL_PLATFORM=qt

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

image: http://oi59.tinypic.com/34ta26p.jpg

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.