Sign in Join

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

Mailing lists / fpc-devel / 2010-06

FPC_HAS_FEATURE_RESOURCES and packages ?

11 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

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

Martin

While it may well be a misconfiguration on my side, I got some compilation errors, while building fpc, and found the following:

- in the rtl objpas.pp several functions are only exported if FPC_HAS_FEATURE_RESOURCES is defined.
- in fcl-base gettext.pp they are used unconditionally.

So if FPC_HAS_FEATURE_RESOURCES is not defined compilation will fail.

Functions in question are
SetResourceStrings, Hash, finalizeresourcetables, ...

Martin

Florian Klaempfl
to Martin
Show quoted text 8 lines
While it may well be a misconfiguration on my side, I got some compilation errors, while building fpc, and found the following: - in the rtl objpas.pp several functions are only exported if FPC_HAS_FEATURE_RESOURCES is defined. - in fcl-base gettext.pp they are used unconditionally. So if FPC_HAS_FEATURE_RESOURCES is not defined compilation will fail.

What compiler do you use? Recent FPCs from trunk define it.

Martin
to Florian Klaempfl
Florian Klaempfl wrote 11 lines
Martin schrieb: > While it may well be a misconfiguration on my side, I got some > compilation errors, while building fpc, and found the following: > > - in the rtl objpas.pp several functions are only exported if > FPC_HAS_FEATURE_RESOURCES is defined. > - in fcl-base gettext.pp they are used unconditionally. > > So if FPC_HAS_FEATURE_RESOURCES is not defined compilation will fail. What compiler do you use? Recent FPCs from trunk define it.

I was using fpc 2.4.0:
Free Pascal Compiler version 2.4.0 [2010/03/31] for i386

I thought that using the last release should always work

Martin

Jonas Maebe
to Martin

Martin wrote on Mon, 28 Jun 2010:

Show quoted text 8 lines
On 28/06/2010 14:11, Florian Klaempfl wrote: > > What compiler do you use? Recent FPCs from trunk define it. I was using fpc 2.4.0: Free Pascal Compiler version 2.4.0 [2010/03/31] for i386 I thought that using the last release should always work

The packages will always be compiled by the newly compiled compiler, so it should work. At least the nightly builds also all start with FPC 2.4.0 and work fine.

Jonas

---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.

Marco van de Voort
to Martin: I was using fpc 2.4.0: Free Pascal Compiler version 2.4.0 [2010/03/31] for i386 I thought…

In our previous episode, Martin said:

Show quoted text 6 lines
> What compiler do you use? Recent FPCs from trunk define it. I was using fpc 2.4.0: Free Pascal Compiler version 2.4.0 [2010/03/31] for i386 I thought that using the last release should always work

It always works to bootstrap. But the parts after the bootstrap (packages/) are only guaranteed compilable with the compiler of that same snapshot.

So probably you compile a 2.5.1 rtl (and compiler?) with 2.4.0, but somehow also compile the rest with 2.4.0, while it should be 2.5.1.

Martin
to Marco van de Voort
Marco van de Voort wrote 15 lines
In our previous episode, Martin said: >> What compiler do you use? Recent FPCs from trunk define it. >> > I was using fpc 2.4.0: > Free Pascal Compiler version 2.4.0 [2010/03/31] for i386 > > I thought that using the last release should always work > It always works to bootstrap. But the parts after the bootstrap (packages/) are only guaranteed compilable with the compiler of that same snapshot. So probably you compile a 2.5.1 rtl (and compiler?) with 2.4.0, but somehow also compile the rest with 2.4.0, while it should be 2.5.1.

yep, in this case it seems my fault.

I have my own batch file. As for example I try to avoid compiling the examples (which I believe "make all" does). To me it's just time, I do not want to spent waiting....

make.exe rtl packages compiler OPTIMIZE=1 OPT="-O3 -Or -CpPENTIUMM -OpPENTIUMM" FPC=C:\FPC\strunc\bin\i386-win32\ppc386.exe

I ended up with that order, because if I recall correctly, make compiler did need the packages, or something like that?

Martin
to Martin
Martin wrote 7 lines
On 28/06/2010 14:21, Marco van de Voort wrote: > In our previous episode, Martin said: >>> What compiler do you use? Recent FPCs from trunk define it. >> I was using fpc 2.4.0: >> Free Pascal Compiler version 2.4.0 [2010/03/31] for i386 >> >> I thought that using the last release should always work

I just tried this with
Free Pascal Compiler version 2.5.1 [2010/06/09] for i386

same error?

make.exe rtl packages compiler OPTIMIZE=1 OPT="-O3 -Or -CpPENTIUMM -OpPENTIUMM" FPC=C:\FPC\strunc\bin\i386-win32\ppc386.exe
Jonas Maebe
to Martin: yep, in this case it seems my fault. I have my own batch file. As for example I try to…

Martin wrote on Mon, 28 Jun 2010:

Show quoted text 8 lines
On 28/06/2010 14:21, Marco van de Voort wrote: > So probably you compile a 2.5.1 rtl (and compiler?) with 2.4.0, but somehow > also compile the rest with 2.4.0, while it should be 2.5.1. yep, in this case it seems my fault. I have my own batch file. As for example I try to avoid compiling the examples (which I believe "make all" does).

It doesn't. On most platforms, it does compile the IDE and installer though.

Show quoted text 7 lines
To me it's just time, I do not want to spent waiting.... make.exe rtl packages compiler OPTIMIZE=1 OPT="-O3 -Or -CpPENTIUMM -OpPENTIUMM" FPC=C:\FPC\strunc\bin\i386-win32\ppc386.exe I ended up with that order, because if I recall correctly, make compiler did need the packages, or something like that?

The compiler does not depend on packages. Furthermore, it's wrong to compile the compiler only once. The main makefile does not use the "compiler_cycle" just to test the compiler. It's a fundamental step of the bootstrap process.

I would strongly recommend to use the "make all" target unless you are intimately familiar with the details of FPC's bootstrapping. You can add NOWPOCYCLE=1 to speed it up a little.

Jonas

---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.

Martin
to Jonas Maebe
Jonas Maebe wrote 16 lines
> To me it's just time, I do not want to spent waiting.... > > make.exe rtl packages compiler OPTIMIZE=1 OPT="-O3 -Or > -CpPENTIUMM -OpPENTIUMM" FPC=C:\FPC\strunc\bin\i386-win32\ppc386.exe > > I ended up with that order, because if I recall correctly, make > compiler did need the packages, or something like that? The compiler does not depend on packages. Furthermore, it's wrong to compile the compiler only once. The main makefile does not use the "compiler_cycle" just to test the compiler. It's a fundamental step of the bootstrap process. I would strongly recommend to use the "make all" target unless you are intimately familiar with the details of FPC's bootstrapping. You can add NOWPOCYCLE=1 to speed it up a little.

Seems I have to do that.
Many thanks for the help.

as for my desire of building the compiler optimized and the rtl with debug info (Never tested if there is any gain in it, apart from the piece of mind which can be found in believe...).

After building the compiler, which now is;
make.exe clean distclean
make.exe all LINKSMART=1 CREATESMART=1 OPTIMIZE=1 OPT="-O3 -Or -CpPENTIUMM -OpPENTIUMM" TARGET_EXAMPLES=NO FPC=c:\FPC\SVN\ppc386_2_4_0.exe make.exe install INSTALL_PREFIX=c:\FPC\strunc\ COPYTREE=echo UPXPROG=echo

I rebuild/reinstall the rtl/packages (using the fpc that was build above) make.exe rtl_clean packages_clean
make.exe rtl packages LINKSMART=1 CREATESMART=1 DEBUG=1 OPTIMIZE=0 OPT="-gl -gw -godwarfsets -O1"
FPC=c:\FPC\strunc\bin\i386-win32\fpc.exe TARGET_EXAMPLES=NO make.exe rtl_install packages_install INSTALL_PREFIX=c:\FPC\strunc\ COPYTREE=echo UPXPROG=echo FPC=c:\FPC\strunc\bin\i386-win32\fpc.exe

How much trouble are I am in for? It appears to have worked fine until now.

Martin

Marcos Douglas
to Martin
Martin wrote
I rebuild/reinstall the rtl/packages (using the fpc that was build above)

Is it necessary?!

Marcos Douglas

Martin
to Marcos Douglas
Marcos Douglas wrote 7 lines
On Mon, Jun 28, 2010 at 11:15 AM, Martin wrote: > I rebuild/reinstall the rtl/packages (using the fpc that was build above) > > Is it necessary?!

As I tried to express in the previous mail:

technically: probably not => but I don't know ( I have never compared the compile speed of fpc build as -O1 or -O3. I would need a tool that under windows measures the cpu time spent, excluding disk time)

Anyway, I can always take it out, if it causes me trouble.

Martin