Compiling the compiler

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Compiling the compiler

Andreas Berger
I downloaded the latest snapshot and wish to recompile the fpc compiler
for G032v2. I found an old doc that says to:
  cd compiler
  make cycle

This obviously will not work since FPC has fpcmake and not make. There
is also no makefile called cycle in the compiler folder. Can someone
tell me how to completely recompile the fpc?


regards,
Andreas

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Burkhard Carstens-3
Am Montag, 24. Juli 2006 17:42 schrieb Andreas Berger:
> I downloaded the latest snapshot and wish to recompile the fpc
> compiler for G032v2. I found an old doc that says to:
>   cd compiler
>   make cycle
>
> This obviously will not work since FPC has fpcmake and not make.
> There is also no makefile called cycle in the compiler folder. Can
> someone tell me how to completely recompile the fpc?
AFAIK, fpcmake is another beast: it creates a Makefile based on infos in
Makefile.fpc

"make cycle" should call the "make" executable, which reads "Makefile"
in the current folder and does stuff for the target "cycle" defined in
"Makefile".

however, never tried the go32v2 thing. only doing it on linux ..

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Steve Williams-3
In reply to this post by Andreas Berger
Andreas Berger wrote:
> I downloaded the latest snapshot and wish to recompile the fpc compiler
> for G032v2. I found an old doc that says to:
>   cd compiler
>   make cycle
>
> This obviously will not work since FPC has fpcmake and not make. There
> is also no makefile called cycle in the compiler folder. Can someone
> tell me how to completely recompile the fpc?
>  

http://www.freepascal.org/moreinfo.html contains a link to the Building FAQ
http://www.stack.nl/~marcov/buildfaq.pdf


--
Sly



This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Andreas Berger


Steve Williams wrote:

> Andreas Berger wrote:
>> I downloaded the latest snapshot and wish to recompile the fpc
>> compiler for G032v2. I found an old doc that says to:
>>   cd compiler
>>   make cycle
>>
>> This obviously will not work since FPC has fpcmake and not make.
>> There is also no makefile called cycle in the compiler folder. Can
>> someone tell me how to completely recompile the fpc?
>>  
>
> http://www.freepascal.org/moreinfo.html contains a link to the
> Building FAQ
> http://www.stack.nl/~marcov/buildfaq.pdf
>
Where would I download the GNU make.exe? It does not come with FPC.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Marco van de Voort
> Steve Williams wrote:
> > Andreas Berger wrote:
> >> I downloaded the latest snapshot and wish to recompile the fpc
> >> compiler for G032v2. I found an old doc that says to:
> >>   cd compiler
> >>   make cycle
> >>
> >> This obviously will not work since FPC has fpcmake and not make.
> >> There is also no makefile called cycle in the compiler folder. Can
> >> someone tell me how to completely recompile the fpc?
> >>  
> >
> > http://www.freepascal.org/moreinfo.html contains a link to the
> > Building FAQ
> > http://www.stack.nl/~marcov/buildfaq.pdf
> >
> Where would I download the GNU make.exe? It does not come with FPC.

It does. However only with the releases, not with the snapshots.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

RE: Compiling the compiler

Lee, John
Suggest you read these links - but from memory this is what you do. As was said before the utils are not included in snapshots- usually it's just the minimum there.

A) you need to download the latest go32v2 release which is 2.0.2 eg from ftpmaster.freepascal.org or another ftp site, from /pub/fpc/dist/i386-go32v2-2.0.2/

You then install this, and this gives you the correct version of all of the gnu utils you need and the released compiler that's used to start the make. The utils include make & ld - some others are used in the make too  

B) Then you download the latest v2.1 source from /pub/fpc/snapshot/v21/source/fpc.zip & unzip it into a suitable directory, or get latest sources from svn if you can use it. Then, with the utils from step A in your path you do the 'make cycle' in ...\compiler & away you go. As was explained before, the makefiles are generated in fpc by another program and are included in the source...  

Of course you can use B for making the latest v2.0 (ie v2.0.3) as well, with suitable directory name change above to v20...

BTW a new release 2.0.4, with a load of bug fixes, updates, is being prepared for release within next weeks - we are currently on rc2.  

Let us know if there are any problems & we may be able to use these to fix problems in the documentation for 2.0.4.  

Regards John

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Marco van
> de Voort
> Sent: 24 July 2006 17:05
> To: FPC-Pascal users discussions
> Subject: Re: [fpc-pascal] Compiling the compiler
>
>
> > Steve Williams wrote:
> > > Andreas Berger wrote:
> > >> I downloaded the latest snapshot and wish to recompile the fpc
> > >> compiler for G032v2. I found an old doc that says to:
> > >>   cd compiler
> > >>   make cycle
> > >>
> > >> This obviously will not work since FPC has fpcmake and not make.
> > >> There is also no makefile called cycle in the compiler
> folder. Can
> > >> someone tell me how to completely recompile the fpc?
> > >>  
> > >
> > > http://www.freepascal.org/moreinfo.html contains a link to the
> > > Building FAQ
> > > http://www.stack.nl/~marcov/buildfaq.pdf
> > >
> > Where would I download the GNU make.exe? It does not come with FPC.
>
> It does. However only with the releases, not with the snapshots.
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Andreas Berger


Lee, John wrote:

> Suggest you read these links - but from memory this is what you do. As was said before the utils are not included in snapshots- usually it's just the minimum there.
>
> A) you need to download the latest go32v2 release which is 2.0.2 eg from ftpmaster.freepascal.org or another ftp site, from /pub/fpc/dist/i386-go32v2-2.0.2/
>
> You then install this, and this gives you the correct version of all of the gnu utils you need and the released compiler that's used to start the make. The utils include make & ld - some others are used in the make too  
>
> B) Then you download the latest v2.1 source from /pub/fpc/snapshot/v21/source/fpc.zip & unzip it into a suitable directory, or get latest sources from svn if you can use it. Then, with the utils from step A in your path you do the 'make cycle' in ...\compiler & away you go. As was explained before, the makefiles are generated in fpc by another program and are included in the source...  
>
> Of course you can use B for making the latest v2.0 (ie v2.0.3) as well, with suitable directory name change above to v20...
>
> BTW a new release 2.0.4, with a load of bug fixes, updates, is being prepared for release within next weeks - we are currently on rc2.  
>  
Thanks for the clear instructions. This should really be in the FAQ or Wiki.

Just a few questions:
    - Will the 2.0.x tree be integrated into the 2.1.x tree?
    - Why are there two branches?
    - To integrate threading into DOS should I use 2.0.x or 2.1.x?

Regards,
Andreas

> Let us know if there are any problems & we may be able to use these to fix problems in the documentation for 2.0.4.  
>
> Regards John
>  
>> -----Original Message-----
>> From: [hidden email]
>> [mailto:[hidden email]]On Behalf Of Marco van
>> de Voort
>> Sent: 24 July 2006 17:05
>> To: FPC-Pascal users discussions
>> Subject: Re: [fpc-pascal] Compiling the compiler
>>
>>
>>    
>>> Steve Williams wrote:
>>>      
>>>> Andreas Berger wrote:
>>>>        
>>>>> I downloaded the latest snapshot and wish to recompile the fpc
>>>>> compiler for G032v2. I found an old doc that says to:
>>>>>   cd compiler
>>>>>   make cycle
>>>>>
>>>>> This obviously will not work since FPC has fpcmake and not make.
>>>>> There is also no makefile called cycle in the compiler
>>>>>          
>> folder. Can
>>    
>>>>> someone tell me how to completely recompile the fpc?
>>>>>  
>>>>>          
>>>> http://www.freepascal.org/moreinfo.html contains a link to the
>>>> Building FAQ
>>>> http://www.stack.nl/~marcov/buildfaq.pdf
>>>>
>>>>        
>>> Where would I download the GNU make.exe? It does not come with FPC.
>>>      
>> It does. However only with the releases, not with the snapshots.
>> _______________________________________________
>> fpc-pascal maillist  -  [hidden email]
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>
>>    
>
>
> This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
>
>  
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Michael Van Canneyt


On Mon, 24 Jul 2006, Andreas Berger wrote:

>
>
> > BTW a new release 2.0.4, with a load of bug fixes, updates, is being
> > prepared for release within next weeks - we are currently on rc2.  
> >
> Thanks for the clear instructions. This should really be in the FAQ or Wiki.
>
> Just a few questions:
> - Will the 2.0.x tree be integrated into the 2.1.x tree?

No. It's rather the reverse: fixes done in 2.1 are merged back to 2.0

> - Why are there two branches?

To keep new development (i.e. things that fall outside of fixes) out of
2.0.

> - To integrate threading into DOS should I use 2.0.x or 2.1.x?

2.1.x because 2.0.4 is the last 2.0 release.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Florian Klämpfl
Michael Van Canneyt wrote:
>
> 2.1.x because 2.0.4 is the last 2.0 release.

All new development is done in trunk or a branch of trunk. If things
prove that they are working, they are merged to fixes.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Andreas Berger
In reply to this post by Michael Van Canneyt
I have a problem compiling the compiler. After a lot of compilation it
attempts to compile pp.pas and I get the following error:
    pp.pas(213,1) Error: Entrypoint start not defined.

Regards,
Andreas

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Andreas Berger
Andreas Berger wrote:
> I have a problem compiling the compiler. After a lot of compilation it
> attempts to compile pp.pas and I get the following error:
>    pp.pas(213,1) Error: Entrypoint start not defined.
I downloaded todays snapshot and had the same problem. Then I compiled
using "make all" + "make install" instead of "make cycle" and it worked.
Is this correct? What does "make cycle" do exactly?

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Vincent Snijders
Andreas Berger schreef:
> Andreas Berger wrote:
>> I have a problem compiling the compiler. After a lot of compilation it
>> attempts to compile pp.pas and I get the following error:
>>    pp.pas(213,1) Error: Entrypoint start not defined.
> I downloaded todays snapshot and had the same problem. Then I compiled
> using "make all" + "make install" instead of "make cycle" and it worked.
> Is this correct? What does "make cycle" do exactly?

There is at least one difference.
If you do make cycle in the compiler directory, the fpc.cfg file is used.
If you do make all or make compiler_cycle in the fpc source directory (that contains
a compiler subdirectory), then no fpc.cfg file is used.

So maybe you should try make cycle OPT="-n"

Vincent
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

RE: Compiling the compiler

Lee, John
In reply to this post by Andreas Berger
This is a known error - I get it too - but I only get when using the v2.1.1 compiler to start make. Do you get it when starting with the v2.0.2 release compiler released too? What about trying a snapshot of v20 compiler eg base_go32_v20.zip or similar.

You can get more info with "opt=-va" on CL - If there is any more useful info in that send the lines to us.  

What system are you using for these makes? Dos? Win9x?

Regards John    

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]On Behalf Of Andreas
> Berger
> Sent: 24 July 2006 23:29
> To: FPC-Pascal users discussions
> Subject: Re: [fpc-pascal] Compiling the compiler
>
>
> I have a problem compiling the compiler. After a lot of
> compilation it
> attempts to compile pp.pas and I get the following error:
>     pp.pas(213,1) Error: Entrypoint start not defined.
>
> Regards,
> Andreas
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Andreas Berger
I am using the v20 base compiler with the v21 source. It should create a
v21 compiler.

I get the same error compiling under DOS, Win98 and Win2K

Regards, Andreas

Lee, John wrote:

> This is a known error - I get it too - but I only get when using the v2.1.1 compiler to start make. Do you get it when starting with the v2.0.2 release compiler released too? What about trying a snapshot of v20 compiler eg base_go32_v20.zip or similar.
>
> You can get more info with "opt=-va" on CL - If there is any more useful info in that send the lines to us.  
>
> What system are you using for these makes? Dos? Win9x?
>
>  
>> I have a problem compiling the compiler. After a lot of
>> compilation it
>> attempts to compile pp.pas and I get the following error:
>>     pp.pas(213,1) Error: Entrypoint start not defined.
>>
>> Regards,
>> Andreas
>>
>>    
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Andreas Berger
In reply to this post by Vincent Snijders
Vincent Snijders wrote:

> Andreas Berger schreef:
>> Andreas Berger wrote:
>>> I have a problem compiling the compiler. After a lot of compilation
>>> it attempts to compile pp.pas and I get the following error:
>>>    pp.pas(213,1) Error: Entrypoint start not defined.
>> I downloaded todays snapshot and had the same problem. Then I
>> compiled using "make all" + "make install" instead of "make cycle"
>> and it worked. Is this correct? What does "make cycle" do exactly?
>
> There is at least one difference.
> If you do make cycle in the compiler directory, the fpc.cfg file is used.
> If you do make all or make compiler_cycle in the fpc source directory
> (that contains a compiler subdirectory), then no fpc.cfg file is used.
>
> So maybe you should try make cycle OPT="-n"
>
Sorry, it gave the same error.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Florian Klämpfl
In reply to this post by Andreas Berger
Andreas Berger wrote:
> I am using the v20 base compiler

The only supported bootstrapping compiler is the last release compiler, i.e. 2.0.2.

> with the v21 source. It should create a
> v21 compiler.
>
> I get the same error compiling under DOS, Win98 and Win2K
>
> Regards, Andreas
>
> Lee, John wrote:
>> This is a known error - I get it too - but I only get when using the
>> v2.1.1 compiler to start make. Do you get it when starting with the
>> v2.0.2 release compiler released too? What about trying a snapshot of
>> v20 compiler eg base_go32_v20.zip or similar.
>>
>> You can get more info with "opt=-va" on CL - If there is any more
>> useful info in that send the lines to us.
>> What system are you using for these makes? Dos? Win9x?
>>  
>>> I have a problem compiling the compiler. After a lot of compilation
>>> it attempts to compile pp.pas and I get the following error:
>>>     pp.pas(213,1) Error: Entrypoint start not defined.
>>>
>>> Regards,
>>> Andreas
>>>
>>>    
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Andreas Berger
Florian Klaempfl wrote:
> Andreas Berger wrote:
>  
>> I am using the v20 base compiler
>>    
>
> The only supported bootstrapping compiler is the last release compiler, i.e. 2.0.2.
>  
That is what I am using.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Tomas Hajny
In reply to this post by Andreas Berger
Andreas Berger wrote:

> Vincent Snijders wrote:
>> Andreas Berger schreef:
>>> Andreas Berger wrote:
>>>> I have a problem compiling the compiler. After a lot of compilation
>>>> it attempts to compile pp.pas and I get the following error:
>>>>    pp.pas(213,1) Error: Entrypoint start not defined.
>>> I downloaded todays snapshot and had the same problem. Then I
>>> compiled using "make all" + "make install" instead of "make cycle"
>>> and it worked. Is this correct? What does "make cycle" do exactly?
>>
>> There is at least one difference.
>> If you do make cycle in the compiler directory, the fpc.cfg file is
>> used.
>> If you do make all or make compiler_cycle in the fpc source directory
>> (that contains a compiler subdirectory), then no fpc.cfg file is used.
>>
>> So maybe you should try make cycle OPT="-n"
>>
> Sorry, it gave the same error.

I assume you're compiling from trunk sources, right? Then we probably have
some bug in trunk compiler (binary writer/internal linker?). There's a
parameter for forcing external linker (in trunk compiler, not 2.0.2), you
can try that.

I can have a look at it later, but probably not before 2.0.4 is out.

Tomas

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Tomas Hajny
In reply to this post by Andreas Berger
On 25 Jul 06, at 16:45, Andreas Berger wrote:

> Vincent Snijders wrote:
> > Andreas Berger schreef:
> >> Andreas Berger wrote:
> >>> I have a problem compiling the compiler. After a lot of compilation
> >>> it attempts to compile pp.pas and I get the following error:
> >>>    pp.pas(213,1) Error: Entrypoint start not defined.
> >> I downloaded todays snapshot and had the same problem. Then I
> >> compiled using "make all" + "make install" instead of "make cycle"
> >> and it worked. Is this correct? What does "make cycle" do exactly?
> >
> > There is at least one difference.
> > If you do make cycle in the compiler directory, the fpc.cfg file is used.
> > If you do make all or make compiler_cycle in the fpc source directory
> > (that contains a compiler subdirectory), then no fpc.cfg file is used.
> >
> > So maybe you should try make cycle OPT="-n"
> >
> Sorry, it gave the same error.

No wonder. ;-) When using "make all", the new
(2.1.1) compiler is compiled using the starting
compiler (2.0.x). "Make cycle" tries to make sure
that the created compiler is still useable, at
least that useable that it can still build
itself. It does so by doing the same thing in a
cycle:

1) RTL and compiler (ppc1.exe) are compiled using
the starting compiler.

2) Everything except ppc1.exe is cleaned, RTL and
compiler (ppc2.exe) are compiled using ppc1.exe.

3) Everything except ppc2.exe is cleaned, RTL and
compiler (ppc3.exe) are compiled using ppc2.exe.

4) ppc2.exe and ppc3.exe are compared - they
should be equal. If they are the same, ppc3.exe
is renamed to ppc386.exe.

5) If you build more than just the compiler (e.g.
snapshot or release - i.e. this last step isn't
part of "make cycle" any more), the newly created
ppc386.exe is used for compilation of RTL, FCL,
FV, packages and IDE.

Tomas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling the compiler

Andreas Berger
Tomas Hajny wrote:

> No wonder. ;-) When using "make all", the new
> (2.1.1) compiler is compiled using the starting
> compiler (2.0.x). "Make cycle" tries to make sure
> that the created compiler is still useable, at
> least that useable that it can still build
> itself. It does so by doing the same thing in a
> cycle:
>
> 1) RTL and compiler (ppc1.exe) are compiled using
> the starting compiler.
>
> 2) Everything except ppc1.exe is cleaned, RTL and
> compiler (ppc2.exe) are compiled using ppc1.exe.
>
> 3) Everything except ppc2.exe is cleaned, RTL and
> compiler (ppc3.exe) are compiled using ppc2.exe.
>
> 4) ppc2.exe and ppc3.exe are compared - they
> should be equal. If they are the same, ppc3.exe
> is renamed to ppc386.exe.
>
> 5) If you build more than just the compiler (e.g.
> snapshot or release - i.e. this last step isn't
> part of "make cycle" any more), the newly created
> ppc386.exe is used for compilation of RTL, FCL,
> FV, packages and IDE.
>  
So you mean that the newly created compiler is giving the error?

Andreas

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
12