[fpc-pascal] Re: Yet more make file problems: make works, make install fails
On 6-10-2012 6:52, Reinier Olislagers wrote: > Still fighting makefiles with my db fpcunit listener. > > I can get it to compile with fpc make all > However make install fails with > > Installation package fcl-extra for target x86_64-linux succeeded > Start compiling package fcl-fpcunit for target x86_64-linux. >Compiling fcl-fpcunit/BuildUnit_fcl_fpcunit.pp > Compiled package fcl-fpcunit > Installing package fcl-fpcunit > The installer encountered the following error: > Unable to open file "units/x86_64-linux/fpcunit.o" > > Patch including instructions at > https://bitbucket.org/reiniero/fpc_laz_patch_playground/downloads/dblistener.zip > > What am I doing wrong? Just to clarify: 1. I'd rather learn what I'm doing wrong and fixing it rather than dump my dblistener patch in the bugtracker for somebody else to fix 2. Given my notoriously bad memory & benefit to others, I'd be happy to update the fpmake wiki page if possible Thanks, Reinier ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Yet more make file problems: make works, make install fails
On Sat, 6 Oct 2012, Reinier Olislagers wrote: On 6-10-2012 6:52, Reinier Olislagers wrote: Still fighting makefiles with my db fpcunit listener. I can get it to compile with fpc make all However make install fails with Installation package fcl-extra for target x86_64-linux succeeded Start compiling package fcl-fpcunit for target x86_64-linux. Compiling fcl-fpcunit/BuildUnit_fcl_fpcunit.pp Compiled package fcl-fpcunit Installing package fcl-fpcunit The installer encountered the following error: Unable to open file "units/x86_64-linux/fpcunit.o" Patch including instructions at https://bitbucket.org/reiniero/fpc_laz_patch_playground/downloads/dblistener.zip What am I doing wrong? The change you did in fpmake.pp looks correct. Do not change the Makefile. Just change fpmake.pp, though. That should be enough. But about the rest, there is lots to say :/ For starters, you are creating a dependency on fcl-db in fcl-fpcunit. That's not correct, since there is an (implicit) dependency in fcl-db on fcl-fpcunit for testing, so you create a circular dependency. The listener should reside in fcl-db, preferrably in a directory src/sqldb/fpcunit. This will make the dependency of fcl-db on fcl-fpcunit an explicit one. Regarding the dbreporter unit itself: I think the explicit dependency on IBConnection is misplaced. What is more, it will ONLY work on IB, the way you wrote it. Neither mysql or postgres or ms-sql or oracle will eat any of the statements that you use. I would suggest only letting it be dependent on sqldb. It's the duty of the user to provide a connection class preferably by creating a descendent. You can provide descendents for the various TSQLConnection classes in different units, and let the user use the unit which uses the connection of his choice. (the descendents can also provide 'correct' SQL statements for that particular connection) Concerning the routine: procedure TDBResultsWriter.SetupCPU_OS; begin //CPU/OS detectionM FCPU:='unknown';M {$IFDEF CPUI386}M FCPU:='i386';M {$ENDIF}M {$IFDEF CPUM68K}M // etc. end; It's far more compact to write this: procedure TDBResultsWriter.SetupCPU_OS; begin FCPU:={$I %FPCTARGETCPU%}; FOS:={$I %FPCTARGETOS%}; end; It has the benefit of remaining correct when new CPU/OS combinations are added. I have a lot more remarks, which I will not write here in public. From your zip, it looks like you wanted to submit the unit for inclusion in FPC ? I'm sorry to say that, as it is, this unit will not make it in FPC. It needs a major redesign from the ground up. I'm prepared to discuss it in private, if you're interested. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Yet more make file problems: make works, make install fails
On 6-10-2012 14:34, Michael Van Canneyt wrote: > On Sat, 6 Oct 2012, Reinier Olislagers wrote: >> On 6-10-2012 6:52, Reinier Olislagers wrote: >>> Still fighting makefiles with my db fpcunit listener. >>> >>> I can get it to compile with fpc make all >>> However make install fails with >>> Patch including instructions at >>> https://bitbucket.org/reiniero/fpc_laz_patch_playground/downloads/dblistener.zip >>> >>> >>> What am I doing wrong? > > The change you did in fpmake.pp looks correct. > Do not change the Makefile. Just change fpmake.pp, though. That should > be enough. Ok. > > But about the rest, there is lots to say :/ No problem. > > For starters, you are creating a dependency on fcl-db in fcl-fpcunit. > That's not correct, since there is an (implicit) dependency in fcl-db on > fcl-fpcunit for testing, so you create a circular dependency. > > The listener should reside in fcl-db, preferrably in a directory > src/sqldb/fpcunit. > This will make the dependency of fcl-db on fcl-fpcunit an explicit one. Ok. > > Regarding the dbreporter unit itself: > > I think the explicit dependency on IBConnection is misplaced. What is > more, it will ONLY work on IB, the way you wrote it. Neither mysql or > postgres or ms-sql or oracle will eat any of the statements that you use. Completely correct. It is meant for automatically creating an embedded database. It does not mess with client/server database servers as the DBA is supposed to set up the database there. I don't mind having it ifdefed out but see no reason why this extra functionality for use with embedded dbs should be disabled? > I would suggest only letting it be dependent on sqldb. It's the duty of > the user to provide a connection > class preferably by creating a descendent. You can provide descendents > for the various TSQLConnection classes in different units, and let the > user use the unit which uses the connection of his choice. > (the descendents can also provide 'correct' SQL statements for that > particular connection) As indicated in the code, it currently works with all sqldb connection components, using an ini file to specify connection string much like the db test framework. The SQL that is used is kept basic on purpose to maintain compatibility. If people want to extend that, patches welcome. > Concerning the routine: > It's far more compact to write this: > > procedure TDBResultsWriter.SetupCPU_OS; > begin > FCPU:={$I %FPCTARGETCPU%}; > FOS:={$I %FPCTARGETOS%}; > end; > > It has the benefit of remaining correct when new CPU/OS combinations are > added. Ah, nice one, thanks :) > I have a lot more remarks, which I will not write here in public. > >> From your zip, it looks like you wanted to submit the unit for >> inclusion in FPC ? > I'm sorry to say that, as it is, this unit will not make it in FPC. It > needs a major redesign from the ground up. I'm prepared to discuss it in > private, if you're interested. Certainly, thanks. Thanks for having a look. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] bunxh.inc(24, 52) Fatal: Syntax error, ":" expected but "identifier NSET" found
I'm trying to build current 2.6.1 on Ubuntu Precise with build-dependency fpc-2.4.4 (because there exist no later version of fpc in precise) and gettting this error: bunxh.inc(24,52) Fatal: Syntax error, ":" expected but "identifier NSET" found the offending line in rtl/unix/bunxh.inc is: Function FpSigProcMask (how : cInt; constref nset : TSigSet; var oset : TSigSet): cInt; external name 'FPC_SYSC_SIGPROCMASK'; Does this mean I cannot bootstrap 2.6.1 with 2.4.4? Unfortunately I cannot make the build process depend on anything other than what exists already in this series of Ubuntu and I also cannot just download another bootstrap compiler on the fly because on the build servers there is no access to the internet, only official ubuntu repositories and PPA. Does anybody know of a Launchpad PPA that contains 2.6.0 for Ubuntu 12.04 already? I was hoping I would not have to make a 2.6.0 package first myself only to be able to build 2.6.1 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] bunxh.inc(24, 52) Fatal: Syntax error, ":" expected but "identifier NSET" found
On 06 Oct 2012, at 19:43, Bernd wrote: > Does this mean I cannot bootstrap 2.6.1 with 2.4.4? As has been mentioned a "few" times before, building FPC development versions has always been only supported when starting with the latest release. So: yes. Jonas___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] bunxh.inc(24, 52) Fatal: Syntax error, ":" expected but "identifier NSET" found
2012/10/6 Jonas Maebe : > As has been mentioned a "few" times before, building FPC development versions > has always been only supported when starting with the latest release. So: yes. I have never tried to build it on Launchpad servers before so I never ran into this problem before and also google returns zero results for the above error message. Shouldn't this requirement be relaxed a bit so that it applies to last stable branch instead of last minor release from the same branch? Isn't a minor version supposed to contain only fixes and not new features? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] bunxh.inc(24, 52) Fatal: Syntax error, ":" expected but "identifier NSET" found
Am 06.10.2012 20:14, schrieb Bernd: > 2012/10/6 Jonas Maebe : > >> As has been mentioned a "few" times before, building FPC development >> versions has always been only supported when starting with the latest >> release. So: yes. > > I have never tried to build it on Launchpad servers before so I never > ran into this problem before and also google returns zero results for > the above error message. > > Shouldn't this requirement be relaxed a bit so that it applies to last > stable branch instead of last minor release from the same branch? Well, if somebody does testing and provides the necessary fixes, it can be done. I will not waste time with it because I personally consider it as a problem of the linux package system and not FPC's problem. > Isn't a minor version supposed to contain only fixes and not new > features? Even this might change the source code in a way which breaks with older versions. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] bunxh.inc(24, 52) Fatal: Syntax error, ":" expected but "identifier NSET" found
On 06 Oct 2012, at 20:14, Bernd wrote: > 2012/10/6 Jonas Maebe : > >> As has been mentioned a "few" times before, building FPC development >> versions has always been only supported when starting with the latest >> release. So: yes. > > I have never tried to build it on Launchpad servers before so I never > ran into this problem before and also google returns zero results for > the above error message. Here google points to an FPC bug report as the first hit for that error message: http://www.google.be/search?q=%22Syntax+error,+%22:%22+expected+but+%22identifier+NSET%22+found%22 > Shouldn't this requirement be relaxed a bit so that it applies to last > stable branch instead of last minor release from the same branch? No. The reason is that it is simply impossible to test the functional correctness of the compiler with every possible svn revision from a particular branch before committing. This in turn means that supporting such scenarios would require a much larger investment of extra effort than the gain would justify ("Which svn revision did you use exactly as starting compiler? Oh, let me test. Ah yes, that one contained a bug that was fixed 3 revisions later. Let me add a workaround for this problem so that the current compiler can be bootstrapped using that particular revision"). > Isn't a minor version supposed to contain only fixes and not new > features? The error you get is not related to a new feature added in a fixes branch. It's caused by a source code cleanup, namely the removal a workaround to ensure that the code compiled with FPC 2.4.x/ Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] bunxh.inc(24, 52) Fatal: Syntax error, ":" expected but "identifier NSET" found
2012/10/6 Florian Klämpfl : > Well, if somebody does testing and provides the necessary fixes, it can > be done. I will not waste time with it because I personally consider it > as a problem of the linux package system and not FPC's problem. It can be solved in Ubuntu, its just a bit more tricky. Now I will have to build and package 2.6.0 debs for Ubuntu 12.04 in Launchpad first before I can attempt to to build 2.6.x for 12.04. I was just hoping it would just work from 2.4.4 to 2.6.1 out of the box so I could have my automatic nightly 2.6.1 debs up and running tonight and can then concentrate on packaging Lazarus 1.0.x. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] bunxh.inc(24, 52) Fatal: Syntax error, ":" expected but "identifier NSET" found
In our previous episode, Bernd said: > > be done. I will not waste time with it because I personally consider it > > as a problem of the linux package system and not FPC's problem. > > It can be solved in Ubuntu, its just a bit more tricky. Now I will > have to build and package 2.6.0 debs for Ubuntu 12.04 in Launchpad > first before I can attempt to to build 2.6.x for 12.04. which should have been done 9 months ago, like the other distributions. 2.6.0 is from January 1st. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] bunxh.inc(24, 52) Fatal: Syntax error, ":" expected but "identifier NSET" found
2012/10/6 Marco van de Voort : > which should have been done 9 months ago, like the other distributions. > > 2.6.0 is from January 1st. I'm neither Debian nor Ubuntu official, I'm just an ordinary user who wants to publish software via launchpad and for this to work everything needs to be able to build from source on *their* servers and all I am allowed to use for it is what is already available either in their official repository or in a PPA. I'm currently uploading a source package which I have quickly put together for fpc-2.6.0 to launchpad, hoping it will successfully build tonight. If this works (and my package can be installed properly) then I can make other packages on launchpad build-depend on this PPA. My goal is to have fpc 2.6.x branch (building nightly every time upstream branch changes) and also Lazarus 1.0.x nightly for precise and quantal, 32 and 64 bit. Only then it will be possible to use launchpad for my own software (all others can use it too of course). Thats why I'm doing it now myself because I need it and nobody else has done it yet. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] bunxh.inc(24, 52) Fatal: Syntax error, ":" expected but "identifier NSET" found
2012/10/7 Bernd : > I'm currently uploading a source package which I have quickly put > together for fpc-2.6.0 to launchpad, hoping it will successfully build > tonight This is the ppa (should contain fpc and fpc-source for ubuntu 12.04 once the build has completed): https://launchpad.net/~prof7bit/+archive/fpc-2.6.0 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal