Recent

Author Topic: Compiling FPC fromSVN  (Read 24134 times)

sandeep_c24

  • Full Member
  • ***
  • Posts: 114
Compiling FPC fromSVN
« on: October 20, 2010, 01:06:05 am »
I want to use latest version of FPC from svn and I have downloaded the source using svn but I haven't been able to google for instruction on how to compile fpc and then lazarus.

Could anyone give me a batch file or simple instruction on how to do this?

Regards

Sandeep


sandeep_c24

  • Full Member
  • ***
  • Posts: 114
Re: Compiling FPC fromSVN
« Reply #2 on: October 20, 2010, 03:04:47 am »
It all seems a bit too hard to compile fpc from Source on windows.

What does this mean

Quote
See: http://www.freepascal.org/down/i386/win32.var . Download FPC as one big file, unzip it and run the install.exe.

Could someone show there batch file that they use to compile FPC on windows.

Regards

Sandeep

sandeep_c24

  • Full Member
  • ***
  • Posts: 114
Re: Compiling FPC fromSVN
« Reply #3 on: October 20, 2010, 03:07:39 am »
Could someone put all the files need for compiling in the FPC svn so that anyone who wants to compile FPC from source can just checkout using svn and run a batch file to compile it.

Sandeep

bobo

  • Full Member
  • ***
  • Posts: 171
Re: Compiling FPC fromSVN
« Reply #4 on: October 20, 2010, 03:46:53 am »
If you do not have an installed FPC on your system then you can download an installer from
ftp://ftp.freepascal.org/pub/fpc/dist/2.4.0/...win64.exe  or win32  and install it "custom" with utils, make maybe somehthing else, I dont remember now.
Then if fpc is in the path, you can go to your checked out svn source and compile then install it.
Then make sure the search path points to the newly compiled fpc to compile fpc and lazarus after svn updates.
(make all,  make install, make clean)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Compiling FPC fromSVN
« Reply #5 on: October 20, 2010, 07:47:58 am »
My batchfile is inside this document:


http://www.stack.nl/~marcov/buildfaq.pdf

beefycoder

  • New Member
  • *
  • Posts: 24
Re: Compiling FPC fromSVN
« Reply #6 on: October 23, 2010, 01:42:07 pm »
I too am trying to build newest version of lazarus and freepascal from svn.

I tried reading through all documents relating to this, but i got lost in discussions of what branches there are, all possible target platforms,
what file name extensions are used ...

As much as i can see right now, the is very little useful information for people wanting to do this on windows xp 32 bit.

I tried following docs on retrieving from svn and it worked up to the point where i needed to do a "make". Ofcourse, it failed since there was no mention on where make.exe should come from. No links, no advice.

After looking around, this is what i have managed so far to complete :

1. install tortoisesvn client
2. get lazarus from http://svn.freepascal.org/svn/lazarus/trunk in C:\lazarus
3. get fpc from http://svn.freepascal.org/svn/fpc/trunk in C:\lazarus\freepascal (i did the job, but on end it failed with some error about svndiff not parsed or reconginzed or decompressed...)
4. executing make, failed because no such exe is found
5. get fpc-2.4.0.i386-win32.exe and install
6. open cmd and set working directory to C:\lazarus
7. execute make, success (some notes and warnings here and there)
8. change working directory to C:\lazarus\freepascal
9. execute make, failed with
Code: [Select]
make: *** No targets specified and no makefile found.  Stop.10. after manually entering sub-directories and doing make (some passed, some failed) i gave up and
11. tried to run C:\lazarus\startlazarus.exe
12. it worked, but got warning that "Freepascal directory was not found."
13. as per help from message i go to Environment -> Environment Options -> Files and try to set directory
14. tried to add folder C:\lazarus\freepascal  itself and it's subfolders, but every time i get warning
Code: [Select]
The FPC source directory [directory i selected] does not look correct. Normally it contains directories like rtl/inc, packages/fcl-base, ...
15. and indeed, there are not such subfolders (are they supposed to be created with that failed  "make" ?)

Also, when trying to update C:\lazarus\freepascal from http://svn.freepascal.org/svn/fpc/trunk i got some error about body not recognized and connection termination.

If this fails i will have no other alternative than to re-install original "lazarus-0.9.28.2-fpc-2.2.4-win32.exe"  setup package for windows.

On a positive note, Lazarus is, for me, the only free RAD/IDE that works out of the box.
I tried Code::Blocks and CodeLite, both suffered from severe malfunctioning, ranging from installing of additional packages to just to get them working, up to basic inability to produce even a simple GUI form from wizard without intervention (manual tweaks, fixes, avoiding some options, all had to be looked up in forums...).
« Last Edit: October 23, 2010, 02:21:50 pm by beefycoder »

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Compiling FPC fromSVN
« Reply #7 on: October 23, 2010, 01:49:13 pm »
Quote
The FPC source directory [directory i selected] does not look correct. Normally it contains directories like rtl/inc, packages/fcl-base, ...

You need to select the subdirectory "source" of directory "fpc".

I think Lazarus could find this directory by itself, but for now it does not. You need to select the appropriate FPC installation and find SOURCE subdirectory.
« Last Edit: October 23, 2010, 01:54:07 pm by typo »

beefycoder

  • New Member
  • *
  • Posts: 24
Re: Compiling FPC fromSVN
« Reply #8 on: October 23, 2010, 02:31:11 pm »
I did not found folder named "source" in svn checkout of http://svn.freepascal.org/svn/fpc/trunk .

I did svn update and still no such folder exists.

Also, TortoiseSVN reported at end of update
Code: [Select]
REPORT of '/svn/fpc/!svn/vcc/default': Could not read response body: connection was closed by server (http://svn.freepascal.org)
Finish!

It seems to have completed but this error makes me doubt if SVN is working properly at all, so all i get is corrupted folder structure.
« Last Edit: October 23, 2010, 02:38:03 pm by beefycoder »

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Compiling FPC fromSVN
« Reply #9 on: October 23, 2010, 02:51:42 pm »

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
Re: Compiling FPC fromSVN
« Reply #10 on: October 23, 2010, 03:02:00 pm »
there is no directory source.

When you do a checkout, you need to specify where to put the checked-out sources. THe directory you specified is the "source" dir lazarus needs
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

typo

  • Hero Member
  • *****
  • Posts: 3051
Re: Compiling FPC fromSVN
« Reply #11 on: October 23, 2010, 03:05:02 pm »
Yes. He refered specifically to an error message of the Environment dialog.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Compiling FPC fromSVN
« Reply #12 on: October 23, 2010, 03:12:24 pm »
The trouble is that shorter tutorials have been tried, and failed miserably, because users had no background info what to do if something minor went wrong (and with daily snapshots, something always can go wrong)


3. get fpc from http://svn.freepascal.org/svn/fpc/trunk in C:\lazarus\freepascal (i did the job, but on end it failed with some error about svndiff not parsed or reconginzed or decompressed...)

Very big checkouts sometimes fail on connections that are not perfect. Simply right click on the dir and do "SVN update" to continue.

Quote from: beefycoder
4. executing make, failed because no such exe is found
5. get fpc-2.4.0.i386-win32.exe and install
6. open cmd and set working directory to C:\lazarus
7. execute make, success (some notes and warnings here and there)

Step 7 is totally wrong if you want a lazarus with fpc/trunk. This because this compiles lazarus with the default compiler (which is 2.4.0 according to your sequence)

Quote
8. change working directory to C:\lazarus\freepascal
9. execute make, failed with
Code: [Select]
make: *** No targets specified and no makefile found.  Stop.

Use "make all".

But better, read the buildfaq above (complete with ready to run batchfiles) on how to install a snapshot. Only when FPC 2.5.1 is installed, is default in the path (fpc shows "2.5.1"), and can compile a hello world program, continue with lazarus.

« Last Edit: October 24, 2010, 09:38:35 am by marcov »

beefycoder

  • New Member
  • *
  • Posts: 24
Re: Compiling FPC fromSVN
« Reply #13 on: October 23, 2010, 07:06:23 pm »
Thank you for patience, because i had almost none of it.

The way setup packages are deployed in windows, can make a user quite lazy  ::)

I have re-read a PDF on installing and compiling lazarus from svn, and found a part where it gets to bussiness.

Note : I don't know if i have to blame TortoiseSVN  for it, but i did get on end of retrieving lazarus trunk a following error message:

Code: [Select]
Decompression of svndiff data failed
Also, i have run update on it and i see a lot of new sources added. Is that normal for SVN to have such massive updates in such short time ?

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Compiling FPC fromSVN
« Reply #14 on: October 23, 2010, 08:27:53 pm »
Note : I don't know if i have to blame TortoiseSVN  for it, but i did get on end of retrieving lazarus trunk a following error message:

Code: [Select]
Decompression of svndiff data failed
Also, i have run update on it and i see a lot of new sources added. Is that normal for SVN to have such massive updates in such short time ?

Yes you can blame TortoiseSVN. It did the same thing for me and other people have reported it, too. "Update" was the right solution, it fetched the rest of the files.
I never had such problems on Linux (my development platform) so it must be a TortoiseSVN bug.

Juha
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018