Re: [Lazarus] Raspberry Pi bundles now available
Hi Anthony, What version of Lazarus is installed with this script? Thanks for the great work. Don Ziesig On 12/06/2015 10:18 PM, Anthony Walter wrote: I've uploaded a few Raspberry Pi files and scripts at http://www.getlazarus.org This is a minimal fpc 3.0.0 compiler. It's stripped down to be small and only includes the compiler, the text mode IDE, and the run time library. It's a good starting point on the Raspberry Pi if you want to do command line compiling using only the rtl or if you want to use it as a starting point for building the fpc trunk or other compiler branches on your Raspberry Pi. Total install size will be 45MB, for those of you conscious about using up the limited space on your Pi's SD card. http://cache.getlazarus.org//archives/fpc-3.0.0.raspberry-min.tar.gz Just download the above then "fpc-3.0.0.raspberry-min.tar.gz && ./setup.sh". The setup does not need super user rights. It will let you choose a fpc compiler installation location, somewhere under your $HOME, and give you the option to create a shortcut to a terminal where the fpc environment is ready for you. That is with the minimal fpc 3.0 in your path and fpc.cfg environment variable configured. Another, possibly more useful bundle I've created is Free Pascal 3.0 with Lazarus for the Raspberry Pi. I've taken great care to reduce the install size of both fpc and Lazarus with this bundle for the Pi. I've eliminated a lot of fpc packages which don't make sense to have on a Pi. All cross platform package and runtime files have been removed (I don't imagine people cross compiling from the Pi to say Windows for example). I've also eliminate the lazarus tool sources, source images files (res files remain), and quite a few components which are very unlikely to be used on the Pi. Basically I've gotten the install size from a full fpc and lazarus from 1.5GB down to around 216MB. If you're interested in trying this version of Free Pascal 3.0 with Lazarus, here is where you can get it: http://www.getlazarus.org/setup/?download#raspberry_pi If you have a Pi, just follow the instructions in the setup script. You can choose your install folder and have the option to creaate a application shortcut you can pin to the Pi menu, In the next week I'll be working on updating the other platform installers to include a minimal versiomn, as well as updated install scripts where you can choose you install folder and create more shortcuts, be they fpc terminal shortcuts or applicationd esktop shortcuts. Pi users, if your interested I am developing an SDL 2 installer along with a few bare demos which should work with either the minimal or the more complete compilers mentioned above. Let me know if you're inerested in using the SDL 2 on the Pi and I may setup a forum for it. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] No Mac Hourglass cursor
On Fri, 18 Dec 2015 07:38:30 -0500, Anthony Tekatch wrote: > The Mac cursor cannot be changed to an hourglass, it stays as a pointer. Thanks to Jonas Maebe: http://forum.lazarus.freepascal.org/index.php/topic,30784.0.html The hourglass cursor in the Mac (maybe just the version I am using) is not the same as in Windows or Linux, so something else must be done. I am now going to make a progress bar visible with the style set to pbstMarquee as discussed here: http://forum.lazarus.freepascal.org/index.php/topic,11689.0.html -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] A simple event problem in console program
So why Bart said : > Or define a type TNotifyProc = procedure(Sender: TObject); (Which the will not be of type TNotifyEvent) ? Regards, Ara -- http://www.fastmail.com - Or how I learned to stop worrying and love email again -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 make bigide fails on Raspberry Pi2
On Fri, 18 Dec 2015 21:30:39 +0100 Bo Berglund wrote: >[...] > # searchpath for units and other system dependent things > -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget >[...] > sudo make install OPT=-dFPC_ARMHF PREFIX=/usr/local >[...] > Should another command be issued in order to get stuff loaded into > /usr/lib/fpc/3.0.0? PREFIX=/usr Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] A simple event problem in console program
On Fri, 18 Dec 2015 12:36:21 -0800 Aradeonas wrote: > Thanks it works for me. But a quick question: Why we always make events > like "procedure () of object" if we can make without "of object" ? Quick answer: we can not use methods without "of object". Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] A simple event problem in console program
Thanks it works for me. But a quick question: Why we always make events like "procedure () of object" if we can make without "of object" ? Regards, Ara -- http://www.fastmail.com - Accessible with your email software or over the web -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 make bigide fails on Raspberry Pi2
On Thu, 17 Dec 2015 00:52:40 +0100, Mattias Gaertner wrote: >process.ppu is part of every FPC install. >It must be in the -Fu search path of your /etc/fpc.cfg. >From the fpc.cfg file (actually symlinked to fpc-2.6.4.cfg): # searchpath for units and other system dependent things -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/* -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/rtl So for fpc 3.0.0 there should be a directory: /usr/lib/fpc/3.0.0/units/arm-linux But there is not! So here is the mystery: I installed fpc 3.0.0 but it obviously did not create the needed directory for the fpc units Now looking back using the history command to verify how I actually installed fpc 3.0 I found this: cd /home/pi/development/fpc time svn co http://svn.freepascal.org/svn/fpc/tags/release_3_0_0 3.0.0 cd 3.0.0/ make all OPT=-dFPC_ARMHF sudo make install OPT=-dFPC_ARMHF PREFIX=/usr/local sudo make install sourceinstall OPT=-dFPC_ARMHF PREFIX=/usr/local Should another command be issued in order to get stuff loaded into /usr/lib/fpc/3.0.0? -- Bo Berglund Developer in Sweden -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Procedure List in Lazarus IDE
On Fri, Dec 18, 2015 at 9:58 PM, Juha Manninen wrote: > 3. There is a weird issue in adding data to Objects Combobox.Items. It > was updated in FormCreate. Same duplicate class names get added to > Items many times but the list shows only one unique instance. > Now the same thing is done in FormShow and the list shows all > duplicates. Feels like a bug somewhere else. This is easy to fix of course by using a temporary StringList, dealing with duplicates there and then assigning to Combobox.Items. Still, very strange. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Procedure List in Lazarus IDE
I turned ProcedureList into a proper IDE window in r50908. It is not ready yet. There are open issues, patches to solve them are welcome. 1. The window cannot be docked when AnchorDocking is installed. I have not studied yet how to do it. 2. I replaced the filter edit and its handler code with TListviewFilterEdit. Now the Objects Combobox does not affect the data as it used to. Must be improved. 3. There is a weird issue in adding data to Objects Combobox.Items. It was updated in FormCreate. Same duplicate class names get added to Items many times but the list shows only one unique instance. Now the same thing is done in FormShow and the list shows all duplicates. Feels like a bug somewhere else. I remember Graeme mentioned that some features broke or disappeared during the years. I did not find the post any more but now would be a good time to fix it. What are the missing features? Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Testing toolbar dropdown mouse down theme
Fixed properly by Ondrej in r50870. Will be merged to 1.6. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Error when installing project groups
On Fri, Dec 18, 2015 at 2:06 PM, Mattias Gaertner wrote: > On Thu, 17 Dec 2015 21:42:28 +0100 (CET) > Michael Van Canneyt wrote: > >>[...] >> I tried to install the lazprojectgroups package. >>[...] >> if ContainerMenuIndex>ContainerMenuItem.Count then begin >>debugln('TIDEMenuSection.UpdateMenuStructure CREATE >> BottomSeparator Name="',Name,'" >> ContainerMenuIndex=',dbgs(ContainerMenuIndex),' >> ContainerMenuItem.Count=',dbgs(ContainerMenuItem.Count >>GetRoot.WriteDebugReport(' Bottom ',true); >> end; >> >> Looks strange, since if that happens, there is sure to be a crash with the >> insert, but no action other than a debug message is posted ? > > It means there is an inconsistency. This should never happen. Just guessing, didn't read the actual code, but shouldn't it be "if ContainerMenuIndex>=ContainerMenuItem.Count then begin" anyway? >> What can I do to prevent this and yet have both packages installed? > > There is already a bug report > http://bugs.freepascal.org/view.php?id=29198 > > I'm not yet sure where the real bug is. > > Mattias I'm also missing some command to view the current Project Group... and 'Save Project Group' doesn't handle nil. Just in case somebody decide to dive in the code before I do ;-) Best regards, Flávio -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Error when installing project groups
On Fri, 18 Dec 2015, Mattias Gaertner wrote: On Thu, 17 Dec 2015 21:42:28 +0100 (CET) Michael Van Canneyt wrote: [...] I tried to install the lazprojectgroups package. [...] if ContainerMenuIndex>ContainerMenuItem.Count then begin debugln('TIDEMenuSection.UpdateMenuStructure CREATE BottomSeparator Name="',Name,'" ContainerMenuIndex=',dbgs(ContainerMenuIndex),' ContainerMenuItem.Count=',dbgs(ContainerMenuItem.Count GetRoot.WriteDebugReport(' Bottom ',true); end; Looks strange, since if that happens, there is sure to be a crash with the insert, but no action other than a debug message is posted ? It means there is an inconsistency. This should never happen. "This should never happen". Yes, many people scratched their heads over this idea at one point or another ;-) Reminds me of the time a fellow programmer put a MessageBox('The spaceship is about to crash, hold on to your hat!'); in the code, being 100% sure it would never ever appear on screen. Till it did... :-) What can I do to prevent this and yet have both packages installed? There is already a bug report http://bugs.freepascal.org/view.php?id=29198 I'm not yet sure where the real bug is. Ahah. Anything we can do to help ? Michael. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Error when installing project groups
On Thu, 17 Dec 2015 21:42:28 +0100 (CET) Michael Van Canneyt wrote: >[...] > I tried to install the lazprojectgroups package. >[...] > if ContainerMenuIndex>ContainerMenuItem.Count then begin >debugln('TIDEMenuSection.UpdateMenuStructure CREATE > BottomSeparator Name="',Name,'" > ContainerMenuIndex=',dbgs(ContainerMenuIndex),' > ContainerMenuItem.Count=',dbgs(ContainerMenuItem.Count >GetRoot.WriteDebugReport(' Bottom ',true); > end; > > Looks strange, since if that happens, there is sure to be a crash with the > insert, but no action other than a debug message is posted ? It means there is an inconsistency. This should never happen. > What can I do to prevent this and yet have both packages installed? There is already a bug report http://bugs.freepascal.org/view.php?id=29198 I'm not yet sure where the real bug is. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Debian Packager released
Yeah, all my code requires FPC 3 or greater. You should have gotten an error message in codebot.inc when you try to use FPC 2.6.4. {$if fpc_fullversion < 3} 'This library requires the free pascal 3 or greater' {$endif} If you want to use more recent versions, the FPC and Lazarus bundles from my website http://www.getlazarus.org/setup are designed to use local FPC and Lazarus configuration files. In other words they will not interfere with your existing development environment. I'd encourage everyone to switch to FPC 3.0.0. You get proper generics, type helpers, dotted namespaces, and more. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Debian Packager released
Lazarus 1.4.4 with FPC 2.6.4 on Ubuntu 14.04.3 LTS 64 bits. 2015-12-16 18:57 GMT-02:00 Anthony Walter : > Can you give me information on your FPC version? > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- Atenciosamente, Alexsander da Rosa -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Printing on Raspberry Pi
I did some further testing. I modified the code somewhat : tmp1:=PPgw; tmp2:=kx; tmp1:=tmp1 * tmp2; Pgw:=round(tmp1); // Pgw := round(PPgw * kx); tmp1 and tmp2 are Double. Running in gdb and backtracing at the crash gives this : Program received signal SIGBUS, Bus error. 0x004b45fc in TFRPRINTER__FILLPRNINFO (P=..., this=variable>) at lr_prntr.pas:1044 1044 tmp1:=PPgw; (gdb) bt #0 0x004b45fc in TFRPRINTER__FILLPRNINFO (P=..., this=variable>) at lr_prntr.pas:1044 #1 0x003bc198 in TFRREPORT__DOPRINTREPORT (PAGENUMBERS=0x744cff8c '1-1', COPIES=1, this=) at lr_class.pas:11429 #2 0x003bbe20 in TFRREPORT__PRINTBEFOREMODAL (SENDER=0x75f0a450, this=) at lr_class.pas:11237 #3 0x004c4548 in TFRPROGRESSFORM__DOBEFOREMODAL (DATA=0, this=reading variable>) at lr_progr.pas:88 #4 0x0006b71c in TAPPLICATION__PROCESSASYNCCALLQUEUE (this=reading variable>) at ./include/application.inc:1067 #5 0x000699c0 in TAPPLICATION__IDLE (WAIT=true, this=variable>) at ./include/application.inc:389 #6 0x00063930 in TCUSTOMFORM__SHOWMODAL (this=) at ./include/customform.inc:2916 #7 0x004c4484 in TFRPROGRESSFORM__SHOW_MODAL (DOC=0x754ab400, this=) at lr_progr.pas:70 #8 0x003bbfbc in TFRREPORT__PRINTPREPAREDREPORT (PAGENUMBERS=0x744cff8c '1-1', COPIES=1, this=) at lr_class.pas:11265 #9 0x000739d8 in BTNPRINTSETUPCLICK (this=0x756429b0, SENDER=0x75f04870) at modmain.pas:229 #10 0x00224e5c in TCONTROL__CLICK (this=) at ./include/control.inc:2734 #11 0x00251028 in TBUTTONCONTROL__CLICK (this=) at ./include/buttoncontrol.inc:54 #12 0x00251928 in TCUSTOMBUTTON__CLICK (this=) at ./include/buttons.inc:169 #13 0x00250ef4 in TBUTTONCONTROL__WMDEFAULTCLICKED (MESSAGE=..., this=) at ./include/buttoncontrol.inc:20 #14 0x00041360 in SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal () #15 0x00223bc8 in TCONTROL__WNDPROC (THEMESSAGE=..., this=variable>) at ./include/control.inc:2122 #16 0x00215b1c in TWINCONTROL__WNDPROC (MESSAGE=..., this=variable>) at ./include/wincontrol.inc:5383 #17 0x002f7a14 in DELIVERMESSAGE (TARGET=0x75f04870, AMESSAGE=pointer.>) at lclmessageglue.pas:112 #18 0x00309f78 in GTK2WSBUTTON_CLICKED (AWIDGET=0x985708, AINFO=0x75c5c7e0) at gtk2wsstdctrls.pp:2428 #19 0x76972afc in ?? () from /usr/lib/arm-linux-gnueabihf/libgobject-2.0.so.0 Backtrace stopped: previous frame identical to this frame (corrupt stack?) (gdb) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] No Mac Hourglass cursor
The Mac cursor cannot be changed to an hourglass, it stays as a pointer. Tested on: Mac OSX 10.6.8 Intel core Lazarus 1.4.4 Carbon Using example code /Developer/lazarus/examples/cursors/project1.lpi Change any of the buttons from their existing cursor definition to crHourglass and the button only shows a regular pointer. The crSQLWait cursor shows properly. Any ideas greatly appreciated! -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Printing on Raspberry Pi
Op 05-11-15 om 11:30 schreef Koenraad Lelong: Op 01-11-15 om 18:08 schreef Anthony Tekatch: I'm trying to print a lazreport on a Raspberry Pi2. It's not working, I get : Bus Error or misaligned data access Press OK to ignore ... Pressing OK does nothing. I managed to get Lazarus running on my Odroid-C1 so I can debug. When running the application, and trying to print it gives the error in LR_Prntr : // printer sizes with PaperSize.PaperRect do begin PPgw := PhysicalRect.Right-PhysicalRect.Left; Ppgh := PhysicalRect.Bottom-PhysicalRect.Top; POFx := WorkRect.Left; POFy := WorkRect.Top; PPw := WorkRect.Right-WorkRect.Left; // this is the same as PageWidth PPh := WorkRect.Bottom-WorkRect.Top; // this is the same as PageHeight end; // screen sizes Pgw := round(PPgw * kx); <- error, line 1042 Pgh := round(PPgh * ky); Ofx := round(POfx * kx); Ofy := round(POfy * ky); Pw := round(PPw * kx); Ph := round(PPh * ky); I tried on a raspberry pi, with fpc 3.0.0 and lazarus 1.6rc1. It gives the same error. I investigated further and it's the product that gives the error. Any idea what's happening ? Koenraad. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 make bigide fails on Raspberry Pi2
Op 18-12-15 om 11:41 schreef Alfred: In my experience, fpres fails also due to lack of memory ! Just increase your swapsize with 500MB, and try again. Saved me many times. (normally, I use cross-compile ... also saves lots of time ... ) Hi, You seem to be right. I added swap, now I can compile an existing project. Many thanks. Koenraad. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 make bigide fails on Raspberry Pi2
Alfred wrote: In my experience, fpres fails also due to lack of memory ! Just increase your swapsize with 500MB, and try again. Saved me many times. (normally, I use cross-compile ... also saves lots of time ... ) Doing just about anything with Lazarus- particularly a (re)build- has required something like 512Mb RAM+swap for a long time. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Lazarus 1.6RC1 make bigide fails on Raspberry Pi2
In my experience, fpres fails also due to lack of memory ! Just increase your swapsize with 500MB, and try again. Saved me many times. (normally, I use cross-compile ... also saves lots of time ... ) -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Lazarus 1.6RC1 make bigide fails on Raspberry Pi2
Op 17-12-15 om 18:17 schreef Mark Morgan Lloyd: Koenraad Lelong wrote: Op 17-12-15 om 11:36 schreef Mark Morgan Lloyd: $ fpc -iV 3.0.0 # Unpack 1.6RC1, rename directory to lazarus-1.6.0+3.0.0 $ cd lazarus-1.6.0+3.0.0 $ make bigide .. make[1]: Leaving directory ... lazarus-1.6.0+3.0.0/components/chmhelp/lhelp' The result runs, including on Raspbian Jessie's GTK2. The only obvious thing that I'd fault is that the lazarus binary (i.e. specifically referring to the IDE) is poor at handling --help and --version. However Hi, I tried what you said. Lazarus runs indeed, but can't compile a existing project. I get an error stating fpcres could not be found. When I run fpcres on the command-line it starts and gives some output. I also can't compile lazarus itself (e.g. after adding packages). I also get the error that fpcres can not be found. Am I missing something ? I know this sounds silly, but check fpcres is on the path. My experience it that for Lazarus it's the only program that's needed apart from fpc and ppcarm etc. Hi, Like I said, when I run fpcres on the commandline, it works : pi@raspberrypi ~ $ fpcres fpcres - resource file converter, version 2.0 [2015/12/06], FPC 3.0.0 Host platform: Linux - arm Copyright (c) 2008 by Giulio Bernardi. Syntax: fpcres [options] [...] [-o ] ... pi@raspberrypi ~ $ which fpcres /home/pi/bin/fpcres I downloaded fpc from somewhere (I can't find where from at the moment) and installed it in a non-previleged place (/home/pi/fpc-3.0.0). Then I made symbolic links in /home/pi/bin and set the PATH to include /home/pi/bin. Koenraad -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus