Project stopped compiling lazarus / 21-General ---------------------------------------------------------------------- Tony Stone · 2021-08-29 00:10 My project will no longer compile.  it gives me the following error. Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Messages, Warnings: 2Warning: other unit files search path (aka unit path) of "lazbarcodes 1.0.4" contains "/media/tony/storpart/fpclazinstalls/conf ig_lazarus/onlinepackagemanager/packages/lazbarcodes/src", which belongs to package "lazbarcodes_runtimeonly"Warning: other unit files search path (aka unit path) of "lazbarcodes_runtimeonly 1.0.4" contains "/media/tony/storpart/fpclazinstalls/config_lazarus/onlinepac kagemanager/packages/lazbarcodes/src", which belongs to package "lazbarcodes"Compile Project, Mode: Debug, Target: bitbroom: Exit code 1, Errors: 2bitbroom.pas(6,13) Error: Duplicate identifier "CMEM"bitbroom.pas(15,24) Error: Duplicate identifier "CMEM" for starter, CMEM is only declared once.  But i will remove it... then i get this: bitbroom.pas(40,1) Error: Error while linking Now bitbroom.pas is my main project/appliocation file. It looks like this now: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program bitbroom; {$mode objfpc}{$H+} uses {$IFDEF UNIX} {$IFDEF UseCThreads}  cthreads, {$ENDIF} {$ENDIF}  Interfaces, // this includes the LCL widgetset  Forms,  lazcontrols,  synuni,  frmMainunit,  btckeyfunctions,  UECKey,  pkg_gifanim,  unitSplash, sysutils; {$R *.res} begin  RequireDerivedFormResource := True;  Application.Title:='BitBroom - BitCoin Address Utilities';  Application.Scaled:=True;  Application.Initialize;  frmSplash:=tfrmSplash.Create(Application);  frmSplash.Show;  Application.ProcessMessages;  frmSplash.Update;  Application.ProcessMessages;  sleep(200);     Application.CreateForm(TfrmSplash, frmSplash);  frmSplash.Close;  frmSplash.Release;    Application.CreateForm(TfrmMain, frmMain);  Application.Run;end.  I haven't cone anything in this file in forever.  It compiled a million times now.  The only changes i have recently made was upgrading to a Lazarus RC version(2.3 maybe?) and downgrading back to 2.0.12 due to many bugs I was running into... Oh yeah... also, if i run it in release mode it runs fine!  So i think it is a debugger issue?  Sorry for typos and other hard to understand stuff... this is my weekend hobby... so is some alcoholic beverages... lol [Edited to add messages code tags] ---------------------------------------------------------------------- dbannon · 2021-08-29 04:09 I doubt its a problem with your debugger. But perhaps its worthwhile looking in the mode setup page at the different things you are asking for in the debug mode ? Project Options, Compiler Options, across the top, right hand side, "Build Mode", hit the speed button on the right.  In the resulting window, a group of speed buttons on the left, the rightmost one has a hint "show differences between modes". Now, your bitbroom.pas is being blamed for a linker error because its the source code that is being worked through when the linker is called. Yours is a linker issue.  (I have resorted to using lazbuild to puild a mode, sometimes it gets you more informative error messages) Davo ---------------------------------------------------------------------- howardpc · 2021-08-29 07:26 Quote from: Tony Stone on August 29, 2021, 02:10:31 amMy project will no longer compile.  it gives me the following error. ... bitbroom.pas(40,1) Error: Error while linking Now bitbroom.pas is my main project/appliocation file. A normal Lazarus project started via Project->New project and named bitbroom will have a main application file named bitbroom.lpr, and a project file named bitbroom.lpi. You have clearly created your project in a non-standard way, or renamed files so as to confuse the IDE. It is not surprising that the IDE cannot compile a project which does not conform to project naming conventions. Try starting with a new project in a new directory, saving the project using the IDE's Save As under the name you want for it, and then copying your code as appropriate into the new  project's skeleton sources. Then delete all of the old project entirely so you don't inadvertently open it again and mess things up again. ---------------------------------------------------------------------- Tony Stone · 2021-08-29 15:28 Quote from: howardpc on August 29, 2021, 09:26:20 amQuote from: Tony Stone on August 29, 2021, 02:10:31 amMy project will no longer compile.  it gives me the following error. ... bitbroom.pas(40,1) Error: Error while linking Now bitbroom.pas is my main project/appliocation file. A normal Lazarus project started via Project->New project and named bitbroom will have a main application file named bitbroom.lpr, and a project file named bitbroom.lpi. You have clearly created your project in a non-standard way, or renamed files so as to confuse the IDE. It is not surprising that the IDE cannot compile a project which does not conform to project naming conventions. Try starting with a new project in a new directory, saving the project using the IDE's Save As under the name you want for it, and then copying your code as appropriate into the new  project's skeleton sources. Then delete all of the old project entirely so you don't inadvertently open it again and mess things up again. Hmmm... so I am not sure why or how the .lpr file was renamed to a .pas file.   Anyway... I did what you said.  Started a new project.  Saved it as bitbroom... and started adding my forms and units back to the project.    And unfortunately I end up back at this issue here: Code: [Select]Messages, Warnings: 2 Warning: other unit files search path (aka unit path) of "lazbarcodes 1.0.4" contains "/media/tony/storpart/fpclazinstalls/config_lazarus/on linepackagemanager/packages/lazbarcodes/src", which belongs to package "lazbarcodes_runtimeonly" Warning: other unit files search path (aka unit path) of "lazbarcodes_runtimeonly 1.0.4" contains "/media/tony/storpart/fpclazi nstalls/config_lazarus/onlinepackagemanager/packages/lazbarcodes/src", which belongs to package "lazbarcodes" Compile Project, Target: bitbroom: Exit code 1, Errors: 1 bitbroom.lpr(21,1) Error: Error while linking ---------------------------------------------------------------------- Tony Stone · 2021-08-29 15:43 I was able to find more information by changing the filter debug messages option... I pasted all messages here https://zerobin.net/?0ba01b93d44c0e1b#juIpE3YcDWsXnsQl89wg4N23Y8VOBgEk 0dx1VoylGMM= ---------------------------------------------------------------------- howardpc · 2021-08-29 16:20 The two lazbarcodes packages you have installed have a faulty setting (presumably left by the developer) which should be changed. Whether this gives the linking error you encounter I am not sure, but it needs to be rectified in any case. Go to Package->Package Graph... In the treeview on the left of the Package Graph dialog scroll to lazbarcodes 1.0.x, and double-click it to open the package editor. Click the Options button in the Package lazbarcodes V1.0.x, and in the Compiler Options for Package lazbarcodes... dialog click the Paths node. Select the Other unit files (-Fu) edit box and delete whatever is there so it is blank. Click OK to close the dialog, and then click Compile in the Package lazbarcodes V... dialog to check that it compiles OK. Repeat this process for the other package, lazbarcodes_runtimeonly. You should find that the two warnings about those packages are now gone when you try to recompile your project. If you still get a linking error, you will have to share the sources I think to get it debugged. ---------------------------------------------------------------------- Tony Stone · 2021-08-29 16:31 Quote from: howardpc on August 29, 2021, 06:20:31 pmThe two lazbarcodes packages you have installed have a faulty setting (presumably left by the developer) which should be changed. Whether this gives the linking error you encounter I am not sure, but it needs to be rectified in any case. Go to Package->Package Graph... In the treeview on the left of the Package Graph dialog scroll to lazbarcodes 1.0.x, and double-click it to open the package editor. Click the Options button in the Package lazbarcodes V1.0.x, and in the Compiler Options for Package lazbarcodes... dialog click the Paths node. Select the Other unit files (-Fu) edit box and delete whatever is there so it is blank. Click OK to close the dialog, and then click Compile in the Package lazbarcodes V... dialog to check that it compiles OK. Repeat this process for the other package, lazbarcodes_runtimeonly. You should find that the two warnings about those packages are now gone when you try to recompile your project. If you still get a linking error, you will have to share the sources I think to get it debugged. Well thanks... that took care of the two warnings.  But I still get the linking error.  I am not against sharing my source code... I would kind of be more easy about doing a remote desktop connection with anyone willing to have a look at it.(I use AnyDesk) Sharing my sources isn't really a problem but it uses a lot of packages which makes it a pain for other people to get up and running.  Took another buddy some time to get his Lazarus all configured with the right packages etc... ---------------------------------------------------------------------- howardpc · 2021-08-29 17:51 Is your project under version control? If so, you can go back to the last time you did not have a linking error and consider what you have changed since. If you turn on full verbosity and don't filter any messages, do you get a more specific error message (e.g. missing resource) related to the linking process? ---------------------------------------------------------------------- Tony Stone · 2021-08-29 17:54 Quote from: howardpc on August 29, 2021, 07:51:33 pmIs your project under version control? If so, you can go back to the last time you did not have a linking error and consider what you have changed since. If you turn on full verbosity and don't filter any messages, do you get a more specific error message (e.g. missing resource) related to the linking process? No version control.  I thought i did have full verbosity and no filtering.  I will go look again and report back shortly. ---------------------------------------------------------------------- Tony Stone · 2021-08-29 17:59 ok so there is thousands and thousands of messages now... the last message before linking error is this: Quote[10.359] Executing "/usr/bin/ld" with command line "-b elf64-x86-64 -m elf_x86_64  --dynamic-linker=/lib64/ld- linux-x86-64.so.2     -L. -o /media/tony/storpart/SoftDev/LazarusProjects/BitBroom/bitbroom -T /media/tony/storpart/SoftDev/LazarusProjects/BitBroom/link47397.res -e _start" ---------------------------------------------------------------------- ccrause · 2021-08-29 19:14 Quote from: Tony Stone on August 29, 2021, 07:59:33 pmok so there is thousands and thousands of messages now... the last message before linking error is this: Quote[10.359] Executing "/usr/bin/ld" with command line "-b elf64-x86-64 -m elf_x86_64  --dynamic-linker=/lib64/ld- linux-x86-64.so.2     -L. -o /media/tony/storpart/SoftDev/LazarusProjects/BitBroom/bitbroom -T /media/tony/storpart/SoftDev/LazarusProjects/BitBroom/link47397.res -e _start"Another option is to add -sh to the project custom options.  This will create a link script after compilation, ppas.sh in the executable output folder.  Run this script in a terminal to see linker produced messages. ---------------------------------------------------------------------- Tony Stone · 2021-08-29 19:29 Quote from: ccrause on August 29, 2021, 09:14:04 pmQuote from: Tony Stone on August 29, 2021, 07:59:33 pmok so there is thousands and thousands of messages now... the last message before linking error is this: Quote[10.359] Executing "/usr/bin/ld" with command line "-b elf64-x86-64 -m elf_x86_64  --dynamic-linker=/lib64/ld- linux-x86-64.so.2     -L. -o /media/tony/storpart/SoftDev/LazarusProjects/BitBroom/bitbroom -T /media/tony/storpart/SoftDev/LazarusProjects/BitBroom/link47397.res -e _start"Another option is to add -sh to the project custom options.  This will create a link script after compilation, ppas.sh in the executable output folder.  Run this script in a terminal to see linker produced messages. So this is the output after running ppas.sh Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i tony@IrontTowel-Tower11 /media/tony/storpart/SoftDev/LazarusProjects/BitBroom $ ./ppas.sh Linking /media/tony/storpart/SoftDev/LazarusProjects/BitBroom/bitbroom /usr/bin/ld: /media/tony/storpart/fpclazinstalls/lazarus/components/la zcontrols/lib/x86_64-linux/gtk2/spinex.o: in function `.La6':spinex.pp:(.debug_info+0x961): undefined reference to `DBG2_$GROUPEDEDIT_$$_TCUSTOMABSTRACTGROUPEDEDIT'/usr/bin/ld: spinex.pp:(.debug_info+0xb86): undefined reference to `DBG_$GROUPEDEDIT_$$_TGEEDIT'/usr/bin/ld: spinex.pp:(.debug_info+0xbbb): undefined reference to `DBG_$GROUPEDEDIT_$$_TGEEDIT'/usr/bin/ld: spinex.pp:(.debug_info+0xbcf): undefined reference to `DBG_$GROUPEDEDIT_$$_TGEEDIT'/usr/bin/ld: spinex.pp:(.debug_info+0xbe2): undefined reference to `DBG_$GROUPEDEDIT_$$_TGEEDIT'/usr/bin/ld: spinex.pp:(.debug_info+0xd2f): undefined reference to `DBG_$COMCTRLS_$$_TUPDOWN'/usr/bin/ld: spinex.pp:(.debug_info+0xd64): undefined reference to `DBG_$COMCTRLS_$$_TUPDOWN'/usr/bin/ld: spinex.pp:(.debug_info+0xd7a): undefined reference to `DBG_$COMCTRLS_$$_TUPDOWN'/usr/bin/ld: spinex.pp:(.debug_info+0xd8d): undefined reference to `DBG_$COMCTRLS_$$_TUPDOWN'/usr/bin/ld: spinex.pp:(.debug_info+0xfe2): undefined reference to `DBG_$COMCTRLS_$$_TUPDOWNDIRECTION'/usr/bin/ld: spinex.pp:(.debug_info+0x103c): undefined reference to `DBG_$COMCTRLS_$$_TUDBTNTYPE'/usr/bin/ld: spinex.pp:(.debug_info+0x1165): undefined reference to `DBG_$CONTROLS_$$_TCONTROLCLASS'/usr/bin/ld: spinex.pp:(.debug_info+0x119a): undefined reference to `DBG_$CONTROLS_$$_TCONTROLCLASS'/usr/bin/ld: spinex.pp:(.debug_info+0x11b8): undefined reference to `DBG_$CONTROLS_$$_TCONTROLCLASS'/usr/bin/ld: spinex.pp:(.debug_info+0x11cb): undefined reference to `DBG_$CONTROLS_$$_TCONTROLCLASS'/usr/bin/ld: spinex.pp:(.debug_info+0x1223): undefined reference to `DBG_$LCLTYPE_$$_TTRANSLATESTRING'/usr/bin/ld: spinex.pp:(.debug_info+0x1259): undefined reference to `DBG_$LCLTYPE_$$_TTRANSLATESTRING'/usr/bin/ld: spinex.pp:(.debug_info+0x1272): undefined reference to `DBG_$LCLTYPE_$$_TTRANSLATESTRING'/usr/bin/ld: spinex.pp:(.debug_info+0x1286): undefined reference to `DBG_$LCLTYPE_$$_TTRANSLATESTRING'/usr/bin/ld: /media/tony/storpart/fp clazinstalls/lazarus/components/lazcontrols/lib/x86_64- linux/gtk2/spinex.o: in function `.La12':spinex.pp:(.debug_info+0x1f48): undefined reference to `DBG2_$GROUPEDEDIT_$$_TCUSTOMABSTRACTGROUPEDEDIT'/usr/bin/ld: spinex.pp:(.debug_info+0x216d): undefined reference to `DBG_$GROUPEDEDIT_$$_TGEEDIT'/usr/bin/ld: spinex.pp:(.debug_info+0x21a2): undefined reference to `DBG_$GROUPEDEDIT_$$_TGEEDIT'/usr/bin/ld: spinex.pp:(.debug_info+0x21b6): undefined reference to `DBG_$GROUPEDEDIT_$$_TGEEDIT'/usr/bin/ld: spinex.pp:(.debug_info+0x21c9): undefined reference to `DBG_$GROUPEDEDIT_$$_TGEEDIT'/usr/bin/ld: spinex.pp:(.debug_info+0x2316): undefined reference to `DBG_$COMCTRLS_$$_TUPDOWN'/usr/bin/ld: spinex.pp:(.debug_info+0x234b): undefined reference to `DBG_$COMCTRLS_$$_TUPDOWN'/usr/bin/ld: spinex.pp:(.debug_info+0x2361): undefined reference to `DBG_$COMCTRLS_$$_TUPDOWN'/usr/bin/ld: spinex.pp:(.debug_info+0x2374): undefined reference to `DBG_$COMCTRLS_$$_TUPDOWN'/usr/bin/ld: spinex.pp:(.debug_info+0x25c9): undefined reference to `DBG_$COMCTRLS_$$_TUPDOWNDIRECTION'/usr/bin/ld: spinex.pp:(.debug_info+0x2623): undefined reference to `DBG_$COMCTRLS_$$_TUDBTNTYPE'/usr/bin/ld: spinex.pp:(.debug_info+0x274c): undefined reference to `DBG_$CONTROLS_$$_TCONTROLCLASS'/usr/bin/ld: spinex.pp:(.debug_info+0x2781): undefined reference to `DBG_$CONTROLS_$$_TCONTROLCLASS'/usr/bin/ld: spinex.pp:(.debug_info+0x279f): undefined reference to `DBG_$CONTROLS_$$_TCONTROLCLASS'/usr/bin/ld: spinex.pp:(.debug_info+0x27b2): undefined reference to `DBG_$CONTROLS_$$_TCONTROLCLASS'/usr/bin/ld: spinex.pp:(.debug_info+0x280a): undefined reference to `DBG_$LCLTYPE_$$_TTRANSLATESTRING'/usr/bin/ld: spinex.pp:(.debug_info+0x2840): undefined reference to `DBG_$LCLTYPE_$$_TTRANSLATESTRING'/usr/bin/ld: spinex.pp:(.debug_info+0x2859): undefined reference to `DBG_$LCLTYPE_$$_TTRANSLATESTRING'/usr/bin/ld: spinex.pp:(.debug_info+0x286d): undefined reference to `DBG_$LCLTYPE_$$_TTRANSLATESTRING'/usr/bin/ld: /media/tony/storpart/fp clazinstalls/config_lazarus/onlinepackagemanager/packages/gifanim/lib/ x86_64-linux/gifanim.o: in function `.La8':gifanim.pas:(.debug_info+0x56a): undefined reference to `DBG2_$CONTROLS_$$_TGRAPHICCONTROL'/usr/bin/ld: gifanim.pas:(.debug_info+0x627): undefined reference to `DBG_$EXTCTRLS_$$_TTIMER'/usr/bin/ld: gifanim.pas:(.debug_info+0x68c): undefined reference to `DBG_$GRAPHICS_$$_TBITMAP'/usr/bin/ld: gifanim.pas:(.debug_info+0x6a6): undefined reference to `DBG_$GRAPHICS_$$_TBITMAP'/usr/bin/ld: gifanim.pas:(.debug_info+0xc11): undefined reference to `DBG_$GRAPHTYPE_$$_TGRAPHICSCOLOR'/usr/bin/ld: gifanim.pas:(.debug_info+0xe43): undefined reference to `DBG_$LRESOURCES_$$_TLRESOURCE'/usr/bin/ld: /media/tony/storpart/fpcla zinstalls/config_lazarus/onlinepackagemanager/packages/gifanim/lib/x86 _64-linux/gifanim.o: in function `.La9':gifanim.pas:(.debug_info+0xe98): undefined reference to `DBG_$GRAPHICS_$$_TBITMAP'/usr/bin/ld: gifanim.pas:(.debug_info+0xefb): undefined reference to `DBG_$GRAPHICS_$$_TBITMAP'/usr/bin/ld: /media/tony/storpart/fpclazinst alls/config_lazarus/onlinepackagemanager/packages/gifanim/lib/x86_64- linux/gifanim.o: in function `.La13':gifanim.pas:(.debug_info+0x1f1b): undefined reference to `DBG_$INTFGRAPHICS_$$_TLAZINTFIMAGE'/usr/bin/ld: gifanim.pas:(.debug_info+0x1f3d): undefined reference to `DBG_$GRAPHTYPE_$$_TRAWIMAGEDESCRIPTION'/usr/bin/ld: gifanim.pas:(.debug_info+0x2025): undefined reference to `DBG_$LRESOURCES_$$_TLAZARUSRESOURCESTREAM'/usr/bin/ld: gifanim.pas:(.debug_info+0x2050): undefined reference to `DBG_$INTFGRAPHICS_$$_TLAZINTFIMAGE'/usr/bin/ld: gifanim.pas:(.debug_info+0x2072): undefined reference to `DBG_$GRAPHTYPE_$$_TRAWIMAGEDESCRIPTION'/usr/bin/ld: gifanim.pas:(.debug_info+0x20dd): undefined reference to `DBG_$GRAPHICS_$$_TBITMAP'/usr/bin/ld: gifanim.pas:(.debug_info+0x2160): undefined reference to `DBG_$INTFGRAPHICS_$$_TLAZINTFIMAGE'/usr/bin/ld: gifanim.pas:(.debug_info+0x2182): undefined reference to `DBG_$GRAPHTYPE_$$_TRAWIMAGEDESCRIPTION'/usr/bin/ld: /media/tony/storp art/fpclazinstalls/config_lazarus/onlinepackagemanager/packages/lazbar codes/packages/lib/x86_64-linux/ubarcodes.o: in function `.La4':ubarcodes.pas:(.debug_info+0x29d): undefined reference to `DBG2_$CONTROLS_$$_TGRAPHICCONTROL'/usr/bin/ld: ubarcodes.pas:(.debug_info+0x307): undefined reference to `DBG_$GRAPHTYPE_$$_TGRAPHICSCOLOR'/usr/bin/ld: ubarcodes.pas:(.debug_info+0x326): undefined reference to `DBG_$GRAPHTYPE_$$_TGRAPHICSCOLOR'/usr/bin/ld: ubarcodes.pas:(.debug_info+0x427): undefined reference to `DBG_$GRAPHTYPE_$$_TGRAPHICSCOLOR'/usr/bin/ld: ubarcodes.pas:(.debug_info+0x45c): undefined reference to `DBG_$GRAPHTYPE_$$_TGRAPHICSCOLOR'/usr/bin/ld: ubarcodes.pas:(.debug_info+0x47b): undefined reference to `DBG_$GRAPHTYPE_$$_TGRAPHICSCOLOR'/usr/bin/ld: /media/tony/storpart/fp clazinstalls/config_lazarus/onlinepackagemanager/packages/lazbarcodes/ packages/lib/x86_64- linux/ubarcodes.o:ubarcodes.pas:(.debug_info+0x48e): more undefined references to `DBG_$GRAPHTYPE_$$_TGRAPHICSCOLOR' follow/usr/bin/ld: /m edia/tony/storpart/fpclazinstalls/config_lazarus/onlinepackagemanager/ packages/lazbarcodes/packages/lib/x86_64-linux/ubarcodes.o: in function `.La4':ubarcodes.pas:(.debug_info+0x6af): undefined reference to `DBG_$GRAPHICS_$$_TCANVAS'/usr/bin/ld: ubarcodes.pas:(.debug_info+0x863): undefined reference to `DBG_$GRAPHICS_$$_TBITMAP'/usr/bin/ld: ubarcodes.pas:(.debug_info+0x8b2): undefined reference to `DBG_$GRAPHICS_$$_TCANVAS'/usr/bin/ld: ubarcodes.pas:(.debug_info+0x956): undefined reference to `DBG_$GRAPHICS_$$_TFPIMAGEBITMAPCLASS'/usr/bin/ld: ubarcodes.pas:(.debug_info+0x98d): undefined reference to `DBG_$GRAPHICS_$$_TFPIMAGEBITMAP'An error occurred while linking /medi a/tony/storpart/SoftDev/LazarusProjects/BitBtony@Irotony@Irtony@IrontT tony@Irtttotonytony@totony@IrontTowel-Tower11 /media/tony/storpart/SoftDev/LazarusProjects/BitBroom $ ---------------------------------------------------------------------- Tony Stone · 2021-08-29 19:46 FINALLY! So what I did is rebuild Lazarus with the Debugger IDE.  The Normal IDE option and Optimized IDE option cause issues for me and linking fails in my program.  I also reinstalled the packages that were in the error messages from the ppas.sh script. Thanks for your help everyone!  Maybe now... 18 hours later I can get back to writing that part of my program with the amazing idea I had!  or wait... i forget what i was doing now... Really though, thank you guys for your help!