Re: [Lazarus] gdb problems on ubtuntu 19.10
Stripping debug symbols from my test program has no effect. The gdb program still takes 20-30 seconds to open my text programs written using Lazarus. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] gdb problems on ubtuntu 19.10
On 01/11/2019 02:27, Anthony Walter via lazarus wrote: I know this problem is not entirely Lazarus related, but I'm hoping someone here might be able to provide some insight. On a fresh install of Ubuntu 19.10 when running projects from Lazarus with gdb debugging, any and all projects take anywhere from 20 to 30 seconds to become interactive after a project has been compiled and run. That is, the visual forms either do not appear when running, or appear but an unresponsive for 20-30 seconds. If I run without the debugger the programs start almost instantly. When I run the same program from a terminal using gdb manually, I get the same unresponsive delay. Does anyone know what the problem might be and how to fix it? I've done a little google foo searching and have come up empty. Don't know, but maybe a guess and a question. Does gdb output anything during this time? GDB loads info about libraries used (watch mem usage), though over 20 secs seems long set auto-solib-add off There may be other such hidden work of gdb, but I wouldn't be aware of it (there is follow forks, but that must be off) - If you strip the executable, and then run it in gdb what happens? You can't debug, obviously. But gdb has less work to do. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] gdb problems on ubtuntu 19.10
I know this problem is not entirely Lazarus related, but I'm hoping someone here might be able to provide some insight. On a fresh install of Ubuntu 19.10 when running projects from Lazarus with gdb debugging, any and all projects take anywhere from 20 to 30 seconds to become interactive after a project has been compiled and run. That is, the visual forms either do not appear when running, or appear but an unresponsive for 20-30 seconds. If I run without the debugger the programs start almost instantly. When I run the same program from a terminal using gdb manually, I get the same unresponsive delay. Does anyone know what the problem might be and how to fix it? I've done a little google foo searching and have come up empty. Thanks for your help. Anthony -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why?
Hi Bo, On 31/10/2019 10:02 pm, Michael Van Canneyt via lazarus wrote: > If the 'interfaces' unit is in the uses clause of your program, try > removing it. In addition to what Michael said, you can also run `ldd /path/and/program` and Linux will tell you your executable is dependent on X11 libraries. If so, then "nogui" might still be pulling in dependencies without your knowledge. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why?
On Thu, 31 Oct 2019, Bo Berglund via lazarus wrote: If the program works 100%, you should ask yourself why you needed the GUI routines in the first place ? Michael. I do *not* have *any* GUI routines or such. The program was created as one of the console types Lazarus offers (I do not really know the difference between them and I don't remember which one I chose). So it is *not* a GUI program at all, it was meant from the start to be run from cron invisible from the user rather like a service. OK. I also set the dependencies to LCLbase to avoid the GUI part. Well, clearly there is still a dependency on a GUI unit because the program tried to make contact with an X server. If the 'interfaces' unit is in the uses clause of your program, try removing it. Michael. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why?
On Thu, 31 Oct 2019 11:26:26 +0100 (CET), Michael Van Canneyt via lazarus wrote: > > >On Thu, 31 Oct 2019, Bo Berglund via lazarus wrote: > >> On Thu, 31 Oct 2019 11:06:17 +0100, Bo Berglund via lazarus >> wrote: >> >>> I am working on a program intended to be run by cron in unattended >>> mode on a Raspberry Pi without GUI installed. >>> >>> I started it in Windows but have now moved the sources over to >>> Raspbian for building on that platform and it does not work as >>> expected... >>> >> >> After posting here I went into project options and looked for >> something that could relate to the GUI being present and then I found >> this: >> >> Project/ProjectOptions/CompilerOptions/AdditionsAndOverrides/SetLCLWidgetType/ >> >> Here was a selection "nogui", which I set and now the error >> disappeared!!! >> >> Hard to find but seems like I am OK for now... > >You can't run a Linux LCL graphical program through putty, unless you have an X >session running on your windows machine, and you set up the necessary port >forwarding. > >What you did in the options is simply completely disable the GUI. >As a result, the linux program does not try to connect to the X server. > >If the program works 100%, you should ask yourself why you needed the GUI >routines in the first place ? > >Michael. I do *not* have *any* GUI routines or such. The program was created as one of the console types Lazarus offers (I do not really know the difference between them and I don't remember which one I chose). So it is *not* a GUI program at all, it was meant from the start to be run from cron invisible from the user rather like a service. I also set the dependencies to LCLbase to avoid the GUI part. -- Bo Berglund Developer in Sweden -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer
On Oct 31, 2019, at 7:40 AM, Mattias Gaertner via lazarus wrote: > > On Thu, 24 Oct 2019 15:36:54 -0500 > Dan Star via lazarus wrote: > >> On my other Catalina Mac I cannot install LLDB FPDebug. I get the >> following error when I rebuild the IDE with fpdebug and laz...fplldb >> packages: >> >>Build IDE: Exit code 2, Errors: 3 >>Error: ld: framework not found Cocoa >>make[2]: *** [lazarus] Error 1 >>make[1]: *** [idepkg] Error 2 >>Error: make: *** [idepkg] Error 2 >>An error occurred while linking >>Error: Error while linking >> >> Xcode 11.1 is installed so I assume the Cocoa Framework (only needed >> for programming or for Macos too?) is installed too. Please advise. > > I upgraded from Mojave to Catalina > > executed "xcode-select --install" > > And then to find the crt1.10.5 I changed in /etc/fpc.cfg the -Fl behind > "#ifdef cpux86_64" from > -Fl/Applications/Xcode.app/Contents/Developer/Toolchain... > to > -Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/ > > Now Lazarus can compile itself. What are the correct file permissions on /etc/fpc.cfg? -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer
On Thu, 24 Oct 2019 15:36:54 -0500 Dan Star via lazarus wrote: > On my other Catalina Mac I cannot install LLDB FPDebug. I get the > following error when I rebuild the IDE with fpdebug and laz...fplldb > packages: > > Build IDE: Exit code 2, Errors: 3 > Error: ld: framework not found Cocoa > make[2]: *** [lazarus] Error 1 > make[1]: *** [idepkg] Error 2 > Error: make: *** [idepkg] Error 2 > An error occurred while linking > Error: Error while linking > > Xcode 11.1 is installed so I assume the Cocoa Framework (only needed > for programming or for Macos too?) is installed too. Please advise. I upgraded from Mojave to Catalina executed "xcode-select --install" And then to find the crt1.10.5 I changed in /etc/fpc.cfg the -Fl behind "#ifdef cpux86_64" from -Fl/Applications/Xcode.app/Contents/Developer/Toolchain... to -Fl/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/ Now Lazarus can compile itself. Mattias -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer
On Tue, 15 Oct 2019 02:09:29 +0200, Martin Frb wrote: > You are aware that the IDE now supports LLDB too? > https://forum.lazarus.freepascal.org/index.php/topic,42869.0.html Thank you. LLDB did work and helped me find some problems in my program on to get it to work on Mac OSX Catalina. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why?
On Thu, 31 Oct 2019, Bo Berglund via lazarus wrote: On Thu, 31 Oct 2019 11:06:17 +0100, Bo Berglund via lazarus wrote: I am working on a program intended to be run by cron in unattended mode on a Raspberry Pi without GUI installed. I started it in Windows but have now moved the sources over to Raspbian for building on that platform and it does not work as expected... After posting here I went into project options and looked for something that could relate to the GUI being present and then I found this: Project/ProjectOptions/CompilerOptions/AdditionsAndOverrides/SetLCLWidgetType/ Here was a selection "nogui", which I set and now the error disappeared!!! Hard to find but seems like I am OK for now... You can't run a Linux LCL graphical program through putty, unless you have an X session running on your windows machine, and you set up the necessary port forwarding. What you did in the options is simply completely disable the GUI. As a result, the linux program does not try to connect to the X server. If the program works 100%, you should ask yourself why you needed the GUI routines in the first place ? Michael. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why?
On Thu, 31 Oct 2019 11:06:17 +0100, Bo Berglund via lazarus wrote: >I am working on a program intended to be run by cron in unattended >mode on a Raspberry Pi without GUI installed. > >I started it in Windows but have now moved the sources over to >Raspbian for building on that platform and it does not work as >expected... > After posting here I went into project options and looked for something that could relate to the GUI being present and then I found this: Project/ProjectOptions/CompilerOptions/AdditionsAndOverrides/SetLCLWidgetType/ Here was a selection "nogui", which I set and now the error disappeared!!! Hard to find but seems like I am OK for now... -- Bo Berglund Developer in Sweden -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] Lazarus program runs fine in a Terminal but not in a PuTTY session, why?
I am working on a program intended to be run by cron in unattended mode on a Raspberry Pi without GUI installed. I started it in Windows but have now moved the sources over to Raspbian for building on that platform and it does not work as expected... If I open a terminal window inside the Raspbian GUI (I am using VNC to work in the GUI) then the test run works as expected. Right now it is just displaying the content of the directory where the data will be located using this code as a test: function TaskReadyToRun(var ID: string): boolean; var FileList: TStringList; TaskDir: string; i: integer; begin FileList := TStringList.Create; try TaskDir := DATABASEDIR + '/tasks'; FindAllFiles(FileList, TaskDir, '*.conf', false); if FileList.Count > 0 then begin for i := 0 to FileList.Count -1 do Writeln(FileList[i]); end else Writeln('No files found'); Result := (FileList.Count > 0); finally FileList.Free; end; end; In a termional window on Raspbian I get the expected output. But when I run the same in a terminal created by PuTTY on my Windows laptop this is what I see: pi@rpi4-gui:~/projects/MonitorServer $ ./ssmonitorctrl (ssmonitorctrl:5436): Gtk-WARNING **: 10:43:42.775: cannot open display: Even if I run the program and redirect output to a file I get the same error message and the listfiles.txt file is empty: pi@rpi4-gui:~/projects/MonitorServer $ ./ssmonitorctrl > listfiles.txt What is causing this strange problem? I thought that Writeln() is the way to send output to stdout, but maybe not -- Bo Berglund Developer in Sweden -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Problem installing package from OLPM on Raspbian
On Wed, 30 Oct 2019 23:17:08 +0100, Bo Berglund via lazarus wrote: >What is the cause of this problem and what can I do to solve it? > >Kill lazarus via terminal or what? So this is what I did to get the system running: - killed lazarus so it was not running in hanged state - In a terminal I did: pi@rpi4-gui:~/dev/lazarus/2.0.4 $ time make bigide OPT=-dFPC_ARMHF FPC=/home/pi/bin/ppcarm After 6 minutes it was done and then I opened Lazarus and used OLPM to install the uniqueinstance package. This time the rebuild of the Lazarus IDE succeeded and the package icon was installed into the System tab. It seems like lazarus is now ready to be used. So I opened the project I migrated from svn and tried to build it. Now I got this message: Compile Project, Target: ssmonitorctrl: Success, Warnings: 12, Hints: 45 .. ssmonitorctrl.lpr(73,28) Warning: "crtbegin.o" not found, this will probably cause a linking failure ssmonitorctrl.lpr(73,28) Warning: "crtend.o" not found, this will probably cause a linking failure It seems like something needs to be done "somewhere" in order to fix this warning (I have not seen it in a long time), but where? I don't really know why this all happened, but it might have something to do with me moving the complete fpc/lazarus installation from one SDcard to another with a fresh operating system installed. I have installed FPC and Lazarus from sources downloaded via subversion and done this entirely in the user pi home directory. I spent some time on figuring out how to confine these tools entirely into the home dir so as not to depend on any stuff outside home except for the dependencies installed by apt. All of the dependencies I know of were installed into the new operating system before I copied over the home dirs. And it seemed to work just fine until tye IDE rebuild. Now I wonder if the lazarus "make bigide" puts or modifies stuff outside of the home dir, which I then have failed to copy in from the old installation? The make seems to have corrected whatever problöem was causing the crash... And is there really something outside of home that fpc or lazarus depends on and is not part of the operating system??? -- Bo Berglund Developer in Sweden -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus