View Issue Details

IDProjectCategoryView StatusLast Update
0034652LazarusIDEpublic2018-12-05 23:43
ReporterHans LuijtenAssigned ToMaxim Ganetsky 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformWindows, MacOS, LinuxOSOS Version
Product Version2.1 (SVN)Product Buildr59729 
Target VersionFixed in Version2.2 
Summary0034652: Cannot compile IDE as of r59720
DescriptionThe IDE from trunk fails compiling. This started with r59720.
Tested all versions from r59719 - r59729. r59719 compiles just fine, all versions after that fail;
Tested this under Windows and MacOS.

Windows:

C:\freepascal\lazarus\packager\fppkghelper.pas(131,19) Error: (5000) Identifier not found "FFPpkg"
C:\freepascal\lazarus\packager\fppkghelper.pas(131,51) Error: (5000) Identifier not found "pkgpkInstalled"
C:\freepascal\lazarus\packager\fppkghelper.pas(132,26) Error: (5038) identifier idents no member "PackagesStructure"
fppkghelper.pas(138) Fatal: (10026) There were 3 errors compiling module, stopping
Fatal: (1018) Compilation aborted
make[2]: *** [lazbuild.exe] Error 1
make[2]: Leaving directory `C:/freepascal/lazarus/ide'
make[1]: *** [lazbuilder] Error 2
make[1]: Leaving directory `C:/freepascal/lazarus/ide'
make: *** [lazbuild] Error 2

Mac:

/Users/hans/freepascal/lazarus/packager/fppkghelper.pas(131,19) Error: (5000) Identifier not found "FFPpkg"
/Users/hans/freepascal/lazarus/packager/fppkghelper.pas(131,51) Error: (5000) Identifier not found "pkgpkInstalled"
/Users/hans/freepascal/lazarus/packager/fppkghelper.pas(132,26) Error: (5038) identifier idents no member "PackagesStructure"
fppkghelper.pas(138) Fatal: (10026) There were 3 errors compiling module, stopping
Fatal: (1018) Compilation aborted
make[2]: *** [lazbuild] Error 1
make[1]: *** [lazbuilder] Error 2
make: *** [lazbuild] Error 2

Linux:

/home/hans/freepascal/lazarus/packager/fppkghelper.pas(131,19) Error: (5000) Identifier not found "FFPpkg"
/home/hans/freepascal/lazarus/packager/fppkghelper.pas(131,51) Error: (5000) Identifier not found "pkgpkInstalled"
/home/hans/freepascal/lazarus/packager/fppkghelper.pas(132,26) Error: (5038) identifier idents no member "PackagesStructure"
fppkghelper.pas(138) Fatal: (10026) There were 3 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Makefile:4150: recipe for target 'lazbuild' failed
make[2]: *** [lazbuild] Error 1
make[2]: Leaving directory '/home/hans/freepascal/lazarus/ide'
Makefile:4581: recipe for target 'lazbuilder' failed
make[1]: *** [lazbuilder] Error 2
make[1]: Leaving directory '/home/hans/freepascal/lazarus/ide'
Makefile:3283: recipe for target 'lazbuild' failed
make: *** [lazbuild] Error 2
Steps To ReproduceSVN update, make clean all ...
Additional InformationSee also forum topic:
http://forum.lazarus-ide.org/index.php/topic,43415.0.html
TagsNo tags attached.
Fixed in Revision59731
LazTarget-
WidgetsetGTK 2, Win32/Win64, Cocoa
Attached Files
  • FppkgHelper.patch (608 bytes)
    Index: packager/fppkghelper.pas
    ===================================================================
    --- packager/fppkghelper.pas	(r�vision 59730)
    +++ packager/fppkghelper.pas	(copie de travail)
    @@ -125,11 +125,17 @@
     end;
     
     function TFppkgHelper.GetPackageUnitPath(const PackageName: string): string;
    +{$IFNDEF VER3_0}
     var
       FppkgPackage: TFPPackage;
    +{$ENDIF VER3_0}
     begin
    +{$IFNDEF VER3_0}
       FppkgPackage := FFPpkg.FindPackage(PackageName, pkgpkInstalled);
       Result := FppkgPackage.PackagesStructure.GetUnitDirectory(FppkgPackage);
    +{$ELSE}
    +  result:='';
    +{$ENDIF VER3_0}
     end;
     
     finalization
    
    FppkgHelper.patch (608 bytes)

Relationships

has duplicate 0034638 closedMaxim Ganetsky Cannot make IDE on Mac 

Activities

John Landmesser

2018-12-05 17:07

reporter   ~0112369

same issue but starting with r59710:

commit message was:
 IDE: Fixed possible AV's during the dependency checks on fpmake-packages

Fix(??):
I changed my copy of packager/fppkghelper.pas adding {$IFNDEF VER3_0} to the whole body of TFppkgHelper.GetPackageUnitPath.

errno

2018-12-05 21:37

reporter   ~0112379

Last edited: 2018-12-05 21:38

View 2 revisions

patch added FppkgHelper.patch .
seems to fix the problem on windows , not tested elsewhere.

errno

2018-12-05 21:37

reporter  

FppkgHelper.patch (608 bytes)
Index: packager/fppkghelper.pas
===================================================================
--- packager/fppkghelper.pas	(r�vision 59730)
+++ packager/fppkghelper.pas	(copie de travail)
@@ -125,11 +125,17 @@
 end;
 
 function TFppkgHelper.GetPackageUnitPath(const PackageName: string): string;
+{$IFNDEF VER3_0}
 var
   FppkgPackage: TFPPackage;
+{$ENDIF VER3_0}
 begin
+{$IFNDEF VER3_0}
   FppkgPackage := FFPpkg.FindPackage(PackageName, pkgpkInstalled);
   Result := FppkgPackage.PackagesStructure.GetUnitDirectory(FppkgPackage);
+{$ELSE}
+  result:='';
+{$ENDIF VER3_0}
 end;
 
 finalization
FppkgHelper.patch (608 bytes)

Hans Luijten

2018-12-05 22:07

reporter   ~0112382

I can confirm that the patch worked with r59730 for Linux (GTK2 64bit), macOS X (Cocoa 64bit) and Windows (32bit).

John Landmesser

2018-12-05 22:20

reporter   ~0112384

strange, same revision on Linux, but:

/home/john1/lazarus/packager/fppkghelper.pas(28,31) Hint: (5024) Parameter "PackageName" not used
/home/john1/lazarus/packager/fppkghelper.pas(29,28) Hint: (5024) Parameter "AList" not used
/home/john1/lazarus/packager/fppkghelper.pas(131,19) Error: (5000) Identifier not found "FFPpkg"
/home/john1/lazarus/packager/fppkghelper.pas(131,51) Error: (5000) Identifier not found "pkgpkInstalled"
/home/john1/lazarus/packager/fppkghelper.pas(132,26) Error: (5038) identifier idents no member "PackagesStructure"
fppkghelper.pas(138) Fatal: (10026) There were 3 errors compiling module, stopping

i did a svn update from scratch!

Linux manjaro 4.19.6-1-MANJARO 0000001 SMP PREEMPT Sat Dec 1 12:21:26 UTC 2018 x86_64 GNU/Linux

XFCE Desktop.

John Landmesser

2018-12-05 22:34

reporter   ~0112385

there is no patch???

unit FppkgHelper;

{$mode objfpc}{$H+}

interface

uses
  Classes,
  SysUtils,
  {$IFNDEF VER3_0}
  pkgFppkg,
  {$ENDIF VER3_0}
  fprepos;

type

  { TFppkgHelper }

  TFppkgHelper = class
  private
    {$IFNDEF VER3_0}
    FFPpkg: TpkgFPpkg;
    {$ENDIF}
  public
    constructor Create;
    destructor Destroy; override;
    class function Instance: TFppkgHelper;
    function HasPackage(const PackageName: string): Boolean;
    procedure ListPackages(AList: TStringList);
    function GetPackageUnitPath(const PackageName: string): string;
  end;

implementation

var
  GFppkgHelper: TFppkgHelper = nil;

{ TFppkgHelper }

constructor TFppkgHelper.Create;
{$IFNDEF VER3_0}
var
  FPpkg: TpkgFPpkg;
begin
  FPpkg := TpkgFPpkg.Create(nil);
  try
    FPpkg.InitializeGlobalOptions('');
    FPpkg.InitializeCompilerOptions;

    FPpkg.CompilerOptions.CheckCompilerValues;
    FPpkg.FpmakeCompilerOptions.CheckCompilerValues;

    FPpkg.LoadLocalAvailableMirrors;

    FPpkg.ScanPackages;

    FFPpkg := FPpkg;
    FPpkg := nil;
  finally
    FPpkg.Free;
  end;
end;
{$ELSE}
begin

end;
{$ENDIF VER3_0}

destructor TFppkgHelper.Destroy;
begin
{$IFNDEF VER3_0}
  FFPpkg.Free;
{$ENDIF VER3_0}
  inherited Destroy;
end;

class function TFppkgHelper.Instance: TFppkgHelper;
begin
  if not Assigned(GFppkgHelper) then
    GFppkgHelper := TFppkgHelper.Create;
  Result := GFppkgHelper;
end;

function TFppkgHelper.HasPackage(const PackageName: string): Boolean;
begin
{$IFNDEF VER3_0}
  Result :=
    Assigned(FFPpkg.FindPackage(PackageName,pkgpkInstalled)) or
    Assigned(FFPpkg.FindPackage(PackageName,pkgpkAvailable)) or
    Assigned(FFPpkg.FindPackage(PackageName,pkgpkBoth));

  if not Result then
    begin
    // rescan and try again
    FFppkg.LoadLocalAvailableMirrors;
    FFppkg.ScanPackages;

    Result :=
      Assigned(FFPpkg.FindPackage(PackageName,pkgpkInstalled)) or
      Assigned(FFPpkg.FindPackage(PackageName,pkgpkAvailable)) or
      Assigned(FFPpkg.FindPackage(PackageName,pkgpkBoth));
    end;
{$ELSE }
  Result := True;
{$ENDIF VER3_0}
end;

procedure TFppkgHelper.ListPackages(AList: TStringList);
{$IFNDEF VER3_0}
var
  I, J: Integer;
  Repository: TFPRepository;
{$ENDIF VER3_0}
begin
{$IFNDEF VER3_0}
  for I := 0 to FFPpkg.RepositoryList.Count -1 do
    begin
    Repository := FFPpkg.RepositoryList.Items[I] as TFPRepository;
    for J := 0 to Repository.PackageCount -1 do
      begin
      AList.AddObject(Repository.Packages[J].Name, Repository.Packages[J]);
      end;
    end;
{$ENDIF VER3_0}
end;

function TFppkgHelper.GetPackageUnitPath(const PackageName: string): string;
var
  FppkgPackage: TFPPackage;
begin
  FppkgPackage := FFPpkg.FindPackage(PackageName, pkgpkInstalled);
  Result := FppkgPackage.PackagesStructure.GetUnitDirectory(FppkgPackage);
end;

finalization
  GFppkgHelper.Free;
end.

errno

2018-12-05 22:49

reporter   ~0112386

Last edited: 2018-12-05 22:51

View 2 revisions

@John Landmesser you should make a clean , before compiling the ide .
Check "clean all" in configure "Build lazarus" dialog .

>there is no patch???
please look at attached files.

Maxim Ganetsky

2018-12-05 23:38

developer   ~0112388

Fixed independently from @errno with identical changes. ;)

Issue History

Date Modified Username Field Change
2018-12-05 16:47 Hans Luijten New Issue
2018-12-05 17:07 John Landmesser Note Added: 0112369
2018-12-05 21:37 errno Note Added: 0112379
2018-12-05 21:37 errno File Added: FppkgHelper.patch
2018-12-05 21:38 errno Note Edited: 0112379 View Revisions
2018-12-05 22:07 Hans Luijten Note Added: 0112382
2018-12-05 22:20 John Landmesser Note Added: 0112384
2018-12-05 22:34 John Landmesser Note Added: 0112385
2018-12-05 22:49 errno Note Added: 0112386
2018-12-05 22:51 errno Note Edited: 0112386 View Revisions
2018-12-05 23:38 Maxim Ganetsky Fixed in Revision => 59731
2018-12-05 23:38 Maxim Ganetsky LazTarget => -
2018-12-05 23:38 Maxim Ganetsky Note Added: 0112388
2018-12-05 23:38 Maxim Ganetsky Status new => resolved
2018-12-05 23:38 Maxim Ganetsky Fixed in Version => 2.2
2018-12-05 23:38 Maxim Ganetsky Resolution open => fixed
2018-12-05 23:38 Maxim Ganetsky Assigned To => Maxim Ganetsky
2018-12-05 23:43 Hans Luijten Status resolved => closed
2018-12-06 00:34 Maxim Ganetsky Relationship added has duplicate 0034638