[Solved] Problem extending FPC lazarus / 64-FPC development ---------------------------------------------------------------------- Mike.Cornflake · 2014-06-28 09:43 I'm trying my hand at extending fpc trunk.  Simple changes (final code will be slightly different, I'm aware that at the moment the user can pass undesired options to TProcess) process.pp Code: [Select]//old function RunCommand(const exename:string;const commands:array of string;var outputstring:string):boolean; function RunCommand(const cmdline:string;var outputstring:string):boolean; deprecated; //new function RunCommand(const exename:string;const commands:array of string;var outputstring:string;const AExtraProcessOptions:TProcessOptions=[]):boolean; function RunCommand(const cmdline:string;var outputstring:string;const AExtraProcessOptions:TProcessOptions=[]):boolean; deprecated; My development environment is Lazarus Trunk. I rebuild fpc with make clean all, and I've good confidence that's working.  If I introduce syntax errors into my process.pp, then this rebuild bombs out at the expected place. I then rebuild lazarus with clean all as well.  And finally try to rebuild my test app with "clean up build files" No matter what I try, I always end up with... QuoteFormMain.pas(161,7) Error: Wrong number of parameters specified for call to "RunCommand" Error: Found declaration: RunCommand(const AnsiString;const {Open} Array Of AnsiString;var AnsiString):Boolean; Error: Found declaration: RunCommand(const AnsiString;var AnsiString):Boolean; Line 167 is Code: [Select]      RunCommand(MplayerControl1.MPlayerPath, arrCommands, sOutput, [poNoConsole]); ctrl-clicking on RunCommand in my form takes me to the modified process.pp, and as I said, I've clean rebuilt everything I can think of. All paths defined in Lazarus - Tools - Options are pointing to the trunk fpc that I'm modifiying. What step am I missing, or where I can look to find to another path that might be incorrect? ---------------------------------------------------------------------- BigChimp · 2014-06-28 09:45 Wild guess (haven't read closely) Tools/Rescan FPC source directory in Lazarus after rebuild ---------------------------------------------------------------------- Mike.Cornflake · 2014-06-28 09:47 Many thanks for the ultra quick reply, but no go I'm afraid... UPDATE:  Hmmm.  If I introduce syntax errors into process.pp, then the Lazarus rebuild doesn't fail, it just continues right on :-( ---------------------------------------------------------------------- BigChimp · 2014-06-28 09:52 Mmm, a bit Quote from: Mike.Cornflake on June 28, 2014, 11:43:10 amI rebuild fpc with make clean all, and I've good confidence that's working.  If I introduce syntax errors into my process.pp, then this rebuild bombs out at the expected place. I then rebuild lazarus with clean all as well.  And finally try to rebuild my test app with "clean up build files" Ah... building fpc with make clean all will rebuild FPC but not copy the compiled units into the (fpcdir)\units directory. I'd suggest doing make clean all install or if that doesn't work make clean all followed by make install. Then rebuild Lazarus. ---------------------------------------------------------------------- BigChimp · 2014-06-28 09:54 Or, of course fpcup using settings like this: Code: [Select][buildonly] ; no checkout/update binutilsdir=c:\development\fpcbootstrap fpcbootstrapdir=c:\development\fpcbootstrap fpcdir=c:\development\fpctrunk fpcurl=http://svn.freepascal.org/svn/fpc/trunk lazdir=c:\development\lazarus primary-config-path=c:\development\lazarussettings ;fpcopt="" fpcopt="-gw2 -gl -O-1" ;fpcrevision=27774 fpcuplinkname="" lazlinkname=Laz32FPCTrunk lazopt="-gw2 -gl -O-1" noconfirm=true keeplocalchanges=true synapsetrunk=1 only=FPCBuildOnly,LazarusBuildOnly,useride skip=FPCCleanOnly,FPCGetOnly,LazarusCleanOnly,LazarusGetOnly,crosswin3 2-64 Basically copy over your existing settings and add the only= and skip= lines to just rebuild FPC and Lazarus Then run fpcup --inifile=whateveryou'reusing.ini --inisection=buildonly ... or use fpcupgui to select the ini section you want. ---------------------------------------------------------------------- Mike.Cornflake · 2014-06-28 10:09 Nice one    I suspect make clean all install will be the bit I was missing.  Many thanks  I also thought fpcup, and am currently in the middle of running this with the -keeplocalchanges parameter.  I was hoping to avoid this as fpcup takes a while to run (around 5 to 10 minutes), and didn't want to have to do incrememtal development (it's how I work) with a long build process in the middle each time.   Once fpcup has finished it's current run I'll give make clean all install a go :-) ---------------------------------------------------------------------- BigChimp · 2014-06-28 10:12 Quote from: Mike.Cornflake on June 28, 2014, 12:09:32 pmI also thought fpcup, and am currently in the middle of running this with the -keeplocalchanges parameter.  I was hoping to avoid this as fpcup takes a while to run (around 5 to 10 minutes) Sure, that's why I have that buildonly ini section myself: by specifying those only= and skip= lines, you skip the svn update, make clean (ok, that's a bit naughty but speeds things up), just does the build and done. It basically does what you're doing by hand but I'm so lazy/careless, I can't be bothered to type that all the time when developing fpc stuff myself ---------------------------------------------------------------------- Mike.Cornflake · 2014-06-28 10:19 I missed the existence of -buildonly, many thanks for pointing it out. The full run of fpcup indeed solved my problem.    Now to experiment with make clean all install (just so I understand what's going on), and then I'll make a new shortcut for fpcup for -buildonly :-) Many thanks again [UPDATE]  Just re-read your post.   I'll add the [buildonly] section to my inifile and create a new shortcut that calls fpcup with the --inisection...   :-) ---------------------------------------------------------------------- BigChimp · 2014-06-28 10:54 Quote from: Mike.Cornflake on June 28, 2014, 12:19:25 pm[UPDATE]  Just re-read your post.   I'll add the [buildonly] section to my inifile and create a new shortcut that calls fpcup with the --inisection...   :-) Just for clarity to others who might be going through this thread - these are the relevant lines: Code: [Select]only=FPCBuildOnly,LazarusBuildOnly,useride skip=FPCCleanOnly,FPCGetOnly,LazarusCleanOnly,LazarusGetOnly,crosswin3 2-64 Thanks