Raspberry Pi 3 - Lazarus has problem wit GDB debugger lazarus / 1-Linux ---------------------------------------------------------------------- kris · 2016-11-03 03:08 Apparently same problem as those guys had: http://forum.lazarus-ide.org/index.php?topic=32289.0 http://forum.lazarus.freepascal.org/index.php?topic=6225.0 Steps to reproduce: 1. open a project (new or existing) and Run it 2. some warnings about crtopen.o not found, but apparently it doesn't matter 3. Compilahttp://forum.lazarus.freepascal.org/index.php?topic=6225.0tion successful 4. SIGSEGV exception right upon running So the project compiles but cannot ever run from Lazarus IDE. You can go to the filder of your project though and run the compiled program manually. The problem is definitely related to debugger, because if I disable the debugger entirely then I can run my progject from Lazarus IDE. Common, googling shows plenty of people faced the same problem, but I found no answers.  It must be something about the debugger. ---------------------------------------------------------------------- Thaddy · 2016-11-03 08:10 Probably forgot to build FPC /Lazarus with GDBMI=1 I am using a RPi3 as my main home machine for 3 months and never saw a sigsev from GDB itself. ---------------------------------------------------------------------- kris · 2016-11-03 09:18 I just did sudo apt-get install fpc lazarus. Will see if building it manually helps. ---------------------------------------------------------------------- RPoseika · 2016-11-08 16:55 I have the same issue - if I detach the program from the IDE it runs If I run the application by itself it runs. I run the same application (re-compiled) under windows and I can debug it there and port it back to raspbian and recompile for that os I am not a linux - raspbian get-apt expert for example I do not know what "Probably forgot to build FPC /Lazarus with GDBMI=1" means. I do love my raspberry though! ---------------------------------------------------------------------- Thaddy · 2016-11-08 17:14 Listen, I am running an RPi 3 as my main computer for four almost 5 months now with all trunks. What exactly is the problem? I am getting fed up with this. Are you all really Donald Trumps? Am i the only one who read  docs? ---------------------------------------------------------------------- rvk · 2016-11-08 17:51 Quote from: Thaddy on November 08, 2016, 06:14:15 pmAm i the only one who read  docs? Could be useful if you point to those docs and where it says "GDBMI=1" switch... ---------------------------------------------------------------------- RPoseika · 2016-11-08 23:40 Please be kind.. I only have had my raspberry for one week... I had more problems with Lazarus from the package install on raspbian.  I could not add other packages a and got a variety of error messages. Like I said. I am not a get-apt expert but I can read instructions. I found details on how to install FPC 3.0.0 and lazarus 1.6RC2 and was quite happy with that result. Then for some compiles  runs I got the error message and thought I could not run lazarus apps on my raspberry... Then it took me some time to find reference to the SIGILL error message on the internet and discovered that my applications run outside of the 'debugger'. Yes if someone can 'point' me to further details that would be appreciated. thanks in advance ---------------------------------------------------------------------- kris · 2016-11-09 01:44 Thaddy, building lazarus and then using or not using certain build flags is one thing. But installing a version from the repos is another. Why the version in the repos has been built without proper flags, if that is the issue. ---------------------------------------------------------------------- Thaddy · 2016-11-09 02:32 Quote from: rvk on November 08, 2016, 06:51:38 pmQuote from: Thaddy on November 08, 2016, 06:14:15 pmAm i the only one who read  docs? Could be useful if you point to those docs and where it says "GDBMI=1" switch... http://wiki.freepascal.org/FPC_New_Features_Trunk#GDB.2FMI_support For some reason most RPi builds don't respect that. It should be respected. That's why I force it. Read docs. By now it is default. Don't use old build scripts. ---------------------------------------------------------------------- rvk · 2016-11-09 05:26 Quote from: Thaddy on November 09, 2016, 03:32:52 amQuote from: rvk on November 08, 2016, 06:51:38 pmQuote from: Thaddy on November 08, 2016, 06:14:15 pmAm i the only one who read  docs? Could be useful if you point to those docs and where it says "GDBMI=1" switch... http://wiki.freepascal.org/FPC_New_Features_Trunk#GDB.2FMI_support For some reason most RPi builds don't respect that. It should be respected. That's why I force it. Read docs. By now it is default. Don't use old build scripts. When I asked for documentation I meant documentation a normal user who doesn't use trunk would use when building Lazarus. Pointing to a paragraph about compiling trunk and complaining that everybody should read the docs... Well... That makes me grumpy  Where is this paragraph in the normal build-wikis?? Also... That paragraph seems to be about the text IDE (console) so how are we to know, from that simple tucked away paragraph, that that could be a problem in Lazarus? ---------------------------------------------------------------------- Thaddy · 2016-11-09 07:51 Quote from: rvk on November 09, 2016, 06:26:55 amAlso... That paragraph seems to be about the text IDE (console) so how are we to know, from that simple tucked away paragraph, that that could be a problem in Lazarus? Dunno. Ask Lazarus maintainers. Docs are docs. You have a point in me using trunk, though. I should have been more clear. - I use fpc 3.1.1 on RPi3 + Geany as editor. This is my default goto. - I use Lazarus 1.7 + 3.0 on RPi3. This is for anything Laz related. ---------------------------------------------------------------------- att2 · 2016-11-15 13:31 Hello, I have the same problem. I am currently sitting on a Bananapi-M3, (BPI-M3), trying to install Lazarus 1.6 and fpc 3.0.0 simply via "apt- get install". It seems to work, but every time I compile some code with Lazarus the debugger is the problem. If the debugger option is activated, the compiled program never shows up. I also tried to run Lazarus directly from shell, language set to english and this is the result: pi@bpi-iot-ros-ai:~$ ./startlaz_engl.sh TLazarusManager.Run starting /usr/lib/lazarus/1.6/lazarus ... Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/pi/.lazarus" Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus" Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=arm-linux-qt New=arm-linux-qt FPC=True LCL=False Note: (lazarus) Invalid Package Link: file "/usr/lib/lazarus/1.6/components/fpdebug/fpdebug.lpk" does not exist. TLazSourceFileManager.LoadLFM Creating designer for hidden component of /home/pi/pro2/unit1.pas TLazSourceFileManager.InitOpenedProjectFile select form in designer: Form1:TForm1 TDesigner Hint: (lazarus) [TMainIDE.DoRunProject] INIT Error: (lazarus) [TMainIDE.DoBuildProject] MainBuildBoss.DoCheckIfProjectNeedsCompilation nothing to be done [TCmdLineDebugger] Debug PID: 1055 Hint: (lazarus) [TMainIDE.DoRunProject] Debugger=TGDBMIDebugger Hint: (lazarus) [TMainIDE.DoRunProject] END TGDBMIDebugger.StartDebugging WorkingDir="/home/pi/pro2/" --------------- Ok so this wont work. I googled up for the missing fpdebug.lpk, found it somewhere on github, copy/pasted the file to /usr/lib/lazarus/1.6/components/fpdebug/fpdebug.lpk and got this: pi@bpi-iot-ros-ai:~$ ./startlaz_engl.sh  is a file TLazarusManager.Run starting /usr/lib/lazarus/1.6/lazarus ... Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/pi/.lazarus" Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus" Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=arm-linux-qt New=arm-linux-qt FPC=True LCL=False TLazSourceFileManager.LoadLFM Creating designer for hidden component of /home/pi/pro2/unit1.pas TLazSourceFileManager.InitOpenedProjectFile select form in designer: Form1:TForm1 TDesigner Hint: (lazarus) [TMainIDE.DoRunProject] INIT Hint: (lazarus) Project needs building: Src has changed Project /home/pi/pro2/unit1.pas [TCompiler.Compile] CmdLine="/usr/bin/fpc  -MObjFPC -Scghi -Os -gw2 -godwarfsets -gl -l -vabq -Fi/home/pi/pro2/lib/arm-linux -Fu/usr/lib/lazarus/1.6/lcl/units/arm-linux/qt -Fu/usr/lib/lazarus/1.6/lcl/units/arm-linux -Fu/usr/lib/lazarus/1.6/components/lazutils/lib/arm-linux -Fu/usr/lib/lazarus/1.6/packager/units/arm-linux -Fu/home/pi/pro2/ -FU/home/pi/pro2/lib/arm-linux/ -dLCL -dLCLqt project1.lpr" Info: (lazarus) Execute Title="Compile Project, Target: project1" Info: (lazarus) Working Directory="/home/pi/pro2/" Info: (lazarus) Executable="/usr/bin/fpc" Info: (lazarus) Param[0]="-MObjFPC" Info: (lazarus) Param[1]="-Scghi" Info: (lazarus) Param[2]="-Os" Info: (lazarus) Param[3]="-gw2" Info: (lazarus) Param[4]="-godwarfsets" Info: (lazarus) Param[5]="-gl" Info: (lazarus) Param[6]="-l" Info: (lazarus) Param[7]="-vabq" Info: (lazarus) Param[8]="-Fi/home/pi/pro2/lib/arm-linux" Info: (lazarus) Param[9]="-Fu/usr/lib/lazarus/1.6/lcl/units/arm- linux/qt" Info: (lazarus) Param[10]="-Fu/usr/lib/lazarus/1.6/lcl/units/arm- linux" Info: (lazarus) Param[11]="-Fu/usr/lib/lazarus/1.6/components/lazutils/lib/arm-linux" Info: (lazarus) Param[12]="-Fu/usr/lib/lazarus/1.6/packager/units/arm- linux" Info: (lazarus) Param[13]="-Fu/home/pi/pro2/" Info: (lazarus) Param[14]="-FU/home/pi/pro2/lib/arm-linux/" Info: (lazarus) Param[15]="-dLCL" Info: (lazarus) Param[16]="-dLCLqt" Info: (lazarus) Param[17]="project1.lpr" [TCompiler.Compile] end Hint: (lazarus) [TMainIDE.DoBuildProject] compiler time in s: 19.2770001478493 [TCmdLineDebugger] Debug PID: 1691 Hint: (lazarus) [TMainIDE.DoRunProject] Debugger=TGDBMIDebugger Hint: (lazarus) [TMainIDE.DoRunProject] END TGDBMIDebugger.StartDebugging WorkingDir="/home/pi/pro2/" TCodeHelpManager.GetFPDocFilenameForSource Hint: Owner has no fpdoc paths: /home/pi/pro2/unit1.pas ### TCodeToolManager.HandleException: "identifier not found: Sender" at Line=17 Col=28 in "/home/pi/pro2/unit1.pas" I am at a loss now. So what to do to get Lazarus 1.6 and fpc 3.0.0 to install properly, including the debugger?