Sign in Join

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

Mailing lists / fpc-pascal / 2013-08

Compilation Error At revision 25270.

21 messages · 10 people · –

Reply by email Subscribe to this list Your subscription

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

Eric Kom

svn up
make clean
export PP=/usr/local/lib/fpc/2.7.1/ppc386
make OVERRIDEVERSIONCHECK=1 NOGDB=1 OPT='-O- -gl -Xs-' all ................................
pp.pas(248) Warning: Implicit uses of Variants unit pp.pas(247,1) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted
make[4]: *** [ppc386] Error 1
make[4]: Leaving directory `/home/erickom/fpcBuild/fpc/compiler' make[3]: *** [wpocycle] Error 2
make[3]: Leaving directory `/home/erickom/fpcBuild/fpc/compiler' make[2]: *** [cycle] Error 2
make[2]: Leaving directory `/home/erickom/fpcBuild/fpc/compiler' make[1]: *** [compiler_cycle] Error 2
make[1]: Leaving directory `/home/erickom/fpcBuild/fpc' make: *** [build-stamp.i386-linux] Error 2
svn up
Updating '.':
At revision 25270.

Kind Regards Eric Kom System Administrator & Programmer - Metropolitan College _________________________________________ / You are scrupulously honest, frank, and \ | straightforward. Therefore you have few | \ friends. / ----------------------------------------- \ \ .--. |o_o | |:_/ | // \ \ (| Kom | ) /'\_ _/`\ \___)=(___/ 2 Hennie Van Till, White River, 1240 Tel: 013 750 2255 | Fax: 013 750 0105 | Cell: 078 879 1334 | www.kom.za.net | www.kom.za.org | www.erickom.co.za Key fingerprint: 513E E91A C243 3020 8735 09BB 2DBC 5AD7 A9DA 1EF5
Mark Morgan Lloyd
to Eric Kom: svn up make clean export PP=/usr/local/lib/fpc/2.7.1/ppc386 make OVERRIDEVERSIONCHECK=1…
Eric Kom wrote 20 lines
svn up make clean export PP=/usr/local/lib/fpc/2.7.1/ppc386 make OVERRIDEVERSIONCHECK=1 NOGDB=1 OPT='-O- -gl -Xs-' all ................................ pp.pas(248) Warning: Implicit uses of Variants unit pp.pas(247,1) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted make[4]: *** [ppc386] Error 1 make[4]: Leaving directory `/home/erickom/fpcBuild/fpc/compiler' make[3]: *** [wpocycle] Error 2 make[3]: Leaving directory `/home/erickom/fpcBuild/fpc/compiler' make[2]: *** [cycle] Error 2 make[2]: Leaving directory `/home/erickom/fpcBuild/fpc/compiler' make[1]: *** [compiler_cycle] Error 2 make[1]: Leaving directory `/home/erickom/fpcBuild/fpc' make: *** [build-stamp.i386-linux] Error 2 svn up Updating '.': At revision 25270.

Try again, I think it's a general point, you'd make it far easier for everybody- including yourself- if you used the stable compiler (2.6.2) as your starting point. Also, if you want to know what revision you're at then use svn info rather than svn up.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]
waldo kitty
to Eric Kom: svn up make clean export PP=/usr/local/lib/fpc/2.7.1/ppc386 make OVERRIDEVERSIONCHECK=1…
Eric Kom wrote
svn up make clean

[trim]

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...

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.
Juha Manninen
to waldo kitty
waldo kitty wrote 8 lines
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

Reinier Olislagers
to Juha Manninen
Juha Manninen wrote 10 lines
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.

Jonas Maebe
to Juha Manninen: I don't think the extra "make clean" before "svn up" will really help because the…
Juha Manninen wrote 12 lines
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

waldo kitty
to Juha Manninen: I don't think the extra "make clean" before "svn up" will really help because the…
Juha Manninen wrote 12 lines
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.
waldo kitty
to Reinier Olislagers: Also, there have been oversights in the past in what gets cleaned by make clean, so I…
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.
Reinier Olislagers
to waldo kitty
waldo kitty wrote 10 lines
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....

Marco van de Voort
to Reinier Olislagers

In our previous episode, Reinier Olislagers said:

Show quoted text 7 lines
> 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)

Reinier Olislagers
to Marco van de Voort
Marco van de Voort wrote 10 lines
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.

Marco van de Voort
to Reinier Olislagers

In our previous episode, Reinier Olislagers said:

Show quoted text 6 lines
>> .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)

Juha Manninen
to Jonas Maebe: "make clean" is not about the source files. Waldo is right: you should always "make…
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

waldo kitty
to Reinier Olislagers: I appear to be unclear. The makefile sometimes does not specify all .a/.o files to clean.…
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.
Reinier Olislagers
to waldo kitty
waldo kitty wrote 5 lines
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

<snip>

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...

<snip>

Show quoted text 6 lines
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.

waldo kitty
to Reinier Olislagers
Reinier Olislagers wrote
On 17/08/2013 19:34, waldo kitty wrote:

[...]

Show quoted text 8 lines
> 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.

right but others (FPC and Lazarus) do... not to mention that it was an example and i didn't feel like laying out the whole lazarus tree to show it from that perspective...

in any case, failing to run "make clean" or "make disclean" /before/ "svn up" can lead to problems with old libraries being left in old locations when files are moved... we've seen this exact situation with Lazarus in numerous cases... the standard response has been to run the "Clean up build files" option which removes all .o, o., and .ppu files so they can be rebuilt from the proper source files from their (new) locations...

question: at what point does your updater tool perform "make clean" or "make distclean"? before or after or both, before and after, the svn update?

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.
Mattias Gaertner
to waldo kitty
Show quoted text 9 lines
On 8/18/2013 02:52, Reinier Olislagers wrote: > On 17/08/2013 19:34, waldo kitty wrote: [...] in any case, failing to run "make clean" or "make disclean" /before/ "svn up" can lead to problems with old libraries being left in old locations when files are moved... we've seen this exact situation with Lazarus in numerous cases... the standard response has been to run the "Clean up build files" option which removes all .o, o., and .ppu files so they can be rebuilt from the proper source files from their (new) locations...

"make clean" only cleans up the Lazarus files.
"Clean up build files" cleans up the user project and packages too.

Mattias

Reinier Olislagers
to waldo kitty: [...] right but others (FPC and Lazarus) do... not to mention that it was an example and…
waldo kitty wrote 5 lines
On 8/18/2013 02:52, Reinier Olislagers wrote: > On 17/08/2013 19:34, waldo kitty wrote: question: at what point does your updater tool perform "make clean" or "make distclean"? before or after or both, before and after, the svn update?

fpcup?

It runs make distclean before svn update. [1]
There used to be (don't know if I left it in) "nuclear clean" mode that does a recursive delete of *.ppu, *.a, *.o before the svn up.

[1] it also stashes diffs of any version-controlled files before doing svn up. The user can choose to try and restore/apply that diff afterwards.

waldo kitty
to Mattias Gaertner: On Sun, 18 Aug 2013 09:43:37 -0400 "make clean" only cleans up the Lazarus files. "Clean…
Mattias Gaertner wrote 16 lines
On Sun, 18 Aug 2013 09:43:37 -0400 waldo kitty wrote: > On 8/18/2013 02:52, Reinier Olislagers wrote: >> On 17/08/2013 19:34, waldo kitty wrote: > [...] > in any case, failing to run "make clean" or "make disclean" /before/ "svn up" > can lead to problems with old libraries being left in old locations when files > are moved... we've seen this exact situation with Lazarus in numerous cases... > the standard response has been to run the "Clean up build files" option which > removes all .o, o., and .ppu files so they can be rebuilt from the proper source > files from their (new) locations... "make clean" only cleans up the Lazarus files. "Clean up build files" cleans up the user project and packages too.

ahh! thanks for the clarification... "Clean up build files" does for projects what "clean" and "distclean" do for FPC and Lazarus... that does make sense since the projects cannot be known by FPC's and Lazarus' building makefiles :)

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.