Sign in Join

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

Mailing lists / fpc-pascal / 2010-10

Build scripts for Freepascal and Lazarus compilation from source

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Frank Church
to Honza
Honza wrote 16 lines
2010/10/3 Frank Church : > I have posted an article and some code on some bash scripts I have developed > to install FPC and Lazarus from source at > http://devblog.brahmancreations.com/content/build-scripts-for-installing-freepascal-and-lazarus-from-source . > > Any comments and tips are well come. Oops: Access denied You are not authorized to access this page.

I've fixed it now.

A few minor improvements are coming.

> bflm > freepascal-bits.blogspot.com > _______________________________________________ > fpc-pascal maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > -- Frank Church ======================= http://devblog.brahmancreations.com

Reply by email

Matthias K.
to Frank Church: I have posted an article and some code on some bash scripts I have developed to install…

Hi,

there is one improvement to this.
The first pass for the new compiler doesn't need "make all" which compiles all packages too. This results in
duplicate package compilation on changes and packages take most time. The following lines are part of an old fpc 2.4 gentoo ebuild I use, which compiles the rtl/compiler with system compiler and compiles rtl/packages/utils with the new compiler afterwards. Those only rtl is compiled 2 times:

# first pass, compile the new compiler with system compiler (no cycle, must be same target)
make rtl
make compiler

# second pass, compile rtl/utils/packages with new compiler make PP=${FPC_BUILD_DIR}/compiler/${PPCNAME} rtl_clean make PP=${FPC_BUILD_DIR}/compiler/${PPCNAME} rtl packages_all utils # second pass could also be "make PP=... all"
...
make PP=... install

for further information see
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-lang/fpc/fpc-2.4.0.ebuild?view=markup in src_compile and src_install functions

Frank Church wrote 17 lines
I have posted an article and some code on some bash scripts I have developed to install FPC and Lazarus from source at http://devblog.brahmancreations.com/content/build-scripts-for-installing-freepascal-and-lazarus-from-source. Any comments and tips are well come. -- Frank Church ======================= http://devblog.brahmancreations.com _______________________________________________ fpc-pascal maillist  -   http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Jonas Maebe
to Matthias K.
Matthias K. wrote 17 lines
there is one improvement to this. The first pass for the new compiler doesn't need "make all" which compiles all packages too. This results in duplicate package compilation on changes and packages take most time. The following lines are part of an old fpc 2.4 gentoo ebuild I use, which compiles the rtl/compiler with system compiler and compiles rtl/packages/utils with the new compiler afterwards. Those only rtl is compiled 2 times: # first pass, compile the new compiler with system compiler (no cycle, must be same target) make rtl make compiler # second pass, compile rtl/utils/packages with new compiler make PP=${FPC_BUILD_DIR}/compiler/${PPCNAME} rtl_clean make PP=${FPC_BUILD_DIR}/compiler/${PPCNAME} rtl packages_all utils

That is wrong, unless your starting compiler is exactly the same version as the compiler that you are compiling. The compiler needs a full cycle to guarantee that it's fully up-to-date, as some things may only be activated/fixed during the second compile (in case new features are added or bugs are fixed using such new features).

That said, the blog post indeed contains superfluous steps. As far as I can tell, this part can simply be removed:

***
#make again, using new build, rather than using SYSTEM_FPC_COMPILER make all PP=${FPC_INSTALL_DIR}/lib/fpc/${FPCVER}/${PPCNAME}

# move current install out of the way
mv ${FPC_INSTALL_DIR} ${FPC_INSTALL_DIR}_backup
# mv ${FPC_INSTALL_DIR}/lib/fpc/${FPCVER} ${FPC_INSTALL_DIR}/lib/fpc/$ {FPCVER}_backup

#install using current compiler
make install PP=${FPC_BUILD_DIR}/compiler/${PPCNAME} INSTALL_PREFIX=$ {FPC_INSTALL_DIR}
***

"make all" starts with a "make cycle" exactly to make sure that you don't have to start everything again using the newly built compiler once you're done.

Jonas

Reply by email

Matthias K.
to Jonas Maebe
Jonas Maebe wrote 26 lines
On 05 Oct 2010, at 15:40, Matthias K. wrote: > there is one improvement to this. > The first pass for the new compiler doesn't need "make all" which > compiles all packages too. This results in > duplicate package compilation on changes and packages take most time. > The following lines are part of an old fpc 2.4 gentoo ebuild I use, > which compiles the rtl/compiler with system compiler and compiles > rtl/packages/utils with the new compiler afterwards. Those only rtl is > compiled 2 times: > > # first pass, compile the new compiler with system compiler (no cycle, > must be same target) > make rtl > make compiler > > # second pass, compile rtl/utils/packages with new compiler > make PP=${FPC_BUILD_DIR}/compiler/${PPCNAME} rtl_clean > make PP=${FPC_BUILD_DIR}/compiler/${PPCNAME} rtl packages_all utils That is wrong, unless your starting compiler is exactly the same version as the compiler that you are compiling. The compiler needs a full cycle to guarantee that it's fully up-to-date, as some things may only be activated/fixed during the second compile (in case new features are added or bugs are fixed using such new features).

thx for the information, simplifies things quite a bit..

Show quoted text 27 lines
That said, the blog post indeed contains superfluous steps. As far as I can tell, this part can simply be removed: *** #make again, using new build, rather than using SYSTEM_FPC_COMPILER make all PP=${FPC_INSTALL_DIR}/lib/fpc/${FPCVER}/${PPCNAME} # move current install out of the way mv ${FPC_INSTALL_DIR} ${FPC_INSTALL_DIR}_backup # mv ${FPC_INSTALL_DIR}/lib/fpc/${FPCVER} ${FPC_INSTALL_DIR}/lib/fpc/${FPCVER}_backup #install using current compiler make install PP=${FPC_BUILD_DIR}/compiler/${PPCNAME} INSTALL_PREFIX=${FPC_INSTALL_DIR} *** "make all" starts with a "make cycle" exactly to make sure that you don't have to start everything again using the newly built compiler once you're done. Jonas _______________________________________________ fpc-pascal maillist  -   http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Frank Church
to Frank Church: I have posted an article and some code on some bash scripts I have developed to install…
Frank Church wrote 9 lines
I have posted an article and some code on some bash scripts I have developed to install FPC and Lazarus from source at http://devblog.brahmancreations.com/content/build-scripts-for-installing-freepascal-and-lazarus-from-source . Any comments and tips are well come.

Today I have add a few notes and comments to the script to help those new to FPC/Lazarus compilation and some of the Linux tools involved to understand what is going on.

Regards

Show quoted text 6 lines
-- Frank Church ======================= http://devblog.brahmancreations.com
Frank Church ======================= http://devblog.brahmancreations.com

Reply by email