Installing Lazarus on Haiku: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Installing Lazarus on Haiku
| Old | New | Line | |
|---|---|---|---|
| 1 | + | > **Warning:** Work in progress ... | |
| 2 | + | ||
| 3 | + | Lazarus requires Qt under Haiku. Qt is not installed by default under Haiku. You need to install package available from [this site](http://qt-haiku.ru/). Currently, there is no binary package to install Lazarus. You will have to compile Lazarus from sources. | |
| 4 | + | ||
| 5 | + | ## Installing from sources | |
| 6 | + | ||
| 7 | + | ### Building Qt under Haiku | |
| 8 | + | ||
| 9 | + | Instructions are available there : <http://qt-haiku.ru/index.php?option=com_content&view=article&id=53&Itemid=67> | |
| 10 | + | ||
| 11 | + | Building Qt is not required. You can just download lastest binaries at <http://www.qt-haiku.ru/index.php?option=com_rokdownloads&view=folder&Itemid=60> and uncompress them to /boot/. | |
| 12 | + | ||
| 13 | + | In order to compile the Qt4 binding below, you should get the development package. | |
| 14 | + | ||
| 15 | + | ### Building Qt4 binding for Free Pascal under Haiku | |
| 16 | + | ||
| 17 | + | Download the source from <http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html>. The current binding is "V2.5 (Qt 4.5.X, compatible till Qt 4.8.X)". Choose the entry "Library source" under Linux X11. | |
| 18 | + | ||
| 19 | + | You need to add QMAKE_CXXFLAGS to Qt4Pas.pro before build libQt4Pas: | |
| 20 | + | ||
| 21 | + | QMAKE_CXXFLAGS += -mstackrealign -mincoming-stack-boundary=2 | |
| 22 | + | ||
| 23 | + | On previous versions (at least 2.1), it was necessary to edit some files before compiling the package under Haiku : | |
| 24 | + | ||
| 25 | + | `In Qt4Pas.pro, change the supported version according to the version of Qt you have downloaded (It also works with Qt 4.8.0).`\ | |
| 26 | + | `Then, add ":!Haiku" at line 50 inside Qt4Pas.pro :`\ | |
| 27 | + | ` unix:!embedded:!mac`**`:!haiku`**`:PLATFORM = BINUX` | |
| 28 | + | ||
| 29 | + | Finally, run : | |
| 30 | + | ||
| 31 | + | `qmake`\ | |
| 32 | + | `make`\ | |
| 33 | + | `make install` | |
| 34 | + | ||
| 35 | + | You should have libQt4Pas.so in /boot/common/lib/. The last step is to add a link to this library in /boot/develop/abi/c86/gcc4/lib. | |
| 36 | + | ||
| 37 | + | More information about this binding is available here : [[Qt4 binding]] | |
| 38 | + | ||
| 39 | + | ### Building Lazarus under Haiku | |
| 40 | + | ||
| 41 | + | #### Required tools | |
| 42 | + | ||
| 43 | + | fpc 2.4.0 for Haiku is not suitable to build Lazarus. Some bugs were fixed while porting Lazarus to Haiku. | |
| 44 | + | ||
| 45 | + | The 2.4 fix branch or trunk should compile Lazarus. | |
| 46 | + | ||
| 47 | + | Current official version (2.6.0) is able to compile Lazarus. Binaries for Haiku are available at : <http://freepascal.org/down/i386/haiku.var>. | |
| 48 | + | ||
| 49 | + | #### Getting sources | |
| 50 | + | ||
| 51 | + | As usual : | |
| 52 | + | ||
| 53 | + | `svn co `[`http://svn.freepascal.org/svn/lazarus/trunk`](http://svn.freepascal.org/svn/lazarus/trunk)` lazarus` | |
| 54 | + | ||
| 55 | + | #### Compiling Lazarus | |
| 56 | + | ||
| 57 | + | Once you have a good enough compiler and the source tree, just run at the root of the source tree | |
| 58 | + | ||
| 59 | + | Make sure gcc 4 is the default compiler. | |
| 60 | + | ||
| 61 | + | Under Haiku with package management : | |
| 62 | + | ||
| 63 | + | `setarch x86` | |
| 64 | + | ||
| 65 | + | On older versions of Haiku, use : | |
| 66 | + | ||
| 67 | + | ` setgcc gcc4` | |
| 68 | + | ||
| 69 | + | then : | |
| 70 | + | ||
| 71 | + | `make LCL_PLATFORM=qt` | |
| 72 | + | ||
| 73 | + | --- | |
| 74 | + | *From the Free Pascal wiki, page "Installing Lazarus on Haiku", as it stood on 2020-07-02 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* |
