Re: [fpc-pascal] Compilation Error At revision 25270.

2013-08-17 Thread Juha Manninen
On Sat, Aug 17, 2013 at 3:40 AM, waldo kitty  wrote:
> FWIW: i learned a while back (from the lazarus list i think) to perform
> "make clean" before "svn up" because the make files may have changed and the
> new ones may not know where the old files resided...
>
> performing "make clean" first clears the existing directories... then "svn
> up" followed (possibly with another "make clean" and then) by your normal
> build flow should result in a truly clean build flow without the possibility
> of lingering old .o and/or .a build files...

I don't think the extra "make clean" before "svn up" will really help
because the generated object files are not under revision control. To
make sure you don't have local modifications in revisioned files, do :
"svn revert -R ."

Juha
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: Compilation Error At revision 25270.

2013-08-17 Thread Reinier Olislagers
On 17/08/2013 10:44, Juha Manninen wrote:
> On Sat, Aug 17, 2013 at 3:40 AM, waldo kitty 
>  wrote:
>> performing "make clean" first clears the existing directories... then "svn
>> up" followed (possibly with another "make clean" and then) by your normal
>> build flow should result in a truly clean build flow without the possibility
>> of lingering old .o and/or .a build files...
> 
> I don't think the extra "make clean" before "svn up" will really help
> because the generated object files are not under revision control. To
> make sure you don't have local modifications in revisioned files, do :
> "svn revert -R ."

Also, there have been oversights in the past in what gets cleaned by
make clean, so I usually do a recursive delete of .a, .o, .ppu followed
by e.g. an svn revert -R or svn up to get any files back that are required.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Compilation Error At revision 25270.

2013-08-17 Thread Jonas Maebe

On 17 Aug 2013, at 10:44, Juha Manninen wrote:

> On Sat, Aug 17, 2013 at 3:40 AM, waldo kitty  wrote:
>> FWIW: i learned a while back (from the lazarus list i think) to perform
>> "make clean" before "svn up" because the make files may have changed and the
>> new ones may not know where the old files resided...
>> 
>> performing "make clean" first clears the existing directories... then "svn
>> up" followed (possibly with another "make clean" and then) by your normal
>> build flow should result in a truly clean build flow without the possibility
>> of lingering old .o and/or .a build files...
> 
> I don't think the extra "make clean" before "svn up" will really help
> because the generated object files are not under revision control.

"make clean" is not about the source files. Waldo is right: you should always 
"make clean" (or even better: "make distclean") before updating from svn, 
because files may move around and then "make clean" will only clean their 
object and ppu files in the new locations.


Jonas___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Compilation Error At revision 25270.

2013-08-17 Thread waldo kitty

On 8/17/2013 04:44, Juha Manninen wrote:

On Sat, Aug 17, 2013 at 3:40 AM, waldo kitty  wrote:

FWIW: i learned a while back (from the lazarus list i think) to perform
"make clean" before "svn up" because the make files may have changed and the
new ones may not know where the old files resided...

performing "make clean" first clears the existing directories... then "svn
up" followed (possibly with another "make clean" and then) by your normal
build flow should result in a truly clean build flow without the possibility
of lingering old .o and/or .a build files...


I don't think the extra "make clean" before "svn up" will really help
because the generated object files are not under revision control.


right... but what happens when source files are moved from one directory to 
another? the original "make clean" will ensure that their compiled versions are 
removed before the "svn up" moves them and puts a new makefile in place that 
can't remove them because it doesn't know the old directory...


and it wouldn't be an "extra" "make clean" either... you are right that the .o 
and .a files are/should not be under revision control... that's why i stated 
"possibly" ;)



To make sure you don't have local modifications in revisioned files, do :
"svn revert -R ."


right... but that still doesn't do anything for makefile changes and source 
files moving from one directory to another leaving behind old .o and .a files 
that the compiler finds and uses leading to unexplained errors, bugs and problems...


i think i've explained it clearer now?

make clean
svn up
make

for the general basic flow...

--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Compilation Error At revision 25270.

2013-08-17 Thread waldo kitty

On 8/17/2013 04:57, Reinier Olislagers wrote:

Also, there have been oversights in the past in what gets cleaned by
make clean, so I usually do a recursive delete of .a, .o, .ppu followed
by e.g. an svn revert -R or svn up to get any files back that are required.


right... that's why clean should be done before svn update... that way the old 
.a .o .ppu files are removed and then the update can move the sources to another 
directory as well as updating the makefile for the new files' locations...


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: Compilation Error At revision 25270.

2013-08-17 Thread Reinier Olislagers
On 17/08/2013 12:33, waldo kitty wrote:
> On 8/17/2013 04:57, Reinier Olislagers wrote:
>> Also, there have been oversights in the past in what gets cleaned by
>> make clean, so I usually do a recursive delete of .a, .o, .ppu followed
>> by e.g. an svn revert -R or svn up to get any files back that are
>> required.
> 
> right... that's why clean should be done before svn update... that way
> the old .a .o .ppu files are removed and then the update can move the
> sources to another directory as well as updating the makefile for the
> new files' locations...

I appear to be unclear. The makefile sometimes does not specify all
.a/.o files to clean. Therefore make clean does not clean all .a/.o
files, i.e. does not work, i.e. doing just make clean is not always enough.

As for the "update can move the sources to another directory" etc: no
idea what you're talking about there
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Compilation Error At revision 25270.

2013-08-17 Thread Marco van de Voort
In our previous episode, Reinier Olislagers said:
> > the old .a .o .ppu files are removed and then the update can move the
> > sources to another directory as well as updating the makefile for the
> > new files' locations...
> 
> I appear to be unclear. The makefile sometimes does not specify all
> .a/.o files to clean. Therefore make clean does not clean all .a/.o
> files, i.e. does not work, i.e. doing just make clean is not always enough.

That's what make distclean is for.

That still doesn't fix leftovers from manual compiling in the tree (causing
the .o/.ppu's not to go into units/), so on trees where I do a lot of
editing, I usually recursively clean.

Note that recursively killing .o's will kill some that are checked in too
(in tests and univint iirc)
 
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Compilation Error At revision 25270.

2013-08-17 Thread Reinier Olislagers
On 17/08/2013 13:46, Marco van de Voort wrote:
> In our previous episode, Reinier Olislagers said:
>>> the old .a .o .ppu files are removed and then the update can move the
>>> sources to another directory as well as updating the makefile for the
>>> new files' locations...
>>
>> I appear to be unclear. The makefile sometimes does not specify all
>> .a/.o files to clean. Therefore make clean does not clean all .a/.o
>> files, i.e. does not work, i.e. doing just make clean is not always enough.
> 
> That's what make distclean is for.

Which doesn't always work, as I mentioned.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Compilation Error At revision 25270.

2013-08-17 Thread Marco van de Voort
In our previous episode, Reinier Olislagers said:
> >> .a/.o files to clean. Therefore make clean does not clean all .a/.o
> >> files, i.e. does not work, i.e. doing just make clean is not always enough.
> > 
> > That's what make distclean is for.
> 
> Which doesn't always work, as I mentioned.

It indeed sometimes bombs out. If you look deeper, it is fpmake not being
able to delete the units/$fpctarget directory because it is not empty.

So either a file or some lock is there. Trouble is that it is catastrophic
(IOW further cleaning halts).

A workaround  is to kill the fpmake and then run distclean (then it afaik
does by rm -rf)
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Compilation Error At revision 25270.

2013-08-17 Thread Juha Manninen
On Sat, Aug 17, 2013 at 1:25 PM, Jonas Maebe  wrote:
> "make clean" is not about the source files. Waldo is right: you should always 
> "make clean" (or even better: "make distclean") before updating from svn, 
> because files may move around and then "make clean" will only clean their 
> object and ppu files in the new locations.

Ok, I did not think of that.
I remember manually deleting all .ppu and .o files when there were
problems. "make distclean" would have helped then.

Juha
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Compilation Error At revision 25270.

2013-08-17 Thread waldo kitty

On 8/17/2013 07:35, Reinier Olislagers wrote:

I appear to be unclear. The makefile sometimes does not specify all
.a/.o files to clean. Therefore make clean does not clean all .a/.o
files, i.e. does not work, i.e. doing just make clean is not always enough.


no, you are perfectly clear... clean doesn't always work... distclean should... 
i've never used distclean in my update scripts but i will be changing that 
soonest...



As for the "update can move the sources to another directory" etc: no
idea what you're talking about there


:(  think about it... you have a source tree like this

#1
  \projects
  \projects\libs
  \projects\myproject
  \projects\myproject\myproject.pas
  \projects\myproject\mylib.pas

you have refined mylib.pas to the point that you want to use it in other 
projects so you move it to \projects\libs and adjust the makefile accordingly...


#2
  \projects
  \projects\libs
  \projects\libs\mylib.pas
  \projects\myproject
  \projects\myproject\myproject.pas


so you started as #1 above and svn up to #2... when you run make clean, the old 
mylib.o,.a,.ppu files are still in \projects\myproject somewhere and may be used 
by the compiler instead of those that should be in \projects\libs where you 
moved your mylib.pas file to...


is that clearer now??

--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: Compilation Error At revision 25270.

2013-08-17 Thread Reinier Olislagers
On 17/08/2013 19:34, waldo kitty wrote:
> On 8/17/2013 07:35, Reinier Olislagers wrote:
>> As for the "update can move the sources to another directory" etc: no
>> idea what you're talking about there
> 
> :(  think about it... you have a source tree like this

> you have refined mylib.pas to the point that you want to use it in other
> projects so you move it to \projects\libs and adjust the makefile
> accordingly...


> so you started as #1 above and svn up to #2... when you run make clean,
> the old mylib.o,.a,.ppu files are still in \projects\myproject somewhere
> and may be used by the compiler instead of those that should be in
> \projects\libs where you moved your mylib.pas file to...
> 
> is that clearer now??


I'll take you at your word. I don't use makefiles in my projects.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal