Looking for Lazarus on Haiku

I just noticed that the files are libqt4pas and not lQt4pas. I don’t know if that makes a difference or not, and if so, how to change that. I wish I knew more about the configure and make script system. I’m many things, but a good programmer is not one of them.

I think lQt4pas is the correct link. Like others lib that work the same way.
Example with gcc for ce “libbe” library you must use: gcc…-lbe when compiling

But the files of the library is not in the good folders…Don’t really understand why he not find it when you put it directly in the non-packaged/lib folder.

Maybe configure some lines in the Makefile(s) from the sources of Lazarus to find these correctly.

Progress! I dumped the libQT4pas directly in the directory of the makefile, and it compiled! When I try to run it I get the error:
Cannot open file libQtGui.so.4: No such file or directory

I know I have the QT5 libraries installed. I’ll check if I need the QT 4 libraries as well.

1 Like

All HaikuDepot had was the QT4Development libraries. I loaded those, and started lazarus to give a new error message:

runtime_loader: /boot/system/lib/x86/libstdc++.so.6.0.25: Could not resolve symbol ‘___tls_get_addr’
resolve symbol “___tls_get_addr” returned: -2147478780
runtime_loader: /boot/system/lib/x86/libstdc++.so.6.0.25: Troubles relocating: Symbol not found

I’m writing this summary not to be boringly redundend, but so that those that follow in my footsteps know what I stepped in, so to speak.

To summarize the efforts so far:
On a Dell Lattitude D610 laptop—

The most recent source file was downloaded from the Lazarus website.
Upgraded to FPC 3.0.4 (3.0.2 available on HaikuDepot)

Initially, I compiled directly as the instructions asked, but that set up required a gdk library. Then poking around, I found the compile command that used the QT library.
make clean all LCL_Platform=qt

I installed QT5 and the libqtpas5. The script requested libqtpas4, which was downloaded from here: http://s40in.blogspot.com/2018/12/new-build-lazarus-for-haiku-b1.html
Libqtpas4 could not be found in the path, so I dumped them directly into the same directory as the lazarus make script. Success on getting that recognized and the program compiled and linked.

The program upon launch complained:
Cannot open file libQtGui.so.4: No such file or directory
I presumed this was something needed from the QT4 libraries, so I tried downloading them from HaikuDepot. Only the development libraries were there, so I downloaded those.

Program now terminates with:
runtime_loader: /boot/system/lib/x86/libstdc++.so.6.0.25: Could not resolve symbol ‘___tls_get_addr’
resolve symbol “___tls_get_addr” returned: -2147478780
runtime_loader: /boot/system/lib/x86/libstdc++.so.6.0.25: Troubles relocating: Symbol not found

I’ve been poking around this forum, and there seems to have been someone who compiled Lazarus as recently as ~ 5 months ago, but has not posted the program to the Depot for whatever reason. There has been some discussion about the 32bit version of Haiku causing some trouble because of a blended gcc library. I’ll see if I can contact the fellow who did it and see where his efforts stand.

Maybe @s40in can help here?

Could not resolve symbol ‘___tls_get_addr’ does look like your binary/library was linked with wrong gcc. Did you compile everything in setarch x86 shell?
If that still doesn’t work you can try to do that on a 64bit Haiku which has only one gcc package so you won’t run into this problem there at all.

Personally, I had a hard time executing the compilation on the 64bits version (I had a binary error message) so if you happen to execute it, tips are welcome.

Do you remember an exact error?

1 Like

No, I couldn’t run anything related to Lazarus on my 64-bit system.That’s all i remember.
-------Reedit--------------
I just tried again.
I installed the QT4 devel and Glib2 devel packages from Haiku Depot server.

~/Lazarus/lazarus_svn_fixes_2_0> lazarus
bash: ./lazarus : impossible d'exécuter le fichier binaire : Not an executable
~/Lazarus/lazarus_svn_fixes_2_0> dir
components                doceditor        languages     Makefile.fpc
converter                 docs             lazarus       packager
COPYING.GPL.txt           examples         lazarus.app   README.txt
COPYING.LGPL.txt          fpmake_add.inc   lazbuild      startlazarus
COPYING.modifiedLGPL.txt  fpmake_proc.inc  lcl           startlazarus.app
COPYING.txt               fpmake.pp        lib           test
debian                    ide              localize.bat  tools
debugger                  images           localize.sh   units
designer                  install          Makefile
~/Lazarus/lazarus_svn_fixes_2_0> startlazarus
bash: ./startlazarus : impossible d'exécuter le fichier binaire : Not an executable
~/Lazarus/lazarus_svn_fixes_2_0> 

That say me in french language that lazarus is not an executable (I suppose it’s about my 64bits version.

I tried to make a make following the README file (Max GUI or Minimal IDE version)
make clean bigide or make clean all

But that give me somes error like it:

make[1]: Leaving directory '/boot/home/Lazarus/lazarus_svn_fixes_2_0/ide'
make -C packager/registration clean
make[1]: Entering directory '/boot/home/Lazarus/lazarus_svn_fixes_2_0/packager/registration'
make[1]: -iVSPTPSOTO: Command not found
/bin/rm -f fpcmade.- Package.fpc ./ppas.sh script.res link.res  
/bin/rm -f *.s *_ppas.bat ppas.bat ppaslink.bat
make[1]: Leaving directory '/boot/home/Lazarus/lazarus_svn_fixes_2_0/packager/registration'
make -C lcl cleanall
make[1]: Entering directory '/boot/home/Lazarus/lazarus_svn_fixes_2_0/lcl'
make[1]: -iVSPTPSOTO: Command not found
/bin/rm -f fpcmade.- Package.fpc ./ppas.sh script.res link.res  
/bin/rm -f *.s *_ppas.bat
make -C interfaces clean
make[2]: Entering directory '/boot/home/Lazarus/lazarus_svn_fixes_2_0/lcl/interfaces'
make[2]: -iVSPTPSOTO: Command not found
make[2]: *** No rule to make target 'gtk2_clean', needed by 'clean'.  Stop.
make[2]: Leaving directory '/boot/home/Lazarus/lazarus_svn_fixes_2_0/lcl/interfaces'
Makefile:4521: recipe for target 'cleanall' failed
make[1]: *** [cleanall] Error 2
make[1]: Leaving directory '/boot/home/Lazarus/lazarus_svn_fixes_2_0/lcl'
Makefile:3388: recipe for target 'cleanlaz' failed
make: *** [cleanlaz] Error 2
~/Lazarus/lazarus_svn_fixes_2_0> lazarus
bash: ./lazarus : impossible d'exécuter le fichier binaire : Not an executable

The problem here is that freepascal (which is not gcc) does not handle hybrid architectures this way (in fact I’m not sure if it handles anything at all). Since it doesn’t normally use C++ APIs, you can sort of get things to build, but you always hit that kind of issues. This should be solved first, and the frepascal compiler configured properly for secondary architectures, and then put in an hpkg file handling that correctly.

Hi! For those that have asked, yes I did activate the setarch x86 in the terminal in my last compile attempt.

T

Yes, but that only sets your path to use the correct gcc. And freepascal completely ignores it. Not your fault, but someone will have to untangle that somehow in the freepascal compiler so it can be made to work with either gcc2 or gcc8, depending on what’s needed.