View Issue Details

IDProjectCategoryView StatusLast Update
0021376Lazarus-public2012-03-01 19:52
ReporterJohn ShandAssigned ToJesus Reyes 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.9.31 (SVN)Product Build 
Target VersionFixed in Version0.9.31 (SVN) 
Summary0021376: compiler error
Descriptiondbgrids.pas(1991,31) Error: Incompatible types: got "Pointer" expected "AnsiString"
dbgrids.pas(3828,54) Error: Incompatible type for arg no. 1: Got "Pointer", expected "AnsiString"
dbgrids.pas(3843,20) Error: Incompatible types: got "Pointer" expected "AnsiString"
dbgrids.pas(3895,28) Error: Incompatible type for arg no. 1: Got "AnsiString", expected "Pointer"
dbgrids.pas(3949) Fatal: There were 4 errors compiling module, stopping
Fatal: Compilation aborted
make[1]: *** [alllclunits.ppu] Error 1
make[1]: Leaving directory `/home/jshand/rpm/BUILD/lazarus-0.9.31/lazarus/lcl'
make: *** [lcl] Error 2
error: Bad exit status from /home/jshand/rpm/tmp/rpm-tmp.VS6Q8e (%build)


RPM build errors:
    Bad exit status from /home/jshand/rpm/tmp/rpm-tmp.VS6Q8e (%build)
TagsNo tags attached.
Fixed in Revision35643
LazTarget0.99.0
WidgetsetGTK 2
Attached Files
  • rpm-tmp.Hjykhh (1,278 bytes)
  • dbgrids.pas.patch (1,100 bytes)
    Index: lcl/dbgrids.pas
    ===================================================================
    --- lcl/dbgrids.pas	(revision 35631)
    +++ lcl/dbgrids.pas	(working copy)
    @@ -1988,7 +1988,7 @@
     
         if (ssShift in Shift) then begin
     
    -      CurBookmark := FDatalink.DataSet.Bookmark;
    +      CurBookmark := FDatalink.DataSet.BookmarkStr;
           if FKeyBookmark='' then
             FKeyBookmark:=CurBookmark;
     
    @@ -3825,7 +3825,7 @@
     function TBookmarkList.GetCurrentRowSelected: boolean;
     begin
       CheckActive;
    -  Result := IndexOf(FGrid.Datasource.Dataset.Bookmark)>=0;
    +  Result := IndexOf(FGrid.Datasource.Dataset.BookmarkStr)>=0;
     end;
     
     function TBookmarkList.GetItem(AIndex: Integer): TBookmarkStr;
    @@ -3840,7 +3840,7 @@
     begin
       CheckActive;
     
    -  aBookStr := FGrid.Datasource.Dataset.Bookmark;
    +  aBookStr := FGrid.Datasource.Dataset.BookmarkStr;
       if ABookStr='' then
         exit;
     
    @@ -3892,7 +3892,7 @@
     begin
       ds := FGrid.Datasource.Dataset;
       for i:=0 to FList.Count-1 do begin
    -    ds.Bookmark := Items[i];
    +    ds.BookmarkStr := Items[i];
         ds.Delete;
         FList.delete(i);
       end;
    
    dbgrids.pas.patch (1,100 bytes)

Relationships

has duplicate 0021375 closedZeljan Rikalo Lazarus compiler error in building lazarus latest build 
has duplicate 0021391 resolvedVincent Snijders Lazarus dbgrids.pas(1991,31) Error: Incompatible types: got "Pointer" expected "AnsiString" 
related to 0021399 closedJoost van der Sluis FPC Since SVN trunk revision 20424 Lazarus IDE can't be built due to changes in db.pas 
child of 0021598 resolvedLagunov Aleksey Lazarus CCR Unable to build RX with FPC < 2.7.1 

Activities

Zeljan Rikalo

2012-02-26 10:52

developer   ~0057092

Have you done make bigideclean before building ? I don't see any changes related to dbgrids or db which can make this ... also I don't use 2.4.4 anymore, so cant test ...

Miroslav Nyameshchuk

2012-02-26 12:27

reporter   ~0057096

Problem exist if use fpc-svn-version and lazarus-svn-version.

Zeljan Rikalo

2012-02-26 15:08

developer   ~0057102

Yes, it's problem with fpc 2.7.1, so have nothing to do with lazarus (or lazarus should support 2.7.1 stuff...)

John Shand

2012-02-26 21:37

reporter   ~0057110

all correct above. the error happens for me when i use the lazarus script file create_lazarus_rpm.sh in tools/install directory, but am not sure if that is where the error is or not. thanks for your help

John Shand

2012-02-26 21:57

reporter   ~0057111

miroslav, the same happens to me.

Miroslav Nyameshchuk

2012-02-27 08:46

reporter   ~0057118

I think the issue (problem) here:
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fcl-db/src/base/dataset.inc?r1=20239&r2=20424

Lagunov Aleksey

2012-02-27 17:32

reporter   ~0057123

This problem appeared after this that:
Revision: 20424, by marco, date: 25.02.2012 13:08
* dataset.Bookmark changed to TBookMark.

Why was the change in the type of dataset.Bookmark from TBookmarkStr to TBookmark?

Zeljan Rikalo

2012-02-27 19:14

developer   ~0057124

For Delphi 2006 compat afair (marco already mentioned that on mailing list).

2012-02-28 23:56

 

rpm-tmp.Hjykhh (1,278 bytes)

John Shand

2012-02-28 23:58

reporter   ~0057154

just uploaded a file. hope this helps. although i am getting the impression now that it may be a fpc compiler issue because when you use the script ./create_lazarus_rpm you still get the above error in description.

if you need to refer this to the fpc team for diagnosis

John Shand

2012-02-29 00:48

reporter   ~0057156

i tried make clean all on the directory where lazarus svn lives and got the same error

Paul Michell

2012-02-29 11:24

reporter   ~0057160

This is happening to me on Win32 as well.

geni

2012-02-29 23:31

reporter   ~0057173

0021391 (placed as solved but not solved).

This error is on windows and linux

Vincent Snijders

2012-02-29 23:41

manager   ~0057174

@geni, it was resolved as duplicate, meaning we only keep this (21376) issue open until the problem is solved.

Joachim Paepke

2012-03-01 10:18

reporter   ~0057176

Just run into the same problem with FPC 2.7.1 SVN 20450 and Lazarus 0.9.31 SVN 35628
Any suggestions for a temporary workaround as I dont need dbgrids so I can build a usable IDE?

Vincent Snijders

2012-03-01 11:18

manager   ~0057177

Use fpc 2.7.1 from before r20424.

Cyrax

2012-03-01 14:10

reporter   ~0057188

See bug report http://bugs.freepascal.org/view.php?id=21399 for patch to FPC side
and attached patch (dbgrids.pas.patch) for Lazarus.

2012-03-01 14:10

 

dbgrids.pas.patch (1,100 bytes)
Index: lcl/dbgrids.pas
===================================================================
--- lcl/dbgrids.pas	(revision 35631)
+++ lcl/dbgrids.pas	(working copy)
@@ -1988,7 +1988,7 @@
 
     if (ssShift in Shift) then begin
 
-      CurBookmark := FDatalink.DataSet.Bookmark;
+      CurBookmark := FDatalink.DataSet.BookmarkStr;
       if FKeyBookmark='' then
         FKeyBookmark:=CurBookmark;
 
@@ -3825,7 +3825,7 @@
 function TBookmarkList.GetCurrentRowSelected: boolean;
 begin
   CheckActive;
-  Result := IndexOf(FGrid.Datasource.Dataset.Bookmark)>=0;
+  Result := IndexOf(FGrid.Datasource.Dataset.BookmarkStr)>=0;
 end;
 
 function TBookmarkList.GetItem(AIndex: Integer): TBookmarkStr;
@@ -3840,7 +3840,7 @@
 begin
   CheckActive;
 
-  aBookStr := FGrid.Datasource.Dataset.Bookmark;
+  aBookStr := FGrid.Datasource.Dataset.BookmarkStr;
   if ABookStr='' then
     exit;
 
@@ -3892,7 +3892,7 @@
 begin
   ds := FGrid.Datasource.Dataset;
   for i:=0 to FList.Count-1 do begin
-    ds.Bookmark := Items[i];
+    ds.BookmarkStr := Items[i];
     ds.Delete;
     FList.delete(i);
   end;
dbgrids.pas.patch (1,100 bytes)

Issue History

Date Modified Username Field Change
2012-02-26 01:31 John Shand New Issue
2012-02-26 01:31 John Shand Widgetset => GTK 2
2012-02-26 10:52 Zeljan Rikalo LazTarget => -
2012-02-26 10:52 Zeljan Rikalo Note Added: 0057092
2012-02-26 10:52 Zeljan Rikalo Status new => feedback
2012-02-26 10:54 Zeljan Rikalo Relationship added has duplicate 0021375
2012-02-26 12:27 Miroslav Nyameshchuk Note Added: 0057096
2012-02-26 15:08 Zeljan Rikalo Note Added: 0057102
2012-02-26 21:37 John Shand Note Added: 0057110
2012-02-26 21:57 John Shand Note Added: 0057111
2012-02-27 08:46 Miroslav Nyameshchuk Note Added: 0057118
2012-02-27 17:32 Lagunov Aleksey Note Added: 0057123
2012-02-27 19:14 Zeljan Rikalo Note Added: 0057124
2012-02-28 22:24 Vincent Snijders Relationship added has duplicate 0021391
2012-02-28 23:56 John Shand File Added: rpm-tmp.Hjykhh
2012-02-28 23:58 John Shand Note Added: 0057154
2012-02-29 00:48 John Shand Note Added: 0057156
2012-02-29 11:24 Paul Michell Note Added: 0057160
2012-02-29 23:31 geni Note Added: 0057173
2012-02-29 23:41 Vincent Snijders Note Added: 0057174
2012-03-01 10:18 Joachim Paepke Note Added: 0057176
2012-03-01 11:18 Vincent Snijders Note Added: 0057177
2012-03-01 14:10 Cyrax Note Added: 0057188
2012-03-01 14:10 Cyrax File Added: dbgrids.pas.patch
2012-03-01 14:13 Vincent Snijders Relationship added related to 0021399
2012-03-01 19:49 Jesus Reyes Status feedback => assigned
2012-03-01 19:49 Jesus Reyes Assigned To => Jesus Reyes
2012-03-01 19:52 Jesus Reyes Fixed in Revision => 35643
2012-03-01 19:52 Jesus Reyes LazTarget - => 0.99.0
2012-03-01 19:52 Jesus Reyes Status assigned => resolved
2012-03-01 19:52 Jesus Reyes Fixed in Version => 0.9.31 (SVN)
2012-03-01 19:52 Jesus Reyes Resolution open => fixed
2012-03-29 22:03 Vincent Snijders Relationship added child of 0021598