Sign in Join

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

Mailing lists / lazarus / 2011-07

Building Lazarus for Windows

18 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

Frank Church

I had a go buidling Lazarus with this short script

set oldpath=%PATH%

Show quoted text 10 lines
PATH=M:\Lazarus\Binutils;%PATH% make clean all PP=M:\FreePascal\251_17989\bin\i386-win32\ppc386.exe make install INSTALL_PREFIX=M:\LazarusExes\binaries\0931_30714 PP=M:\FreePascal\251_17989\bin\i386-win32\ppc386.exe PATH=%oldpath%

It appears to compile okay except adding packages to the IDE doesn't work. It goes through the steps okay, but nothing get's added to the IDE

Is this all I need to compile Lazarus? Lazarus was installed in c:\lazarus rather than M:\LazarusExes\binaries\0931_30714 where I wanted it.

Are there some additional options to the build I missed out?

Is the source for building the windows snapshots available?

Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110716/586e2da9/attachment-0001.html>

Reply by email

Felipe Monteiro de Carvalho
to Frank Church

Try this:

set oldpath=%PATH%
PATH=M:\Lazarus\Binutils;%PATH%
make clean
make pkgide PP=M:\FreePascal\251_17989\bin\i386-win32\ppc386.exe make install INSTALL_PREFIX=M:\LazarusExes\binaries\0931_30714 PP=M:\FreePascal\251_17989\bin\i386-win32\ppc386.exe PATH=%oldpath%

Although the make install is strange, I never use that for Lazarus.

Felipe Monteiro de Carvalho

Reply by email

Frank Church
to Felipe Monteiro de Carvalho

On 16 July 2011 17:05, Felipe Monteiro de Carvalho <

Show quoted text 15 lines
wrote: Try this: set oldpath=%PATH% PATH=M:\Lazarus\Binutils;%PATH% make clean make pkgide PP=M:\FreePascal\251_17989\bin\i386-win32\ppc386.exe make install INSTALL_PREFIX=M:\LazarusExes\binaries\0931_30714 PP=M:\FreePascal\251_17989\bin\i386-win32\ppc386.exe PATH=%oldpath% Although the make install is strange, I never use that for Lazarus.

What command do use for installing it to your chosen location?

Show quoted text 9 lines
-- Felipe Monteiro de Carvalho -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110716/7d726ce6/attachment.html>

Reply by email

Felipe Monteiro de Carvalho
to Frank Church

2011/7/16 Frank Church :

What command do use for installing it to your chosen location?

None. For me it is already in the place that I want it ... where the source code is.

I just make a shortcut to call it with a local primary config file and then I set the path to the compiler in the environment options dialog.

Felipe Monteiro de Carvalho

Reply by email

Marcos Douglas
to Frank Church: I had a go buidling Lazarus with this short script set oldpath=%PATH% It appears to…

2011/7/16 Frank Church

Show quoted text 26 lines
I had a go buidling Lazarus with this short script > > set oldpath=%PATH% > > PATH=M:\Lazarus\Binutils;%PATH% > > make clean all PP=M:\FreePascal\251_17989\bin\i386-win32\ppc386.exe > > make install INSTALL_PREFIX=M:\LazarusExes\binaries\0931_30714? PP=M:\FreePascal\251_17989\bin\i386-win32\ppc386.exe > > PATH=%oldpath% It appears to compile okay except adding packages to the IDE doesn't work. It goes through the steps okay, but nothing get's added to the IDE Is this all I need to compile Lazarus?? Lazarus was installed in c:\lazarus rather than M:\LazarusExes\binaries\0931_30714? where I wanted it. Are there some additional options to the build? I missed out? Is the source for building the windows snapshots available?

See this:
http://wiki.lazarus.freepascal.org/Installing_Lazarus#Compiling.2Finstalling_FPC_and_Lazarus_from_Sources_of_SVN_.28Win32.29

After you got the lazarus.exe, just use the IDE to compile it self and your packages installed.

Marcos Douglas

Reply by email

Frank Church
to Marcos Douglas
Marcos Douglas wrote 44 lines
2011/7/16 Frank Church > > I had a go buidling Lazarus with this short script >> >> set oldpath=%PATH% >> >> PATH=M:\Lazarus\Binutils;%PATH% >> >> make clean all PP=M:\FreePascal\251_17989\bin\i386-win32\ppc386.exe >> >> make install INSTALL_PREFIX=M:\LazarusExes\binaries\0931_30714 PP=M:\FreePascal\251_17989\bin\i386-win32\ppc386.exe >> >> PATH=%oldpath% > > > > It appears to compile okay except adding packages to the IDE doesn't work. It goes through the steps okay, but nothing get's added to the IDE > > Is this all I need to compile Lazarus? Lazarus was installed in c:\lazarus rather than M:\LazarusExes\binaries\0931_30714 where I wanted it. > > > > Are there some additional options to the build I missed out? > > > > Is the source for building the windows snapshots available? See this: http://wiki.lazarus.freepascal.org/Installing_Lazarus#Compiling.2Finstalling_FPC_and_Lazarus_from_Sources_of_SVN_.28Win32.29 After you got the lazarus.exe, just use the IDE to compile it self and your packages installed. Marcos Douglas -- _____

I am getting a whole load of errors when I try to recompile it. **** 1887 error during make ****.

If it is a worthwhile hint, the Help About dialog does not show the SVN version, unless it is because I deleted the .svn folders to make it a smaller download

In relation to the inadequate information on the wiki, the source code for building the Lazarus snapshots must be out there somewhere.

Is it available in Lazarus repository? That will be a whole lot better than the trial and error process Lazarus users go through every day.

Show quoted text 5 lines
__________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110717/9b0d884e/attachment.html>

Reply by email

Bart
to Frank Church

You must be doing something wrong then.

* Assuming fpc binaries and binutils are in %path%
* After updating the sources from svn:

cd \path_to_lazarus_sources
make clean all OPT='-gl'

that should be all.
(Then in Lazarus IDE set compiler to the same one you used to build Lazarus, or things go wrong.)

Done that hundreds of times on WinME.

Bart

PS. If you are in bad luck, the sources will not build, because there is an error in latest trunk.
Most of the times pretty easy to find out what and where and then patch it (and report in Mantis)

Frank Church wrote 76 lines
On 16 July 2011 23:22, Marcos Douglas wrote: > 2011/7/16 Frank Church > > > > I had a go buidling Lazarus with this short script > >> > >> set oldpath=%PATH% > >> > >> PATH=M:\Lazarus\Binutils;%PATH% > >> > >> make clean all PP=M:\FreePascal\251_17989\bin\i386-win32\ppc386.exe > >> > >> make install INSTALL_PREFIX=M:\LazarusExes\binaries\0931_30714 > PP=M:\FreePascal\251_17989\bin\i386-win32\ppc386.exe > >> > >> PATH=%oldpath% > > > > > > > > It appears to compile okay except adding packages to the IDE doesn't > work. It goes through the steps okay, but nothing get's added to the IDE > > > > Is this all I need to compile Lazarus? Lazarus was installed in > c:\lazarus rather than M:\LazarusExes\binaries\0931_30714 where I wanted > it. > > > > > > > > Are there some additional options to the build I missed out? > > > > > > > > Is the source for building the windows snapshots available? > > See this: > > http://wiki.lazarus.freepascal.org/Installing_Lazarus#Compiling.2Finstalling_FPC_and_Lazarus_from_Sources_of_SVN_.28Win32.29 > > After you got the lazarus.exe, just use the IDE to compile it self and > your packages installed. > > Marcos Douglas > > -- > _____ > I am getting a whole load of errors when I try to recompile it. **** 1887 error during make ****. If it is a worthwhile hint, the Help About dialog does not show the SVN version, unless it is because I deleted the .svn folders to make it a smaller download In relation to the inadequate information on the wiki, the source code for building the Lazarus snapshots must be out there somewhere. Is it available in Lazarus repository? That will be a whole lot better than the trial and error process Lazarus users go through every day. > __________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- Frank Church ======================= http://devblog.brahmancreations.com

Reply by email

Frank Church
to Bart
Bart wrote 66 lines
You must be doing something wrong then. * Assuming fpc binaries and binutils are in %path% * After updating the sources from svn: cd \path_to_lazarus_sources make clean all OPT='-gl' that should be all. (Then in Lazarus IDE set compiler to the same one you used to build Lazarus, or things go wrong.) Done that hundreds of times on WinME. Bart PS. If you are in bad luck, the sources will not build, because there is an error in latest trunk. Most of the times pretty easy to find out what and where and then patch it (and report in Mantis) On 7/17/11, Frank Church wrote: > On 16 July 2011 23:22, Marcos Douglas wrote: > >> 2011/7/16 Frank Church >> > >> > I had a go buidling Lazarus with this short script >> >> >> >> set oldpath=%PATH% >> >> >> >> PATH=M:\Lazarus\Binutils;%PATH% >> >> >> >> make clean all PP=M:\FreePascal\251_17989\bin\i386-win32\ppc386.exe >> >> >> >> make install INSTALL_PREFIX=M:\LazarusExes\binaries\0931_30714 >> PP=M:\FreePascal\251_17989\bin\i386-win32\ppc386.exe >> >> >> >> PATH=%oldpath% >> > >> > >> > >> > It appears to compile okay except adding packages to the IDE doesn't >> work. It goes through the steps okay, but nothing get's added to the IDE >> > >> > Is this all I need to compile Lazarus? Lazarus was installed in >> c:\lazarus rather than M:\LazarusExes\binaries\0931_30714 where I wanted >> it. >> > >> > >> > >> > Are there some additional options to the build I missed out? >> > >> > >> > >> > Is the source for building the windows snapshots available? >> >> See this: >> >> http://wiki.lazarus.freepascal.org/Installing_Lazarus#Compiling.2Finstalling_FPC_and_Lazarus_from_Sources_of_SVN_.28Win32.29 >> >> After you got the lazarus.exe, just use the IDE to compile it self and >> your packages installed. >>

What of the installation phase, when you have to copy the Lazarus build to the location of your choice, which is not c:\lazarus?

I have it working near perfectly for on Linux, how do you accomplish that on Windows.

It looks like the responses are for installing into c:\lazarus, which is what happened in my build until I used the INSTALL_PREFIX option.

As I mentioned earlier if the snapshots are built flawlessly every time, then there is a script that does it and can make things simpler for everyone else.

INSTALL_PREFIX works fine with Linux.

I'll have another go and get back with the results.

Show quoted text 44 lines
> Marcos Douglas >> >> -- >> _____ >> > > I am getting a whole load of errors when I try to recompile it. **** 1887 > error during make ****. > > If it is a worthwhile hint, the Help About dialog does not show the SVN > version, unless it is because I deleted the .svn folders to make it a > smaller download > > > In relation to the inadequate information on the wiki, the source code for > building the Lazarus snapshots must be out there somewhere. > > Is it available in Lazarus repository? That will be a whole lot better than > the trial and error process Lazarus users go through every day. > > >> __________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> > > > > -- > Frank Church > > ======================= > http://devblog.brahmancreations.com > -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110717/3a81ccbf/attachment-0001.html>

Reply by email

Bart
to Frank Church: What of the installation phase, when you have to copy the Lazarus build to the location…
Frank Church wrote
What of the installation phase, when you have to copy the Lazarus build to the location of your choice, which is not c:\lazarus?

Well I have a simple setup:

I do not use snapshots for Lazarus.
I only have the sources.
I installed Fpc (currently 2.4.4) from binaries.

All the Lazarus sources are in
H:\Programmas\SvnLaz
This is where the makefile for Lazarus is.

Fpc and the binutils are in
H:\Programmas\Fpc\bin\i386-win32
(The Fpc setup program put them there)
(I have only one (stable) fpc, so my setup is very simple)

I have three batchfiles to controll the update and build process:

lazup.bat
-------------------------------------
@echo off
set oldpath=%path%
set path=E:\Programma's\Subversion\bin
H:
cd \Programmas\SvnLaz
REM Show current dir
cd
copy /y ide\revision.inc ide\revision.old > nul
svn update
SET PATH=%oldpath%
---------------------------------------

LazRevision.bat:
---------------------------------------
@echo off
set oldpath=%path%
set path=E:\Programma's\Subversion\bin
H:
cd \Programmas\SvnLaz
REM Show current dir
cd
H:
cd \Programmas\SvnLaz
F:\LazarusProjecten\svn2revision\svn2revisioninc -v H:\Programmas\SvnLaz H:\Programmas\SvnLaz\ide\revision.inc set PATH=%oldpath%
---------------------------------------

and finally

LazMake.bat
---------------------------------------
@echo off
set oldpath=%path%
H:
cd \Programmas\SvnLaz
set path=h:\programmas\fpc\bin\i386-win32
make clean all OPT=-gl
SET PATH=%oldpath%
---------------------------------------

After all that, the new lazarus is built in H:\Programmas\LazSvn.

INSTALL_PREFIX works fine with Linux.

I never needed that with my setup.

Bart

Reply by email

Marcos Douglas
to Frank Church: What of the installation phase, when you have to copy the Lazarus build to the location…

2011/7/17 Frank Church :

What of the installation phase, when you have to copy the Lazarus build to the location of your choice, which is not c:\lazarus?

These scripts won't "install" FPC/Lazarus, but they both work fine after. You can change the path to something do you want... of course! I made these scripts (with help of FPC/Laz community) but I don't install they in c:\freepascal because this is just an example.

Marcos Douglas

Reply by email

Frank Church
to leledumbo: Lazarus' makefile is different from FPC, it expects LAZARUS_INSTALL_DIR instead of…
leledumbo wrote
Lazarus' makefile is different from FPC, it expects LAZARUS_INSTALL_DIR instead of INSTALL_PREFIX for installation location

I use INSTALL_PREFIX on LInux and it works every time.

Does the Tools | Build IDE create a batch file that can be run step by step to check the result?

Does it use some commands which may be duplicated by other programs on the path?

Is there a way to check that?

Does the ..\fpc\2.4.0\bin\i386-win32 directory contain all the secondary utilities required by Lazarus and FreePascal to work correctly?

To be frank (no pun intended) I think this approach of depending on the wiki to build Lazarus is wrong. If the code for building the snapshots is somewhere in the repository we should be able to look at it and adapt it. After all it is tested everyday, can install into any location and works correctly every time (not sure about this though ;) ).

> View this message in context: > http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Building-Lazarus-for-Windows-tp3174724p3176979.html > Sent from the Free Pascal - Lazarus mailing list . > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110718/0fa7349e/attachment.html>

Reply by email

Frank Church
to Frank Church
Frank Church wrote 29 lines
On 17 July 2011 16:31, leledumbo wrote: > Lazarus' makefile is different from FPC, it expects LAZARUS_INSTALL_DIR > instead of INSTALL_PREFIX for installation location > > I use INSTALL_PREFIX on LInux and it works every time. Does the Tools | Build IDE create a batch file that can be run step by step to check the result? Does it use some commands which may be duplicated by other programs on the path? Is there a way to check that? Does the ..\fpc\2.4.0\bin\i386-win32 directory contain all the secondary utilities required by Lazarus and FreePascal to work correctly? To be frank (no pun intended) I think this approach of depending on the wiki to build Lazarus is wrong. If the code for building the snapshots is somewhere in the repository we should be able to look at it and adapt it. After all it is tested everyday, can install into any location and works correctly every time (not sure about this though ;) ).

I noticed that the Make path was empty, and after comparing to the other installations it seems that the ..\fpc\bin\i386-32 did not contain the full set of files. There were only 48 files the compared with the 70 or so in the others, and make was one of the missing ones. The package recompile was using the wrong set of utilities. The problem may have been in the FPC compilation. So back to the drawing board on that.

Show quoted text 21 lines
-- > View this message in context: > http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Building-Lazarus-for-Windows-tp3174724p3176979.html > Sent from the Free Pascal - Lazarus mailing list . > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- Frank Church ======================= http://devblog.brahmancreations.com
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110718/35204089/attachment.html>

Reply by email

Marcos Douglas
to Frank Church

2011/7/18 Frank Church :

Show quoted text 7 lines
I noticed that the Make path was empty, and after comparing to the other installations it seems that the ..\fpc\bin\i386-32 did not contain the full set of files. There were only 48 files the compared with the 70 or so in the others, and make was one of the missing ones. The package recompile was using the wrong set of utilities. The problem may have been in the FPC compilation. So back to the drawing board on that.

Did you do each step this tutorial?
Try do not change anything. Just follow the tuturial.

The binaries in ..\fpc\bin\i386-32 are made by Make. If you do not compile FPC with success some files may not have been generated.

Marcos Douglas

Reply by email

Mark Morgan Lloyd
to Marcos Douglas
Marcos Douglas wrote 13 lines
2011/7/18 Frank Church : > I noticed that the Make path was empty, and after comparing to the other > installations it seems that the ..\fpc\bin\i386-32 did not contain the full > set of files. There were only 48 files the compared with the 70 or so in the > others, and make was one of the missing ones. The package recompile was > using the wrong set of utilities. The problem may have been in the FPC > compilation. So back to the drawing board on that. Did you do each step this tutorial? Try do not change anything. Just follow the tuturial. The binaries in ..\fpc\bin\i386-32 are made by Make. If you do not compile FPC with success some files may not have been generated.

I've just completed a build of 2.4.4 on W2K, and after completion found that the binaries directory didn't include make etc. so I added a directory from the source tree to my path.

I also noticed that "make install" had failed (silently) to build an fpc.cfg, presumably because it couldn't find gcc.

I also noticed that the fpc.cfg that the 2.4.2 binary installer created had an explicit reference to 2.4.2, rather than using $fpcversion.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Marcos Douglas
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 21 lines
Marcos Douglas wrote: > > 2011/7/18 Frank Church : >> >> I noticed that the Make path was empty, and after comparing to the other >> installations it seems that the ..\fpc\bin\i386-32 did not contain the full >> set of files. There were only 48 files the compared with the 70 or so in the >> others, and make was one of the missing ones. The package recompile was >> using the wrong set of utilities. The problem may have been in the FPC >> compilation. So back to the drawing board on that. > > Did you do each step this tutorial? > Try do not change anything. Just follow the tuturial. > > The binaries in ..\fpc\bin\i386-32 are made by Make. If you do not > compile FPC with success some files may not have been generated. I've just completed a build of 2.4.4 on W2K, and after completion found that the binaries directory didn't include make etc. so I added a directory from the source tree to my path.

The tools (make, etc) are here:
http://svn.freepascal.org/svn/fpcbuild/branches/fixes_2_4/install/binw32

See the tutorial:
http://wiki.lazarus.freepascal.org/Installing_Lazarus#STEP_.231:_Create_directories_and_get_the_sources

I also noticed that "make install" had failed (silently) to build an fpc.cfg, presumably because it couldn't find gcc.

If you didn't download the binutils (fpcbuild) you do not have make tool (for Windows).

I also noticed that the fpc.cfg that the 2.4.2 binary installer created had an explicit reference to 2.4.2, rather than using $fpcversion.

To create fpc.cfg, use fpcmkcfg tool. But I also do not use . See the tutorial:
http://wiki.lazarus.freepascal.org/Installing_Lazarus#STEP_.234:_Create_fpc.cfg_file

Marcos Douglas

Reply by email

Mark Morgan Lloyd
to Marcos Douglas
Marcos Douglas wrote 37 lines
On Mon, Jul 18, 2011 at 11:30 AM, Mark Morgan Lloyd wrote: > Marcos Douglas wrote: >> 2011/7/18 Frank Church : >>> I noticed that the Make path was empty, and after comparing to the other >>> installations it seems that the ..\fpc\bin\i386-32 did not contain the full >>> set of files. There were only 48 files the compared with the 70 or so in the >>> others, and make was one of the missing ones. The package recompile was >>> using the wrong set of utilities. The problem may have been in the FPC >>> compilation. So back to the drawing board on that. >> Did you do each step this tutorial? >> Try do not change anything. Just follow the tuturial. >> >> The binaries in ..\fpc\bin\i386-32 are made by Make. If you do not >> compile FPC with success some files may not have been generated. > I've just completed a build of 2.4.4 on W2K, and after completion > found that the binaries directory didn't include make etc. so I added > a directory from the source tree to my path. The tools (make, etc) are here: http://svn.freepascal.org/svn/fpcbuild/branches/fixes_2_4/install/binw32 See the tutorial: http://wiki.lazarus.freepascal.org/Installing_Lazarus#STEP_.231:_Create_directories_and_get_the_sources > I also noticed that "make install" had failed (silently) to build an fpc.cfg, presumably because it couldn't find gcc. > If you didn't download the binutils (fpcbuild) you do not have make tool (for Windows). > I also noticed that the fpc.cfg that the 2.4.2 binary installer created had an explicit reference to 2.4.2, rather than using $fpcversion. > To create fpc.cfg, use fpcmkcfg tool. But I also do not use . See the tutorial: http://wiki.lazarus.freepascal.org/Installing_Lazarus#STEP_.234:_Create_fpc.cfg_file

No doubt. But Windows is not one of my major platforms, and the build from 2.4.4 (as distinct from fixes_2_4) appears to be incomplete when compared with the build from 2.4.2.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Marcos Douglas
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
No doubt. But Windows is not one of my major platforms, and the build from 2.4.4 (as distinct from fixes_2_4) appears to be incomplete when compared with the build from 2.4.2.

I don't know explain that.
BTW, the fixes_2_4 has the 2.4.5 version, not 2.4.4.

Marcos Douglas

Reply by email