Sign in Join

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

Mailing lists / fpc-devel / 2020-04

Fatal: Invalid PPU-File entry: 242

12 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Bart

Hi,

Given that I have fpctrunk installed in c:\pp
This implies that there is a c:\pp\units\i386-win32\rtl folder and in that folder there is (a.o.) the file system.ppu

Now I have a test.pas file that simply consists of "begin end."

When I add c:\pp\units\i386-win32\rtl to the units path (yes, I know that is stupid, but please have a little patience, you'll find out why later on) and then try to compile test.pas I get confusing results:

fpc 3.2.0RC1
C:\Users\Bart\LazarusProjecten\ConsoleProjecten>fpc -vu -Fuc:\pp\units\i386-win32\rtl test.pas
Free Pascal Compiler version 3.2.0rc1 [2020/02/29] for i386 Copyright (c) 1993-2020 by Florian Klaempfl and others Target OS: Win32 for i386
Compiling test.pas
(PROGRAM) Registering new unit SYSTEM
(PROGRAM) Load from PROGRAM (implementation) unit SYSTEM (SYSTEM) Loading unit SYSTEM
(SYSTEM) PPU Name: C:\pp\units\i386-win32\rtl\system.ppu (SYSTEM) PPU Time: 2020/03/31 22:15:34
(SYSTEM) PPU Flags: 4224
(SYSTEM) PPU Crc: 5E999730
(SYSTEM) PPU Crc: E5978BE9 (intfc)
(SYSTEM) PPU Crc: E4BD4DAF (indc)
(SYSTEM) Number of definitions: 3470
(SYSTEM) Number of symbols: 9654
Fatal: Invalid PPU-File entry: 242
Fatal: Compilation aborted
Error: C:\devel\fpc\3.2.0\bin\i386-Win32\ppc386.exe returned an error exitcode

OK, I point the compiler to the wrong rtl units and it barfs. I understand that.

Now fpc 3.0.4
C:\Users\Bart\LazarusProjecten\ConsoleProjecten>fpc -vu -Fuc:\pp\units\i386-win32\rtl test.pas
Free Pascal Compiler version 3.0.4rc1 [2017/07/03] for i386 Copyright (c) 1993-2017 by Florian Klaempfl and others Target OS: Win32 for i386
Compiling test.pas
(PROGRAM) Registering new unit SYSTEM
(PROGRAM) Load from PROGRAM (implementation) unit SYSTEM (SYSTEM) Loading unit SYSTEM
(SYSTEM) PPU Name: C:\pp\units\i386-win32\rtl\system.ppu (SYSTEM) PPU Invalid Version 207
^^^^ OK, it rejects that, but it investigates a next candidate (SYSTEM) PPU Name: C:\devel\fpc\3.0.4\units\i386-win32\rtl\system.ppu (SYSTEM) PPU Time: 2017/07/03 14:35:04
(SYSTEM) PPU Flags: 159873
(SYSTEM) PPU Crc: 1898640E
(SYSTEM) PPU Crc: F0C5F6F0 (intfc)
(SYSTEM) PPU Crc: D83A3C78 (indc)
(SYSTEM) Number of definitions: 4852
(SYSTEM) Number of symbols: 11930
....
(SYSINITPAS) Finished loading unit SYSINITPAS
Linking test.exe
2 lines compiled, 0.1 sec, 25152 bytes code, 1252 bytes data

Now I try to compile with fpc trunk and set the -Fu to the folder that contians the system.ppu for fpc 3.2.0

C:\Users\Bart\LazarusProjecten\ConsoleProjecten>fpc -vu -Fuc:\devel\fpc\3.2.0\units\i386-win32\rtl test.pas Free Pascal Compiler version 3.3.1 [2020/03/31] for i386 Copyright (c) 1993-2020 by Florian Klaempfl and others Target OS: Win32 for i386
Compiling test.pas
(PROGRAM) Registering new unit SYSTEM
(PROGRAM) Load from PROGRAM (implementation) unit SYSTEM (SYSTEM) Loading unit SYSTEM
(SYSTEM) PPU Name: C:\devel\fpc\3.2.0\units\i386-win32\rtl\system.ppu (SYSTEM) PPU Invalid Header (no PPU at the begin) (SYSTEM) PPU Name: C:\pp\units\i386-win32\rtl\system.ppu (SYSTEM) PPU Time: 2020/03/31 22:15:34
(SYSTEM) PPU Flags: 4224
(SYSTEM) PPU Crc: 5E999730
(SYSTEM) PPU Crc: E5978BE9 (intfc)
(SYSTEM) PPU Crc: E4BD4DAF (indc)
(SYSTEM) Number of definitions: 3470
(SYSTEM) Number of symbols: 9654
...
(SYSINITPAS) Finished loading unit SYSINITPAS
Linking test.exe
2 lines compiled, 0.1 sec, 28112 bytes code, 1300 bytes data

So, it seems I can point fpc 3.0.4 and fpc 3.3.1 to the wrong system.ppu, it will simply ignore it and find the one specified in fpc.cfg.
Not so for fpc 3.2.0 RC1.

Why is that?

Why did I even test this?
Well, it turns out that when you build Lazarus, at some point the compiler is called with Fuc:\pp\units\i386-win32\rtl GOK why. And since I have system.ppu of fpc trunk there, it refuses to build Lazarus.

(Note: If I rename the c:\pp folder, fpc 3.2.0RC1 build Lazarus just fine)

I asked about this on Lazarus devel ML, but got no response there.

So, at this moment in time my main question is:
Is the error that fpc 3.2.0RC1 throws correct?
And, if that is the case: why don't 3.0.4 and trunk error out in similar conditions?
(Does it only error out if the fouc system.ppu is newer than the current compiler version?)

Bart

Reply by email

Michael Van Canneyt
to Bart
Bart wrote 32 lines
Hi, Given that I have fpctrunk installed in c:\pp This implies that there is a c:\pp\units\i386-win32\rtl folder and in that folder there is (a.o.) the file system.ppu Now I have a test.pas file that simply consists of "begin end." When I add c:\pp\units\i386-win32\rtl to the units path (yes, I know that is stupid, but please have a little patience, you'll find out why later on) and then try to compile test.pas I get confusing results: (SYSTEM) Loading unit SYSTEM (SYSTEM) PPU Name: C:\devel\fpc\3.2.0\units\i386-win32\rtl\system.ppu (SYSTEM) PPU Invalid Header (no PPU at the begin) (SYSTEM) PPU Name: C:\pp\units\i386-win32\rtl\system.ppu (SYSTEM) PPU Time: 2020/03/31 22:15:34 (SYSTEM) PPU Flags: 4224 (SYSTEM) PPU Crc: 5E999730 (SYSTEM) PPU Crc: E5978BE9 (intfc) (SYSTEM) PPU Crc: E4BD4DAF (indc) (SYSTEM) Number of definitions: 3470 (SYSTEM) Number of symbols: 9654 ... (SYSINITPAS) Finished loading unit SYSINITPAS Linking test.exe 2 lines compiled, 0.1 sec, 28112 bytes code, 1300 bytes data So, it seems I can point fpc 3.0.4 and fpc 3.3.1 to the wrong system.ppu, it will simply ignore it and find the one specified in fpc.cfg. Not so for fpc 3.2.0 RC1.

It does try to load the one in fpc.cfg, but it is invalid:

(SYSTEM) PPU Name: C:\devel\fpc\3.2.0\units\i386-win32\rtl\system.ppu (SYSTEM) PPU Invalid Header (no PPU at the begin)

Now it tries the one you specified:

(SYSTEM) PPU Name: C:\pp\units\i386-win32\rtl\system.pp

Michael.

Reply by email

Bart
to Michael Van Canneyt

On Thu, Apr 30, 2020 at 4:45 PM Michael Van Canneyt wrote:

Sorry, my reply to Michael went to his private mail, not to the lis, so I copy it here:

It does try to load the one in fpc.cfg, but it is invalid:

No it does not.

Again:
C:\Users\Bart\LazarusProjecten\ConsoleProjecten>fpc -vu -Fuc:\pp\units\i386-win32\rtl test.pas
Free Pascal Compiler version 3.2.0rc1 [2020/02/29] for i386 Copyright (c) 1993-2020 by Florian Klaempfl and others Target OS: Win32 for i386
Compiling test.pas
(PROGRAM) Registering new unit SYSTEM
(PROGRAM) Load from PROGRAM (implementation) unit SYSTEM (SYSTEM) Loading unit SYSTEM
(SYSTEM) PPU Name: C:\pp\units\i386-win32\rtl\system.ppu ^^ It finds the one specified in -Fu first

(SYSTEM) PPU Time: 2020/03/31 22:15:34
(SYSTEM) PPU Flags: 4224
(SYSTEM) PPU Crc: 5E999730
(SYSTEM) PPU Crc: E5978BE9 (intfc)
(SYSTEM) PPU Crc: E4BD4DAF (indc)
(SYSTEM) Number of definitions: 3470
(SYSTEM) Number of symbols: 9654
Fatal: Invalid PPU-File entry: 242
Fatal: Compilation aborted
Error: C:\devel\fpc\3.2.0\bin\i386-Win32\ppc386.exe returned an error exitcode

The compiler (3.2.0RC1) first tries the specified path in -Fu: (SYSTEM) Loading unit SYSTEM
(SYSTEM) PPU Name: C:\pp\units\i386-win32\rtl\system.ppu

It then immediately aborts.
It never looks for system.ppu in the folder specified in the fpc.cfg of this compiler.

It does try to load the one in fpc.cfg, but it is invalid: (SYSTEM) PPU Name: C:\devel\fpc\3.2.0\units\i386-win32\rtl\system.ppu (SYSTEM) PPU Invalid Header (no PPU at the begin)

Please look at the context.
This is the trunk compiler.
I point it (erroneously) tot the system.ppu of fpc3.2.0RC1 It finds it, determines it's invalid, and then proceeds to find the correct one (specified in fpc.cfg of the trunk compiler) and succesfully builds the test program.
(I did not iclude the snippet where it finds the correct one, since I thought this would be obvious, as it succeeds in compiling)

Michale then replied:

Indeed, sorry. The many outputs seem to have confused me.

To which I later replied:

The question remains: why a fatal error if fpc 3.2.0 encounters the system.ppu of fpc trunk, where fpc 3.0.4 does not. Is that a bug in fpc 3.2.0RC1?

(So, we're all up to speed now)

Bart

Reply by email

Sven Barth
to Bart
Bart wrote 63 lines
On Thu, Apr 30, 2020 at 4:45 PM Michael Van Canneyt wrote: Sorry, my reply to Michael went to his private mail, not to the lis, so I copy it here: > It does try to load the one in fpc.cfg, but it is invalid: No it does not. Again: C:\Users\Bart\LazarusProjecten\ConsoleProjecten>fpc -vu -Fuc:\pp\units\i386-win32\rtl test.pas Free Pascal Compiler version 3.2.0rc1 [2020/02/29] for i386 Copyright (c) 1993-2020 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling test.pas (PROGRAM) Registering new unit SYSTEM (PROGRAM) Load from PROGRAM (implementation) unit SYSTEM (SYSTEM) Loading unit SYSTEM (SYSTEM) PPU Name: C:\pp\units\i386-win32\rtl\system.ppu ^^ It finds the one specified in -Fu first (SYSTEM) PPU Time: 2020/03/31 22:15:34 (SYSTEM) PPU Flags: 4224 (SYSTEM) PPU Crc: 5E999730 (SYSTEM) PPU Crc: E5978BE9 (intfc) (SYSTEM) PPU Crc: E4BD4DAF (indc) (SYSTEM) Number of definitions: 3470 (SYSTEM) Number of symbols: 9654 Fatal: Invalid PPU-File entry: 242 Fatal: Compilation aborted Error: C:\devel\fpc\3.2.0\bin\i386-Win32\ppc386.exe returned an error exitcode The compiler (3.2.0RC1) first tries the specified path in -Fu: (SYSTEM) Loading unit SYSTEM (SYSTEM) PPU Name: C:\pp\units\i386-win32\rtl\system.ppu It then immediately aborts. It never looks for system.ppu in the folder specified in the fpc.cfg of this compiler. > It does try to load the one in fpc.cfg, but it is invalid: > (SYSTEM) PPU Name: C:\devel\fpc\3.2.0\units\i386-win32\rtl\system.ppu > (SYSTEM) PPU Invalid Header (no PPU at the begin) Please look at the context. This is the trunk compiler. I point it (erroneously) tot the system.ppu of fpc3.2.0RC1 It finds it, determines it's invalid, and then proceeds to find the correct one (specified in fpc.cfg of the trunk compiler) and succesfully builds the test program. (I did not iclude the snippet where it finds the correct one, since I thought this would be obvious, as it succeeds in compiling) Michale then replied: > Indeed, sorry. The many outputs seem to have confused me. To which I later replied: The question remains: why a fatal error if fpc 3.2.0 encounters the system.ppu of fpc trunk, where fpc 3.0.4 does not. Is that a bug in fpc 3.2.0RC1? (So, we're all up to speed now)

Between 3.2.0 and 3.3.1 an additional PPU entry was introduced that carries an additional PPU version (the original version field is 1 Byte and we're already at 207). If a 3.2.0 compiler (or older) finds a 3.3.1 unit it will complain about an unknown header entry (which is a fatal error). A 3.3.1 compiler that finds a 3.2.0 unit or older will complain about the missing header.

This is not fixable due to the way PPU files are parsed.

Regards,
Sven

Reply by email

Sven Barth
to Sven Barth

Bart had only replied to me, thus I fully quote his mail here.

Bart wrote 20 lines
On Thu, Apr 30, 2020 at 11:43 PM Sven Barth wrote: > Between 3.2.0 and 3.3.1 an additional PPU entry was introduced that > carries an additional PPU version (the original version field is 1 Byte > and we're already at 207). If a 3.2.0 compiler (or older) finds a 3.3.1 > unit it will complain about an unknown header entry (which is a fatal > error). As I have shown before, the fpc 3.0.4 compiler finds the 3.3.1 PPU and just ignores it. > A 3.3.1 compiler that finds a 3.2.0 unit or older will complain > about the missing header. It says the file doesn't start with PPU, which is a little wrong though... > This is not fixable due to the way PPU files are parsed. Well, that sucks then. At least for my system that means that 3.2.0 and trunk (3.3.1) cannot co-exist. See https://forum.lazarus.freepascal.org/index.php/topic,49606.msg360032.html#msg360032 I'm at a loss ATM.

I need to correct myself: I was able to fix it in revision 45209, but you'll have to recompile your trunk units for that. The reason it worked for 3.0.4 was that 3.0.4 and 3.3.1 have different PPU versions, while 3.2.0 and 3.3.1 hadn't (the new header was introduced shortly after 3.2.0 was branched, thus there simply wasn't the need to increase the version). I've now increased the version and as that is checked first 3.2.0 should now behave with trunk units post-45209 like 3.0.4 does.

Regards,
Sven

Reply by email

Bart
to Sven Barth
PM Sven Barth wrote
Bart had only replied to me, thus I fully quote his mail here.

There is something fishy going on with this ML.
Whenever I click on reply in this list, the reply doesn't go to the list, but to th private email of the person I respond to. This also happened when I responded to Michael.

Show quoted text 7 lines
I need to correct myself: I was able to fix it in revision 45209, but you'll have to recompile your trunk units for that. The reason it worked for 3.0.4 was that 3.0.4 and 3.3.1 have different PPU versions, while 3.2.0 and 3.3.1 hadn't (the new header was introduced shortly after 3.2.0 was branched, thus there simply wasn't the need to increase the version). I've now increased the version and as that is checked first 3.2.0 should now behave with trunk units post-45209 like 3.0.4 does.

That is great news!!!
I will update my fpc trunk and install again.

(Still the mystery remains why the Lazarus build mechanisme adds -Fu/c://pp/units/i386-win32/rtl as a parameter to the compiler.)

I'll report back soon.

Bart

Reply by email

Bart
to Bart
PM Bart wrote
I'll report back soon.

Yeah, it works in the simple test case:

C:\Users\Bart\LazarusProjecten\ConsoleProjecten>fpc -Fuc:\pp\units\i386-win32\rtl test.pas -vu
Free Pascal Compiler version 3.2.0rc1 [2020/02/29] for i386 Copyright (c) 1993-2020 by Florian Klaempfl and others Target OS: Win32 for i386
Compiling test.pas
(PROGRAM) Registering new unit SYSTEM
(PROGRAM) Load from PROGRAM (implementation) unit SYSTEM (SYSTEM) Loading unit SYSTEM
(SYSTEM) PPU Name: C:\pp\units\i386-win32\rtl\system.ppu (SYSTEM) PPU Invalid Version 208
^^^^ It detects it's invalid and proceedts to use the one specified in fpc,cfg. (SYSTEM) PPU Name: C:\devel\fpc\3.2.0\units\i386-win32\rtl\system.ppu (SYSTEM) PPU Time: 2020/02/29 21:52:14
(SYSTEM) PPU Flags: 159873
(SYSTEM) PPU Crc: C3D1AAA3
(SYSTEM) PPU Crc: AA44BC17 (intfc)
(SYSTEM) PPU Crc: 29EFF896 (indc)
...
Successfully built.

ATM I am very happy!

Bart

Reply by email

Sven Barth
to Bart: There is something fishy going on with this ML. Whenever I click on reply in this list,…

Bart schrieb am Fr., 1. Mai 2020, 16:50:

Show quoted text 10 lines
On Fri, May 1, 2020 at 3:59 PM Sven Barth wrote: > Bart had only replied to me, thus I fully quote his mail here. There is something fishy going on with this ML. Whenever I click on reply in this list, the reply doesn't go to the list, but to th private email of the person I respond to. This also happened when I responded to Michael.

I usually simply do a reply to all and be done with it. *shrugs*

Regards,
Sven

Reply by email

Unknown author
to Bart: There is something fishy going on with this ML. Whenever I click on reply in this list,…
Bart wrote 8 lines
On Fri, May 1, 2020 at 3:59 PM Sven Barth wrote: > Bart had only replied to me, thus I fully quote his mail here. There is something fishy going on with this ML. Whenever I click on reply in this list, the reply doesn't go to the list, but to th private email of the person I respond to. This also happened when I responded to Michael.

when you click where? in what program? i use thunderbird and it has a "reply list" button that is default for most of the mailing lists i am subscribed to...

NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list where it belongs!*

Reply by email

Bart
to Unknown author
PM wrote
when you click where? in what program? i use thunderbird and it has a "reply list" button that is default for most of the mailing lists i am subscribed to...

The reply button in gmail.
But, I just did that tot reply to you, and now it replies tot the list.

Bart

Reply by email

Sven Barth
to Unknown author: when you click where? in what program? i use thunderbird and it has a "reply list" button…

schrieb am Fr., 1. Mai 2020, 21:12:

Show quoted text 17 lines
On 5/1/20 10:50 AM, Bart via fpc-devel wrote: > On Fri, May 1, 2020 at 3:59 PM Sven Barth wrote: > >> Bart had only replied to me, thus I fully quote his mail here. > > There is something fishy going on with this ML. > Whenever I click on reply in this list, the reply doesn't go to the > list, but to th private email of the person I respond to. > This also happened when I responded to Michael. when you click where? in what program? i use thunderbird and it has a "reply list" button that is default for most of the mailing lists i am subscribed to...

For me "Reply to list" in Thunderbird always ends with no reason why I've resorted to "Reply to all".

Regards,
Sven

Reply by email

Ralf Quint
to Sven Barth
Sven Barth wrote 13 lines
< > schrieb am Fr., 1. Mai 2020, 21:12: when you click where? in what program? i use thunderbird and it has a "reply list" button that is default for most of the mailing lists i am subscribed to... For me "Reply to list" in Thunderbird always ends with no receiver at all. Another reason why I've resorted to "Reply to all".

Works just fine for me here as well (T-Bird 68.7.0 om Windows 8.1).

Ralf

This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

Reply by email