Recent

Author Topic: Build IDE : Exit code 2, Errors :1  (Read 2975 times)

kangkoding

  • New member
  • *
  • Posts: 7
Build IDE : Exit code 2, Errors :1
« on: July 16, 2020, 07:59:27 am »
hi everyone

got error when installing package.
Lazarus 2.0.0+dfsg-2
aarch64-linux-gtk2

error code:
pkgmanager.pas(6591,0) Error, Can't call the assembler, error -1 switching to external assembling

please somebody help me

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1739
Re: Build IDE : Exit code 2, Errors :1
« Reply #1 on: July 16, 2020, 09:07:26 am »
Increase your RAM memory by adding swap space might help.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Build IDE : Exit code 2, Errors :1
« Reply #2 on: July 16, 2020, 10:03:59 am »
Install binutils?

Thaddy

  • Hero Member
  • *****
  • Posts: 14213
  • Probably until I exterminate Putin.
Re: Build IDE : Exit code 2, Errors :1
« Reply #3 on: July 16, 2020, 10:14:15 am »
Can be either, but I suspect that the swapspace needs to be increased too. E.g. on a Raspberry Pi 3 or 4 set the swap space to the same amount as the internal memory. This should not be necessary if you have either 2, 4 or 8 GB internal memory.
https://www.bitpi.co/2015/02/11/how-to-change-raspberry-pis-swapfile-size-on-rasbian/ which is also valid for other debian derivatives like Ubuntu.

Also note that AARCH64 compilation takes a lot more memory because of the 64 bit platform.
( I am waiting for a couple of RPi4/8, but I tested AARCH64 compilation on RPI3/1 and RPi4/2)
« Last Edit: July 16, 2020, 10:16:44 am by Thaddy »
Specialize a type, not a var.

kangkoding

  • New member
  • *
  • Posts: 7
Re: Build IDE : Exit code 2, Errors :1
« Reply #4 on: July 16, 2020, 10:57:58 am »

Thaddy

  • Hero Member
  • *****
  • Posts: 14213
  • Probably until I exterminate Putin.
Re: Build IDE : Exit code 2, Errors :1
« Reply #5 on: July 16, 2020, 11:05:52 am »
Does it work now? Otherwise increase the swap space... (that works for me and I have a lot of Pies )
Specialize a type, not a var.

kangkoding

  • New member
  • *
  • Posts: 7
Re: Build IDE : Exit code 2, Errors :1
« Reply #6 on: July 16, 2020, 11:18:07 am »
hi all..
after inscreasing swap, there's new message error

"lazarus.pp(1 1) fatal cannot find fpdebug used by lazarus"

following https://forum.lazarus.freepascal.org/index.php?topic=46612.0 but still not solve

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: Build IDE : Exit code 2, Errors :1
« Reply #7 on: July 16, 2020, 04:13:09 pm »
1) Is there a folder components/fpdepug in your Lazarus install dir?

2) Have you opened the FpDebug package from inside the IDE (package menu) ?

3) Try to install the FpDebug package. (package menu > Install package)

You may then get the same error for LazDebuggerFp.

-------
Note, that since you are not on Intel FpDebug will not help you much.
If you get compilation errors in FpDebug (please report them), you can try to uninstall all of the following packages:
FpDebug
LazDebuggerFp
LazDebuggerFpLLDB (might not be installed)
LazDebuggerFpGdbmi (might not be installed)
LeakView
maybe others....


Uninstalling LeakView means you loose some functionality, if you want to work with the traces printed by heaptrc (mem leak finder).



kangkoding

  • New member
  • *
  • Posts: 7
Re: Build IDE : Exit code 2, Errors :1
« Reply #8 on: July 17, 2020, 01:34:56 am »
Quote
1) Is there a folder components/fpdepug in your Lazarus install dir?
    Yes, there is
Quote
2) Have you opened the FpDebug package from inside the IDE (package menu) ?
    Yes, i have opened
Quote
3) Try to install the FpDebug package. (package menu > Install package)
    When uninstalling FpDebug package, there's same error, so uninstalling fail

Quote
Note, that since you are not on Intel FpDebug will not help you much.
If you get compilation errors in FpDebug (please report them), you can try to uninstall all of the following packages:
FpDebug
LazDebuggerFp
LazDebuggerFpLLDB (might not be installed)
LazDebuggerFpGdbmi (might not be installed)
LeakView
maybe others....


Uninstalling LeakView means you loose some functionality, if you want to work with the traces printed by heaptrc (mem leak finder).

can't install or uninstall any package, there's error when rebuild ide in normal mode
« Last Edit: July 17, 2020, 01:42:45 am by kangkoding »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: Build IDE : Exit code 2, Errors :1
« Reply #9 on: July 17, 2020, 03:36:00 am »
In components/fpdebug/lib/<your arch>/  should be a file fpdebug.ppu
There also should be components/fpdebug/fpdebug.pas
If that is missing, then that is the problem.


Try building the IDE (Tools > Configure Build Lazarus) with the option -va
You will get the error again. Right click messages window, find the "copy" submenu, and "copy all and original messages"
There will be a warning, it will be massive.
Paste it in an editor.
Within the last 100 lines there should be references to fpdebug.
Where the compiler was looking, where it may have found something, and what it may have rejected.


As a last resort.... Not tested...
About uninstalling: Just seen some packages are part of BigIDE. I am not sure what exactly needed to be done to get rid of them.
You might try to edit:  ide/lazarus.pp
and remove from the uses: LeakView, LazDebuggerFpLldb, LazDebuggerFp,



kangkoding

  • New member
  • *
  • Posts: 7
Re: Build IDE : Exit code 2, Errors :1
« Reply #10 on: July 17, 2020, 09:55:44 am »
In components/fpdebug/lib/<your arch>/  should be a file fpdebug.ppu
There also should be components/fpdebug/fpdebug.pas
If that is missing, then that is the problem.

only fpdebug.lpk and fpdebug.pas, there's no fpdebug.ppu, show at picture below

Try building the IDE (Tools > Configure Build Lazarus) with the option -va
You will get the error again. Right click messages window, find the "copy" submenu, and "copy all and original messages"
There will be a warning, it will be massive.
Paste it in an editor.
Within the last 100 lines there should be references to fpdebug.
Where the compiler was looking, where it may have found something, and what it may have rejected.

Code: Pascal  [Select][+][-]
  1. TLazarusManager.Run starting /usr/lib/lazarus/2.0.0/lazarus ...
  2. Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/root/.lazarus"
  3. Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus"
  4. Looking for code tools config file:  "/root/.lazarus/codetoolsoptions.xml"
  5. NOTE: codetools config file not found - using defaults
  6. Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=aarch64-linux-gtk2 New=aarch64-linux-gtk2 FPC=True LCL=False
  7. TComponentTreeView.SetSelection: Updating component node values.
  8. Hint: (lazarus) compile package LazControlDsgn 0.0 Flags=[]
  9. Info: (lazarus) Execute Title="Compile package LazControlDsgn 0.0"
  10. Info: (lazarus) Working Directory="/usr/lib/lazarus/2.0.0/components/lazcontrols/design/"
  11. Info: (lazarus) Executable="/usr/bin/fpc"
  12. Info: (lazarus) Param[0]="-MObjFPC"
  13. Info: (lazarus) Param[1]="-Scghi"
  14. Info: (lazarus) Param[2]="-O1"
  15. Info: (lazarus) Param[3]="-g"
  16. Info: (lazarus) Param[4]="-gl"
  17. Info: (lazarus) Param[5]="-l"
  18. Info: (lazarus) Param[6]="-vewnhibq"
  19. Info: (lazarus) Param[7]="-Fu/usr/lib/lazarus/2.0.0/packager/units/aarch64-linux"
  20. Info: (lazarus) Param[8]="-Fu/usr/lib/lazarus/2.0.0/components/lazutils/lib/aarch64-linux"
  21. Info: (lazarus) Param[9]="-Fu/usr/lib/lazarus/2.0.0/lcl/units/aarch64-linux"
  22. Info: (lazarus) Param[10]="-Fu/usr/lib/lazarus/2.0.0/lcl/units/aarch64-linux/gtk2"
  23. Info: (lazarus) Param[11]="-Fu/usr/lib/lazarus/2.0.0/components/lazcontrols/lib/aarch64-linux/gtk2"
  24. Info: (lazarus) Param[12]="-Fu/usr/lib/lazarus/2.0.0/components/ideintf/units/aarch64-linux/gtk2"
  25. Info: (lazarus) Param[13]="-Fu/usr/lib/lazarus/2.0.0/components/lazcontrols/design/"
  26. Info: (lazarus) Param[14]="-FU/usr/lib/lazarus/2.0.0/components/lazcontrols/design/lib/aarch64-linux/gtk2/"
  27. Info: (lazarus) Param[15]="-dLCL"
  28. Info: (lazarus) Param[16]="-dLCLgtk2"
  29. Info: (lazarus) Param[17]="lazcontroldsgn.pas"
  30. Note: (lazarus) renamed file "/usr/lib/lazarus/2.0.0/lazarus" to "/usr/lib/lazarus/2.0.0/lazarus.old"
  31. Info: (lazarus) Execute Title="Build IDE"
  32. Info: (lazarus) Working Directory="/usr/lib/lazarus/2.0.0/"
  33. Info: (lazarus) Executable="/usr/bin/make"
  34. Info: (lazarus) Param[0]="idepkg"
  35. Info: (lazarus) Param[1]="-w"
  36. TIDEFPCParser.ImproveMsgUnitNotFound FindUnitInAllUsesSections failed due to syntax errors or fpdebug is not used in /usr/lib/lazarus/2.0.0/ide/lazarus.pp
  37.  
  38.  

As a last resort.... Not tested...
About uninstalling: Just seen some packages are part of BigIDE. I am not sure what exactly needed to be done to get rid of them.
You might try to edit:  ide/lazarus.pp
and remove from the uses: LeakView, LazDebuggerFpLldb, LazDebuggerFp, show at picture below

Still got error after remove from the uses: LeakView, LazDebuggerFpLldb, LazDebuggerFp

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • wiki
Re: Build IDE : Exit code 2, Errors :1
« Reply #11 on: July 17, 2020, 04:37:56 pm »
Really strange.... 
Few more things.
Sorry, for this is just trial and error, but I am out of ideas why this error happens in first. (And Lazarus 2.0.0+dfsg-2
aarch64-linux-gtk2 is made by the maintainers of the linux repro, not by anyone from the Lazarus team. So no idea if they did any changes....)


I am assuming you use "Tools > Build ..."?
If you use "make" from the commandline, I do not know if or which of the below steps will work....



1) Since it is Linux, some files are actually in your home folder ~/.lazarus  instead of the install dir.
Code: Bash  [Select][+][-]
  1. find ~/.lazarus -name fpdebug.ppu
  2. find ~/.lazarus -name fpdbgclasses.ppu
  3. grep fpdebug ~/.lazarus/staticpackages.inc
  4.  
"fpdbgclasses" is to check for other units from the package.
You can remove it from staticpackages, but as long as it is in the installed list, the IDE will put it back.

If they are in staticpackages.inc, they should go if you uninstall those packages. Try uninstalling them, and "save config", instead of immediate rebuild. See if that remove the packages from staticpackages.
In menu Packages > Package graph, you can see what all requires FpDebug. Any package needing it, must also be removed from the IDE.... (that should be "leakview", and any "LazDebugger*FP*" (with FP in the name).


2) In the other thread, there was a statement to run as root, open the package fpdebug, and compile it.

3)
To get a clean (re)start: Delete the entire ~/.lazarus/ folder.
But if you have settings of your own, backup ~/.lazarus/projectsessions , ~/.lazarus/onlinepackagemanager , ~/.lazarus/lazarus.dci and ~/.lazarus/*.xml

4)
If you do find or manage to produce an fpdebug.ppu and still get the error, then in "Configure build Lazarus" forcefully add the path to it.
-Fu/path_in_which_the_ppu_is
e.g. -Fu/home/you/.lazarus/foo/lib/arch64-gtk/

ONLY use that, if there is no other fpdebug.ppu, but the one to which you point.
Also, if the rebuild succeeds, test if it is needed for further rebuilds, or if the one rebuild fixed the issue and its no longer needed.
Having such path options in your config, can lead to all sorts of issues, as the IDE does not expect them. So only keep, if needed.




According to your picture, there is no "lib" folder in fpdebug. But it may be under ~/.lazarus/
The above step 1 will show.

The compiler output is not what I expected....
In the dialog opened by menu "Tools" > "Configure Build Lazarus" is an input field (memo) "Options". In that field enter: -va

After compile, the pop up menu of the "Messages" window has a sub menu "Copy", the bottom most entry is "Copy All/Original messages to clipboard"

The text should contain thousands of lines like:
Code: Text  [Select][+][-]
  1. [1.172] (10000) Unitsearch: messages.pas
  2. [1.172] (10000) Unitsearch: C:\FPC\fpc_3.0.4\64\def\units\x86_64-win64\httpd22\messages.ppu
  3. [1.172] (10000) Unitsearch: C:\FPC\fpc_3.0.4\64\def\units\x86_64-win64\httpd22\messages.pp
  4. [1.172] (10000) Unitsearch: C:\FPC\fpc_3.0.4\64\def\units\x86_64-win64\httpd22\messages.pas
  5. [1.172] (10000) Unitsearch: C:\FPC\fpc_3.0.4\64\def\units\x86_64-win64\rtl\messages.ppu
  6. [1.172] (10001) PPU Loading C:\FPC\fpc_3.0.4\64\def\units\x86_64-win64\rtl\messages.ppu
  7. [1.172] (MESSAGES) (10002) PPU Name: C:\FPC\fpc_3.0.4\64\def\units\x86_64-win64\rtl\messages.ppu
  8. [1.172] (MESSAGES) (10005) PPU Time: 2019/01/27 00:46:52
  9. [1.172] (MESSAGES) (10003) PPU Flags: 143488
  10. [1.172] (MESSAGES) (10004) PPU Crc: 5AAEE313
  11. [1.172] (MESSAGES) (10004) PPU Crc: C0E0D75A (intfc)
  12. [1.172] (MESSAGES) (10004) PPU Crc: EEFDAD71 (indc)

But actually this may not be needed. It depends, if the "find" from point 1 above, shows a fpdebug.ppu, then -va is needed, because it will tell why the compiler does not use it.

If there is no fpdebug.ppu on your disk, then we do not need -va.




Other possibility.

- Keep the executable "lazarus" file (and maybe "lazbuild")
- Keep the installed fpc
- Download the sources for 2.0.10 from our site
  Install the sources in your home folder (E.g. ~/lazarus  / But NOT inside the ~/.lazarus folder )
  Copy the "lazarus" executable into the sources folder
- delete ~/.lazarus
- make the old Lazarus install folder inaccessible (rename it / later delete it, if the sources should work)

Start lazarus, and rebuild.
Or instead, run "make BIGIDE"from the command line (you may need to google, how to specify your architecture, if it gets it wrong)

I would not expect it to be needed, but:
   -You may again have to go and install/uninstall fpdebug related packages via packages > install packages. Try installing them first.
   -Potentially also use "open package"  again.
 


 

TinyPortal © 2005-2018