Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-09

package FCL

8 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Antonio Fortuny

Hi Folks.

I want to make some changes and additions to the unit bufdataset.pas incresing dataset possibilities.
I've made the changes, compiled and tested using a dynamically created component.
So far, so good.
Now I want to incorporate the changes in the FCL package fcl-db Vista32, Lazarus 1.0.10, FPC 2.6.2
Compile FPC fcl-db package, and compilation runs OK and my new unit gets compiled (see below for console output)
BUT
new .o and .ppu are not moved to
"D:\Programmes\lazarus\fpc\2.6.2\units\i386-win32\fcl-db\" but are kept in
D:\Programmes\lazarus\fpc\2.6.2\source\packages\fcl-db\units\i386-win32\ as compilation result
Secondly, I guess that the Lazarus pacakge FCL should be compiled as well. The unit RegisterFCL does the TBufDataSet component registration This one also looks good.
Then I install the FCL package and rebuild Lazarus. During Lazarus compilation all packages depending on FCL are compiled as well But then I get the classical Lazarus errors:
Recompiling sqldb, checksum changed for BufDataset registersqldb.pas(50,38) Fatal: Can not find sqldb used by registersqldb, ppu=..\..\fpc\2.6.2\units\i386-win32\fcl-db\sqldb.ppu, package SQLDBLaz
Of course there must be more than opne copy of bufdataset.o(& ppu). Which one to keep and which to delete ?
I probably miss something but I can't point out what. Maybe some file moves to do by hand ?

Thanks for your ideaas.

Antonio.

Console output FCL compilation
D:\>*cd D:\Programmes\lazarus\fpc\2.6.2\source\packages\fcl-db\src\base* D:\Programmes\lazarus\fpc\2.6.2\source\packages\fcl-db\src\base> *D:\Programmes\lazarus\fpc\2.6.2\bin\i386-win32\make.exe all INSTALL TARGET=i386-win32*
D:/Programmes/lazarus/fpc/2.6.2/bin/i386-win32/ppc386.exe -S2h -Fu../dbase -Fu../../../../rtl -Fu../../../../packages/fcl-base -Fu../../../../packages/fcl-xml -FE.
-FU../../../../packages/fcl-db/units/i386-win32 -di386 bufdataset.pas Free Pascal Compiler version 2.6.2 [2013/06/09] for i386 Copyright (c) 1993-2012 by Florian Klaempfl and others Target OS: Win32 for i386
*Compiling bufdataset.pas*
bufdataset.pas(50,14) Note: Virtual method "TBufBlobStream.Read(var <Formal type>,LongInt):LongInt;" has a lower visibility (protected) than parent class TStream (public)
bufdataset.pas(51,14) Note: Virtual method "TBufBlobStream.Write(const <Formal type>,LongInt):LongInt;" has a lower visibility (protected) t han parent class TStream (public)
bufdataset.pas(52,14) Note: Virtual method
"TBufBlobStream.Seek(LongInt,Word):LongInt;" has a lower visibility (protected) than parent class
TStream (public)
bufdataset.pas(2223,5) Note: Local variable "StoreReadOnly" is assigned but never used
bufdataset.pas(3747,34) Warning: Function result does not seem to be set 3887 lines compiled, 0.2 sec
1 warning(s) issued
4 note(s) issued
D:/Programmes/lazarus/fpc/2.6.2/bin/i386-win32/fpcmake.exe -p -Ti386-win32 Makefile.fpc
Processing Makefile.fpc
Writing Package.fpc
D:/Programmes/lazarus/fpc/2.6.2/bin/i386-win32/ginstall.exe -m 755 -d /pp/units/i386-win32/fcl-db
D:/Programmes/lazarus/fpc/2.6.2/bin/i386-win32/cp.exe -fp Package.fpc /pp/units/i386-win32/fcl-db
D:/Programmes/lazarus/fpc/2.6.2/bin/i386-win32/ginstall.exe -m 755 -d /pp/units/i386-win32/fcl-db
D:/Programmes/lazarus/fpc/2.6.2/bin/i386-win32/cp.exe -fp ../../../../packages/fcl-db/units/i386-win32/dbconst.ppu ../../../../packages/fcl-
db/units/i386-win32/db.ppu
../../../../packages/fcl-db/units/i386-win32/dbwhtml.ppu ../../../../packages/fcl-db/units/i386-win32/bufdataset_ parser.ppu ../../../../packages/fcl-db/units/i386-win32/bufdataset.ppu ../../../../packages/fcl-db/units/i386-win32/dbcoll.ppu ../../../../p ackages/fcl-db/units/i386-win32/sqlscript.ppu
../../../../packages/fcl-db/units/i386-win32/xmldatapacketreader.ppu /pp/units/i386-win32/fcl-
db
D:/Programmes/lazarus/fpc/2.6.2/bin/i386-win32/cp.exe -fp ../../../../packages/fcl-db/units/i386-win32/dbconst.o ../../../../packages/fcl-db
/units/i386-win32/db.o
../../../../packages/fcl-db/units/i386-win32/dbwhtml.o ../../../../packages/fcl-db/units/i386-win32/bufdataset_parser .o ../../../../packages/fcl-db/units/i386-win32/bufdataset.o ../../../../packages/fcl-db/units/i386-win32/dbcoll.o ../../../../packages/fcl-
db/units/i386-win32/sqlscript.o
../../../../packages/fcl-db/units/i386-win32/xmldatapacketreader.o /pp/units/i386-win32/fcl-db

D:\Programmes\lazarus\fpc\2.6.2\source\packages\fcl-db\src\base>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130905/43f183f3/attachment.html>

Reply by email

Mattias Gaertner
to Antonio Fortuny

?

Show quoted text 19 lines
Antonio Fortuny hat am 5. September 2013 um 13:58 geschrieben: ? Hi Folks. ? I want to make some changes and additions to the unit? bufdataset.pas incresing dataset possibilities. ? I've made the changes, compiled and tested using a dynamically created component. ? So far, so good. ? Now I want to incorporate the changes in the FCL package fcl-db ? Vista32, Lazarus 1.0.10, FPC 2.6.2 ? Compile FPC fcl-db package, and compilation runs OK and my new unit gets compiled (see below for console output) ? BUT ? new .o and .ppu are not moved to "D:\Programmes\lazarus\fpc\2.6.2\units\i386-win32\fcl-db\"? but are kept in D:\Programmes\lazarus\fpc\2.6.2\source\packages\fcl-db\units\i386-win32\ as compilation result

The usual work flow is like this:
You alter fpc units and tests them with some test program (ppu files in source\packages\fcl-db\units\...).
When you are done, you build all fpc packages that depend on these ppus and copy all new files to the install folders (fpc\2.6.2\units\...). The safest way is too simply rebuild the whole fpc and call make install. Please read the documentation about building and installing fpc.

Mattias

Reply by email

Antonio Fortuny
to Mattias Gaertner
The usual work flow is like this: You alter fpc units and tests them with some test program (ppu files in source\packages\fcl-db\units\...).

OK

When you are done, you build all fpc packages that depend on these ppus and copy all new files to the install folders (fpc\2.6.2\units\...).

Done with units from bufdataset.pas. All the fpc-db has been recompiled and units copied
But still doesn't work with Lazarus. Dropping the TBufDataSet onto a Form the new method I added is not seen.
My problem seems to be able to re-install the component.

When changing a little bit an FPC unit not involved in any Lazarus package, the former trick runs OK and looks pretty good. This time inside the Lazarus IDE the changes I've made to the original unit are not seen.

Show quoted text 10 lines
The safest way is too simply rebuild the whole fpc and call make install. Please read the documentation about building and installing fpc. Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Reinier Olislagers
to Mattias Gaertner: ? The usual work flow is like this: You alter fpc units and tests them with some test…
Mattias Gaertner wrote 20 lines
> Antonio Fortuny hat am 5. September 2013 um 13:58 > geschrieben: > I want to make some changes and additions to the unit bufdataset.pas > incresing dataset possibilities. > I've made the changes, compiled and tested using a dynamically created > component. > So far, so good. > Now I want to incorporate the changes in the FCL package fcl-db > Vista32, Lazarus 1.0.10, FPC 2.6.2 > Compile FPC fcl-db package, and compilation runs OK and my new unit gets > compiled (see below for console output) > BUT > new .o and .ppu are not moved to > "D:\Programmes\lazarus\fpc\2.6.2\units\i386-win32\fcl-db\" but are kept in > D:\Programmes\lazarus\fpc\2.6.2\source\packages\fcl-db\units\i386-win32\ as > compilation result The usual work flow is like this: You alter fpc units and tests them with some test program (ppu files in source\packages\fcl-db\units\...).

You can use the FPC database test suite for that (e.g. dbtestframework_gui), see e.g.
http://wiki.lazarus.freepascal.org/Databases#Running_FPC_database_tests

You can add new unit tests to e.g. testspecifictbufdataset.pas

When you are done, you build all fpc packages that depend on these ppus and copy all new files to the install folders (fpc\2.6.2\units\...). The safest way is too simply rebuild the whole fpc and call make install. Please read the documentation about building and installing fpc.

Additionally, if you want to have your additions to bufdataset incorporated into FPC, please submit a patch against fpc trunk (in other words, please be prepared to copy over your changes to FPC trunk)

Looking forward to your updates!

Reply by email

Antonio Fortuny
to Reinier Olislagers
Show quoted text 15 lines
You can use the FPC database test suite for that (e.g. dbtestframework_gui), see e.g. http://wiki.lazarus.freepascal.org/Databases#Running_FPC_database_tests You can add new unit tests to e.g. testspecifictbufdataset.pas > When you are done, you build all fpc packages that depend on these ppus and copy > all new files to the install folders (fpc\2.6.2\units\...). > The safest way is too simply rebuild the whole fpc and call make install. > Please read the documentation about building and installing fpc. Additionally, if you want to have your additions to bufdataset incorporated into FPC, please submit a patch against fpc trunk (in other words, please be prepared to copy over your changes to FPC trunk) Looking forward to your updates!

Hi Reinier.
It's still a little bit too early to acomplish this step. But anyway I'll be glad to do it when I'm satisfied with the additions, including unit tests and some help text. I'll probably need some help form you guys, as I'm not yet used to prepare and make additions neither to FPC nor Lazarus.
For the time being I want to change the Lazarus IDE component TBufDataSet. The FPC part looks OK as I can use it only using the unit itself
Remains the Lazarus part for which I need obviously some help. BTW, I discovered that the Lazarus package FCL (which registers the TBufDataSet component) is located in $LAZARUS\packager\registration. Looks funny.

Antonio.

Show quoted text 6 lines
-- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Sita Software *Antonio Fortuny* Senior Software engineer 220, avenue de la Libert? L-4602 Niederkorn Tel.: +352 58 00 93 - 93 www.sitasoftware.lu <http://www.sitasoftware.lu> Your IT Partner -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130905/182d3fdf/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: bbcjdjci.jpg Type: image/jpeg Size: 2306 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130905/182d3fdf/attachment-0002.jpg> -------------- next part -------------- A non-text attachment was scrubbed... Name: aeefdbcc.jpg Type: image/jpeg Size: 921 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130905/182d3fdf/attachment-0003.jpg>

Reply by email

Reinier Olislagers
to Antonio Fortuny
Antonio Fortuny wrote 9 lines
> You can use the FPC database test suite for that (e.g. > dbtestframework_gui), see e.g. > http://wiki.lazarus.freepascal.org/Databases#Running_FPC_database_tests > > You can add new unit tests to e.g. testspecifictbufdataset.pas It's still a little bit too early to acomplish this step. But anyway I'll be glad to do it when I'm satisfied with the additions, including unit tests and some help text.

OK - just to clarify if needed: the tests mentioned above are unit tests for the FPC db units, including bufdataset, so any unit tests you'd like to add could be added there ;)
Of course, unit tests for Lazarus components are a different story...

Good luck with the Lazarus part!

Reply by email

Antonio Fortuny
to Reinier Olislagers

Le 05/09/2013 15:50, Reinier Olislagers a ?crit :

Show quoted text 6 lines
> It's still a little bit too early to acomplish this step. But anyway > I'll be glad to do it when I'm satisfied with the additions, including > unit tests and some help text. OK - just to clarify if needed: the tests mentioned above are unit tests for the FPC db units, including bufdataset, so any unit tests you'd like to add could be added there ;)

I'm used since a long time now to build DUnit projects for almost everything I write. So don't worry

Of course, unit tests for Lazarus components are a different story... Good luck with the Lazarus part!

Thanks. I'll let you know as soon as I'm ready. This will take some weeks. So, be patient ;-)

Show quoted text 6 lines
-- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Sita Software *Antonio Fortuny* Senior Software engineer 220, avenue de la Libert? L-4602 Niederkorn Tel.: +352 58 00 93 - 93 www.sitasoftware.lu <http://www.sitasoftware.lu> Your IT Partner -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130905/a43470b8/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: gcdgfjge.jpg Type: image/jpeg Size: 2306 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130905/a43470b8/attachment.jpg> -------------- next part -------------- A non-text attachment was scrubbed... Name: hfbdffaj.jpg Type: image/jpeg Size: 921 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130905/a43470b8/attachment-0001.jpg>

Reply by email

Sven Barth
to Antonio Fortuny: OK Done with units from bufdataset.pas. All the fpc-db has been recompiled and units…
Antonio Fortuny wrote 18 lines
> The usual work flow is like this: > You alter fpc units and tests them with some test program (ppu files in > source\packages\fcl-db\units\...). OK > When you are done, you build all fpc packages that depend on these > ppus and copy > all new files to the install folders (fpc\2.6.2\units\...). Done with units from bufdataset.pas. All the fpc-db has been recompiled and units copied But still doesn't work with Lazarus. Dropping the TBufDataSet onto a Form the new method I added is not seen. My problem seems to be able to re-install the component. When changing a little bit an FPC unit not involved in any Lazarus package, the former trick runs OK and looks pretty good. This time inside the Lazarus IDE the changes I've made to the original unit are not seen.

The important part is that you need to recompile all FPC packages that depend on TBufDataSet (for example SqlDb).

> The safest way is too simply rebuild the whole fpc and call make install. > Please read the documentation about building and installing fpc.

I'd recommend you to choose this way. Otherwise you might forget a unit that you currently don't use and some months later you wonder why just this one unit doesn't work...

Regards,
Sven

Reply by email