Lazarus and Freepascal PND


Here is the new version, on the repo. I hope everything will work well :)

Build 04

  • Updated FPC to 2.6.4
  • Updated Lazarus to 1.2.6
  • Better integration with upcoming Code::blocks PND (but works fine as standalone too)
 
Will download tonight! \o/

Got a new game in the works, I'm porting from WebGL/JGame to FPC and hence to Pandora... Should be fun! Oh, and a new PandaBAS will be incoming too :)

D.
 
Unfortunately it's not working at all.

I've deleted my old appdata and tried to build the default project (form with "Hello World!" and a button on it) and it fails with a lot of error messages regarding X11. Trying to build PandaBAS complains that it can't write String Resource Table file: /mnt/utmp/lazarus/lcl/lclstrconsts.rst

I'll try and rebuild Lazarus itself and FPC, see if that helps but I have a feeling that 1.70 has pretty much killed Lazarus.

Edit: Rebuilding Lazarus (aside from producing shedloads of files in the appdata directory) doesn't affect it. I deleted appdata and tried again; same results. I also cleaned all .o/.ppu etc from PandaBAS's source directory, with no change - still fails to write lclstrconsts.rst which is of course read-only as it's part of the PND!

I'm at a loss - hope you can figure this out!

D.
 
Last edited by a moderator:
Unfortunately it's not working at all.


I've deleted my old appdata and tried to build the default project (form with "Hello World!" and a button on it) and it fails with a lot of error messages regarding X11.
Strange, that is exactly the test I have done on a CC and it worked fine. The CC is running SZ 1.62RC, I will update to 1.70 and test again but I don't expect much change in behavour, as most SZ changes where coming from 1.62. I am using a FAT32 formatted SDCard. Can you give me more detail about the "Hello World!" failure?
 
Ok, I've deleted the PND's appdata directory (/media/SD2/pandora/lazarus) and started afresh. I'm also running the absolute latest SZ release, having just run the "Update Pandora OS" option just to be sure.

1. I get a warning that there is already a configuration file from 1.0.2 in /mnt/utmp/lazarus/home/.lazarus and do I want to upgrade it? I decide that yes, I do.

2. Lazarus starts as normal, opening the "Configure Lazarus IDE" - I leave all options at default and just click "Start IDE".

3. The IDE with the default project opens. I open the Run menu, and choose "Build".

4. A lot of hints scroll past (mustn't grumble, I'm guilty of freely exchanging pointers and ordinals myself!) and after a while, I get errors:

ld --dynamic-linker=/lib/ld-linux.so.3 -L. -o project1 link.res

ld.bfd: warning: link.res contains output sections; did you forget -T?

ld.bfd: warning: libxcb.so.1, needed by /mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so, not found (try using -rpath or -rpath-link)

/mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so: undefined reference to `xcb_wait_for_event'

/mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so: undefined reference to `xcb_get_maximum_request_length'

/mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so: undefined reference to `xcb_take_socket'

/mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so: undefined reference to `xcb_disconnect'

/mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so: undefined reference to `xcb_poll_for_event'

/mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so: undefined reference to `xcb_connect_to_display_with_auth_info'

/mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so: undefined reference to `xcb_wait_for_reply'

/mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so: undefined reference to `xcb_get_setup'

/mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so: undefined reference to `xcb_writev'

/mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so: undefined reference to `xcb_connect'

/mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so: undefined reference to `xcb_generate_id'

/mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so: undefined reference to `xcb_poll_for_reply'

/mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so: undefined reference to `xcb_parse_display'

/mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so: undefined reference to `xcb_connection_has_error'

/mnt/utmp/lazarus/fpc/lib/fpc/2.6.4//libX11.so: undefined reference to `xcb_get_file_descriptor'

project1.lpr(22) Error: Error while linking

project1.lpr(22) Fatal: There were 1 errors compiling module, stopping

And that's it. I haven't done anything with FPC or Lazarus at all, just tried to build the default project which I'm sure should be possible. Have you packaged this on a pandora with codeblocks open? :)

D.
 
oK? I think  I have enough info.

I have packaged with Codeblocks open (to test interoperability) but I tested on my CC without codeblocks, the same test protocol as you, execpt for the firmware version I used, that is just 1.62.

I'll recheck my test case (after updating) and see how to fix that link (it should already be looking at /lib and /usr/lib, but it seems it's not enough)...
 
Thanks, fella that's great.

I've no clue about the other error when building PandaBAS - why it wants to write to 'String Resource Table file: /mnt/utmp/lazarus/lcl/lclstrconsts.rst' as it's in the bloody PND, but hopefully you'll fix that one when you update... possibly :)

Edit: Interesting that it's looking for FPC 2.6.4 instead of 2.7.1 - the X11 lib needed doesn't exist in the 2.6.4 hierarchy... do we need both versions in there?

D.
 
Last edited by a moderator:
Thanks, fella that's great.


I've no clue about the other error when building PandaBAS - why it wants to write to 'String Resource Table file: /mnt/utmp/lazarus/lcl/lclstrconsts.rst' as it's in the bloody PND, but hopefully you'll fix that one when you update... possibly :)


Edit: Interesting that it's looking for FPC 2.6.4 instead of 2.7.1 - the X11 lib needed doesn't exist in the 2.6.4 hierarchy... do we need both versions in there?


D.
Yep, I have not forgot (yet) that error. I'll play with the file right, just to be sure...
 
Mmmm, I have updated my CC model, with the "Update Pandora OS", cleaned appdata/lazarus and tried again... After a while (it's recompiling all the lcl right??) .... sucess ?!

So I don't understand why it doesn't work for you (ok, I use minimenu, not xfce here, but that shouldn't change anything?!).

Anyway, I have removed my local (in lazarus) copy of libX11, and soften the permission of all files, and repackaging a tantive build 05. I'll put the link here once I have done some test (juste in case) and upload.

Oh, and yeah, it should now look for fpc/lib/fpc/2.6.4, not 2.7.1 anymore. But I left a symlink from 2.7.1 to 2.6.4 just in case...
 
Last edited by a moderator:
Oh, and yeah, it should now look for fpc/lib/fpc/2.6.4, not 2.7.1 anymore. But I left a symlink from 2.7.1 to 2.6.4 just in case...
2.6.4? Shouldn't we be using 2.7.1 instead? :)

Oh, and I always run from XFCE if that makes any difference!

D.
 
Oh, and yeah, it should now look for fpc/lib/fpc/2.6.4, not 2.7.1 anymore. But I left a symlink from 2.7.1 to 2.6.4 just in case...
2.6.4? Shouldn't we be using 2.7.1 instead? :)


Oh, and I always run from XFCE if that makes any difference!


D.
Not anymore, I have upgraded to stable 2.6.4 instead of dev. branch 2.7.1 (the versionning scheme of fpc is quite strange by the way, with the unstable branch stuck at 2.7.1 and stable evolving 2.6.0, 2.6.1,... until 2.8.0 is reached, and than unstable will become 2.9.1). That 2.6.4 is much newer than the old 2.7.1...

I will try under xfce, just in case, while the build 05 pnd is mksquashed...
 
Ok, I tested on CC with xfce, but without swapfile it was not really useable, and cannot compile properly, while I had no issue using it from minimenu...

Anyway, here is a tentative build 05: Lazarus where I removed local copy of libX11 and libXi (using firmware one) and relaxing permissions on files.

Please test and repport so I can push or not to the repo.
 
After some positive feedback from ZXDunny on IRC, here is the build 05, fixing potentials linking & building issues.

Build 05

-----------

  • Fix potential build & link issues
 
I can confirm; this is the dog's bollocks - the Bee's knees, the Mutt's Nuts. Compiled code is also a fair bit more efficient too.

D.
 
Thanks ptitSeb this is a fantastic progamme for me to have on the Pandora as I can use it on my Linux home PC and my Windows 7 work PC as well.  I just save the project folder to a USB stick and I can work on it on any of the computers I have access to!  Write once, compile and run anywhere.

FYI I upgraded Pandora OS to 1.70 last night and then updated Lazarus to the Build 05 version.  It seems to be working fine for me, loads, edits, compiles and saves my existing (pretty simple) projects (Ext2 formatted SD card).
 
Last edited by a moderator:
Thanks a lot from me, too!

I upgraded to SZ 1.71 yesterday, grabbed the new Lazarus PND and did a quick test-compile of Squared!

-> Everything worked smoothly... :wub:
 
Thanks also from me.

I don't have updated my pandora (i'm on 1.6x) but the Lazarus PND works fine also here on my CC.

I have tested build this http://sourceforge.net/projects/doublefractal/ and running fine (apart from a problem with changing RGB colors that's not enabled in Pandora but it's working fine on Windows)..if someone have an help on this..maybe i could make a pnd of this fractal prog.
 
Back
Top