Sign in Join

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

Mailing lists / lazarus / 2011-08

The right way of installing FPC to use with Lazarus?

11 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

Fr0sT

Hello all.
I spent many time compiling FPC trunk to use with Lazarus trunk (succeeded after all) but still in doubts what's the right and simplest way of doing that? In other words, what make option would do the job?
Lazarus requires rtl and package sources to lay inside <FPC>\sources while FPC provides them inside fpcsrc folder.
- singlezipinstall option doesn't copy these folders
- sourceinstall does but ignores binaries
- install copies only binaries
Moreover none of the options generates fpc.cfg which is necessary for Lazarus to operate.

So I wonder how people compile fresh FPC releases to use with Lazarus and is there some king of automating scripts?

I also wonder why there's no complete build guide somewhere in the website or README or somewhere else so that people could just follow the instructons and get what they want (I've read Installing Lazarus on the wiki indeed ? it lacks some aspects).

Reply by email

Marcos Douglas
to Fr0sT
Fr0sT wrote 20 lines
Hello all. I spent many time compiling FPC trunk to use with Lazarus trunk (succeeded after all) but still in doubts what's the right and simplest way of doing that? In other words, what make option would do the job? Lazarus requires rtl and package sources to lay inside <FPC>\sources while FPC provides them inside fpcsrc folder. - singlezipinstall option doesn't copy these folders - sourceinstall does but ignores binaries - install copies only binaries Moreover none of the options generates fpc.cfg which is necessary for Lazarus to operate. So I wonder how people compile fresh FPC releases to use with Lazarus and is there some king of automating scripts? I also wonder why there's no complete build guide somewhere in the website or README or somewhere else so that people could just follow the instructons and get what they want (I've read Installing Lazarus on the wiki indeed ? it lacks some aspects).

What operational system do you use?
If you use Windows, try this:
http://wiki.freepascal.org/Installing_Lazarus#Compiling.2Finstalling_FPC_and_Lazarus_from_Sources_of_SVN_.28Win32.29

Marcos Douglas

Reply by email

Fr0sT

Marcos, thanks for answering. Sorry I didn't mention OS - I use WinXP32 and also tried compiling for Winx64.
I've read the page you mentioned already (haven't tried all the actions though) but I doubt that it will create needed source folders (but I'll test it anyway).
But manual is still incomplete. Nothing is said about:
- libgdb - where people could find it, what version to download?
- gdb.exe to enable Lazarus bebugger - the same
- x64 compilation - when trying to compile for x64 (under x32 OS) I received error "no *.dll, *.ico, *.h in ....\binw64" - what's this and how can one deal with that? (I just copied stuff from binw32 folder but it's hardly a proper way)

Reply by email

Marcos Douglas
to Fr0sT
Fr0sT wrote 12 lines
Marcos, thanks for answering. Sorry I didn't mention OS - I use WinXP32 and also tried compiling for Winx64. I've read the page you mentioned already (haven't tried all the actions though) but I doubt that it will create needed source folders (but I'll test it anyway). But manual is still incomplete. Nothing is said about: - libgdb - where people could find it, what version to download? - gdb.exe to enable Lazarus bebugger - the same - x64 compilation - when trying to compile for x64 (under x32 OS) I received error "no *.dll, *.ico, *.h in ....\binw64" - what's this and how can one deal with that? (I just copied stuff from binw32 folder but it's hardly a proper way)

1. You need creates the folders manually:
http://wiki.freepascal.org/Installing_Lazarus#STEP_.231:_Create_directories_and_get_the_sources

2. All binaries tools like gdb.exe, etc are in /install/binw32, again: http://wiki.freepascal.org/Installing_Lazarus#STEP_.231:_Create_directories_and_get_the_sources

3. Please, just follow the tutorial one step at a time and you go on.

Marcos Douglas

PS: I created this tutorial and I used them to compile my FPC so, it works. For multiples versions, just change the FPC's version number in the script).

Reply by email

Hans-Peter Diettrich
to Fr0sT: Marcos, thanks for answering. Sorry I didn't mention OS - I use WinXP32 and also tried…
Show quoted text 8 lines
Marcos, thanks for answering. Sorry I didn't mention OS - I use WinXP32 and also tried compiling for Winx64. I've read the page you mentioned already (haven't tried all the actions though) but I doubt that it will create needed source folders (but I'll test it anyway). But manual is still incomplete. Nothing is said about: - libgdb - where people could find it, what version to download? - gdb.exe to enable Lazarus bebugger - the same

That's why the preferred way of a (first) install is the complete Lazarus install. Later on the installed FPC can be used to install further copies (make install ...).

Since many (GNU/MinGW) tools are not built by FPC, it's up to you to retrieve or create these binaries.

- x64 compilation - when trying to compile for x64 (under x32 OS) I received error "no *.dll, *.ico, *.h in ....\binw64" - what's this and how can one deal with that? (I just copied stuff from binw32 folder but it's hardly a proper way)

AFAIK FPC defaults to 32 bit on Win64. Explicit configuration seems to be required for building 64 bit stuff. It's highly recommended to replace the default PATH entirely, so that no unwanted references to e.g. 32 bit apps (fpc\...\bin) can occur. Eventually fpc.exe should be removed or renamed, to prevent unwanted guesses about 32/64 bit generation (use PP=... instead).

DoDi

Reply by email

leledumbo
to Fr0sT: Hello all. I spent many time compiling FPC trunk to use with Lazarus trunk (succeeded…
Lazarus requires rtl and package sources to lay inside <FPC>\sources while

FPC provides them inside fpcsrc folder.

Huh? Isn't it configurable in environment options? I kept FPC binaries, FPC source code, and Lazarus (can't be separated between binaries and source code) in their own directories. That way I don't need to have multiple copy of FPC source code in each of my Lazarus installation (I use both Windows and Linux) and upgrading is much easier.

Reply by email

Fr0sT
to Hans-Peter Diettrich: That's why the preferred way of a (first) install is the complete Lazarus install. Later…

Well, I've done all the steps. Marcos, thanks for the patience.
1. I think "pause" clauses should be added to the end of the bat scripts provided in Wiki in order to see if something wrong happened.
2. As I expected, LibGDB absence made FPC units to compile without it. Am I right guessing this means I couldn't step into these units while debugging (something like turning "use debug DCU's" off in Delphi)? Seems that FPC IDE will lack debug capability at all ("LibGDB was not found, IDE has no Debugger support") but who cares...
3. fpc.cfg chapter in the Wiki, I think the first incorrect example should be removed leaving only the right one. Now it causes a confusion.
4. Concerning source folders: sorry, my fault. The structure of previously installed FPC (only \bin, \doc, \examples, \msg, \source, \units and that's all) confused me. Of course one may set "source dir" option to FPC dir itself.
5. When I launched freshly built Lazarus first time and tried to debug a trivial app with breakpoint, I got AV. Rebuilding Lazarus from itself with profile "IDE with optimization" solved the problem.

Hans-Peter Diettrich wrote 8 lines
That's why the preferred way of a (first) install is the complete Lazarus install. Later on the installed FPC can be used to install further copies (make install ...). Since many (GNU/MinGW) tools are not built by FPC, it's up to you to retrieve or create these binaries.

Ahh, I got it. Thanks!

Reply by email

Mark Morgan Lloyd
to Fr0sT
Fr0sT wrote 5 lines
2. As I expected, LibGDB absence made FPC units to compile without it. Am I right guessing this means I couldn't step into these units while debugging (something like turning "use debug DCU's" off in Delphi)? Seems that FPC IDE will lack debug capability at all ("LibGDB was not found, IDE has no Debugger support") but who cares...

As I understand it, libgdb is for the text-mode IDE that comes with the FPC compiler, and isn't used by Lazarus. I've managed to build it from source for most platforms I've got here (the exceptions being ARM Linux and SPARC Solaris) but it's not pleasant and recently I've not been trying.

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 Fr0sT: Well, I've done all the steps. Marcos, thanks for the patience. 1. I think "pause"…
Fr0sT wrote
Well, I've done all the steps. Marcos, thanks for the patience.

Don't worry, I help will you as they did with me too.

1. I think "pause" clauses should be added to the end of the bat scripts provided in Wiki in order to see if something wrong happened.

Before run scripts, you must to enter in command line. ;-)

Show quoted text 5 lines
2. As I expected, LibGDB absence made FPC units to compile without it. Am I right guessing this means I couldn't step into these units while debugging (something like turning "use debug DCU's" off in Delphi)? Seems that FPC IDE will lack debug capability at all ("LibGDB was not found, IDE has no Debugger support") but who cares...

What do you talk about? Forget this... you did not install the FPC yet.

3. fpc.cfg chapter in the Wiki, I think the first incorrect example should be removed leaving only the right one. Now it causes a confusion.

Somebody added this instructions after. I suggest create the fpc.cfg file manually (copy and paste from wiki).

4. Concerning source folders: sorry, my fault. The structure of previously installed FPC (only \bin, \doc, \examples, \msg, \source, \units and that's all) confused me. Of course one may set "source dir" option to FPC dir itself.

Sorry. Because another thread in fpc-devel list, I knew I had an error in script to compile FPC. However I changed FPC and Lazarus scripts. Can you test again, please?
http://wiki.freepascal.org/Installing_Lazarus#Compiling.2Finstalling_FPC_and_Lazarus_from_Sources_of_SVN_.28Win32.29

5. When I launched freshly built Lazarus first time and tried to debug a trivial app with breakpoint, I got AV. Rebuilding Lazarus from itself with profile "IDE with optimization" solved the problem.

So, did you installed the Lazarus and FPC?!

Marcos Douglas

Reply by email

Fr0sT
to Marcos Douglas
Mark Morgan Lloyd wrote 7 lines
As I understand it, libgdb is for the text-mode IDE that comes with the FPC compiler, and isn't used by Lazarus. I've managed to build it from source for most platforms I've got here (the exceptions being ARM Linux and SPARC Solaris) but it's not pleasant and recently I've not been trying.

Glad to hear that, minus one dependency.

Marcos Douglas wrote
Before run scripts, you must to enter in command line. ;-)

Yup, that's a variant too :)

What do you talk about? Forget this... you did not install the FPC yet. Yeah, I already realized libgdb doesn't matter

Can you test again, please?
I'll do, as soon as I finish some digging in the Lazarus code modifying it for my purposes :)

So, did you installed the Lazarus and FPC?!
Yes, except the AV I mentioned everything's fine. Now I even managed to launch and debug one copy of Lazarus under another copy of Lazarus :)

Reply by email