Sign in Join

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

Mailing lists / lazarus / 2009-12

Install from sources

16 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

Kjow

Hi,

I'm on a new/fresh Ubuntu 9.10 x86 installation. I want to install fpc/lazarus from sources and I'm following these instructions: http://wiki.freepascal.org/Installing_Lazarus

I downloaded today's snapshots of FPC Sources (
ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/source/fpc.zip ), Lazarus Sources (
http://snapshots.lazarus.shikami.org/files/lazarus-0.9.29-23043-20091209-src.zip ) and precompiled FPC (
http://snapshots.lazarus.shikami.org/files/fpc-2.2.4-20091209.i386.rpm ).

I put on "/home/kjow/lazarus/" lazarus sources and on "/home/kjow/lazarus/fpc/2.5.1" FPC sources.
In "/home/kjow/fpc_tools/" I have:
- binutils-2.20 sources
- fpc-2.2.4-20091209.i386.rpm

Following this guide:
http://wiki.freepascal.org/Installing_Lazarus#Installing_Free_Pascal_under_Linux.2FBSD_manually

In terminal I did:

1) sudo alien -i -c /home/kjow/fpc_tools/fpc-2.2.4-20091209.i386.rpm
2) ppc386 -i (2.2.4 installed ok)
3) cd /home/kjow/lazarus/fpc/2.5.1
4) make all OPT='-gl -O3p3' PP=/usr/bin/ppc386

and then:

/usr/local/bin/ld: warning: ./link.res contains output sections; did you forget -T?
/usr/local/bin/ld: cannot find -lncurses
fp.pas(575,1) Error: Error while linking
fp.pas(575,1) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted
make[4]: *** [fp] Error 1
make[4]: Leaving directory `/home/kjow/lazarus/fpc/2.5.1/ide' make[3]: *** [buildfp] Error 2
make[3]: Leaving directory `/home/kjow/lazarus/fpc/2.5.1/ide' make[2]: *** [gdb] Error 2
make[2]: Leaving directory `/home/kjow/lazarus/fpc/2.5.1/ide' make[1]: *** [ide_all] Error 2
make[1]: Leaving directory `/home/kjow/lazarus/fpc/2.5.1' make: *** [build-stamp.i386-linux] Error 2

with:

kjow at kjw-linux-vm:~/lazarus/fpc/2.5.1$ which ld /usr/local/bin/ld
kjow at kjw-linux-vm:~/lazarus/fpc/2.5.1$ ld -v
GNU ld (GNU Binutils) 2.20

I read that there is a bug in 2.19 binutils (
http://www.freepascal.org/faq.var#unix-ld219 ), but it should be already fixed (and I'm using 2.20). Originally it used "binutils for Ubuntu" that came with new installation of ubuntu (with the same results), but i replaced with "generic" GNU/binutils-2.20

How can I install FPC from daily snapshot sources?

Thank you!

Reply by email

Mattias Gärtner
to Kjow

Zitat von Kjow :

[...] /usr/local/bin/ld: cannot find -lncurses

This means the linker can not find the library ncurses on your system. Download and install it from whatever BSD package repositories you prefer.

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gärtner
Mattias G?rtner wrote 5 lines
> [...] > /usr/local/bin/ld: cannot find -lncurses This means the linker can not find the library ncurses on your system. Download and install it from whatever BSD package repositories you prefer.

And under Linux that would normally be the *-dev (development) packages. On my Ubuntu 9.04 system that would be libncurses5-dev package.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Kjow
to Graeme Geldenhuys

2009/12/9 Graeme Geldenhuys :

And under Linux that would normally be the *-dev (development) packages. On my Ubuntu 9.04 system that would be libncurses5-dev package.

Thank you both!

sudo apt-get install libncurses5-dev

and it seems to compile right:

~/lazarus/fpc/2.5.1$ ppc386 -i
Free Pascal Compiler version 2.5.1

Compiler Date : 2009/12/09
Compiler CPU Target: i386

Supported targets:
...

Thank you!

Reply by email

Kjow
to Kjow: I'm on a new/fresh Ubuntu 9.10 x86 installation. I want to install fpc/lazarus from…

2009/12/9 Kjow :

1) sudo alien -i -c /home/kjow/fpc_tools/fpc-2.2.4-20091209.i386.rpm 2) ppc386 -i (2.2.4 installed ok) 3) cd /home/kjow/lazarus/fpc/2.5.1 4) make all OPT='-gl -O3p3' PP=/usr/bin/ppc386

5) sudo make install PP=/usr/bin/ppc386 PREFIX=/usr
6) sudo rm /usr/bin/ppc386
7) sudo ln -s /usr/lib/fpc/2.5.1/ppc386 /usr/bin/ppc386
8) sudo ln -sf /home/kjow/lazarus/fpc/2.5.1/ /usr/share/fpcsrc
9) sudo /usr/lib/fpc/2.5.1/samplecfg /usr/lib/fpc/2.5.1/ /etc

FPC seems to be installed right.

Lazarus:

1) cd ~/lazarus
2) make clean all

...
...
Compiling idecmdline.pas
Linking ../lazarus
/usr/local/bin/ld: warning: ../link.res contains output sections; did you forget -T?
/usr/local/bin/ld: cannot find -lX11
lazarus.pp(130,1) Error: Error while linking
lazarus.pp(130,1) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted
make[2]: *** [lazarus] Error 1
make[2]: Leaving directory `/home/kjow/lazarus/ide' make[1]: *** [ide] Error 2
make[1]: Leaving directory `/home/kjow/lazarus/ide' make: *** [ide] Error 2

Why can't it find X11? How to do?

Thank you again!

Reply by email

Kjow
to Kjow

2009/12/9 Kjow :

/usr/local/bin/ld: cannot find -lX11

Sorry for flooding...

I tried (and it worked) with installation of two dependencies: libXp-dev libgtk2.0-dev

Now Lazarus starts :)

Reply by email

Vincent Snijders
to Kjow
Kjow wrote 5 lines
2009/12/9 Vincent Snijders : > Why did you use alien on a rpm instead of installing the debs? Because it is a smaller download (for this purpuse) and it has simpler management (no unpack and one file instead 19 files). :)

I see. I think if you used the debs and a package manager, the package manager would have installed the ncurses lib.

Vincent

Reply by email

Graeme Geldenhuys
to Kjow: 2009/12/9 Kjow : Sorry for flooding... I tried (and it worked) with installation of two…
Kjow wrote 7 lines
2009/12/9 Kjow : > /usr/local/bin/ld: cannot find -lX11 Sorry for flooding... I tried (and it worked) with installation of two dependencies: libXp-dev libgtk2.0-dev

Yeah, the dependency rule is tricky in the beginning, until know what the error means.
Under Linux with linking errors.
required packages = 'lib' + <whatever package it error mentioned> + '-dev'

 $ sudo apt-get install <required package>

Luckily apt pulls in all other requirements. Thank goodness the days of manually figuring out .rpm or Slackware's .tar.gz package dependencies are long gone. Long live APT! :-)

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Kjow: 2009/12/9 Vincent Snijders : Because it is a smaller download (for this purpuse) and it…
Kjow wrote
Because it is a smaller download (for this purpuse) and it has simpler management (no unpack and one file instead 19 files). :)

I also don't know why they decided to split FPC into so many .deb packages. As a developer, you would want all those anyway, so why not save everybody the trouble and simply distribute it as a single fpc-2.2.4-i386.deb??

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Reimar Grabowski
to Graeme Geldenhuys
I also don't know why they decided to split FPC into so many .deb packages.

AFAIK it is because of the Debian packaging rules.

R.

A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?

Reply by email

Graeme Geldenhuys
to Reimar Grabowski
Reimar Grabowski wrote 5 lines
On Thu, 10 Dec 2009 08:35:54 +0200 Graeme Geldenhuys wrote: > I also don't know why they decided to split FPC into so many .deb packages. AFAIK it is because of the Debian packaging rules.

Well, FPC is one product, so it should be one package. But then I don't know Debian packaging rules or what they consider a single package on not.

So how is Lazarus packaged?

lazarus-lcl
lazarus-report
lazarus-codetools
lazarus-synedit
lazarus-ide
lazarus-component-xxx
lazarus-component-xxx

???? As far as I know, Lazarus is 3 packages: docs, ide and src.

ide encapsulates all the individual parts: components, synedit, codetools etc. which makes the ide work

fpc-compiler should also encapsulate: rtl, lcl etc. everything use as a compiler
fpc-docs: the name says it all
fpc-src: the name says it all.

So at most, FPC should also only be 3 packages, not 19! The FCL is an integral part of FPC so it should be packaged as such.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Mattias Gärtner
to Graeme Geldenhuys

Zitat von Graeme Geldenhuys :

Show quoted text 9 lines
Reimar Grabowski wrote: > On Thu, 10 Dec 2009 08:35:54 +0200 > Graeme Geldenhuys wrote: > >> I also don't know why they decided to split FPC into so many .deb packages. > AFAIK it is because of the Debian packaging rules. Well, FPC is one product, so it should be one package. But then I don't know Debian packaging rules or what they consider a single package on not.

Debian packaging rule is simple but strict:
A unit mysql.ppu needs mysql files, so some mysql package is required.

Show quoted text 9 lines
So how is Lazarus packaged? lazarus-lcl lazarus-report lazarus-codetools lazarus-synedit lazarus-ide lazarus-component-xxx lazarus-component-xxx

codetools and synedit are "components" too. They should follow the same name scheme as say sqldb.

???? As far as I know, Lazarus is 3 packages: docs, ide and src.

Yes, and probably they will split it into more.
Don't forget they do the packages for their repositories, so the number of packages is irrelevant. You just use "apt-get install lazarus" and the rest is installed automatically. That's the only purpose of their packages.
They don't care about "alien", or single file downloads.

Show quoted text 10 lines
ide encapsulates all the individual parts: components, synedit, codetools etc. which makes the ide work fpc-compiler should also encapsulate: rtl, lcl etc. everything use as a compiler fpc-docs: the name says it all fpc-src: the name says it all. So at most, FPC should also only be 3 packages, not 19! The FCL is an integral part of FPC so it should be packaged as such.

Mattias

Reply by email

Mattias Gaertner
to Graeme Geldenhuys: I also don't know why they decided to split FPC into so many .deb packages. As a…
Show quoted text 8 lines
Kjow wrote: > > Because it is a smaller download (for this purpuse) and it has simpler > management (no unpack and one file instead 19 files). :) I also don't know why they decided to split FPC into so many .deb packages. As a developer, you would want all those anyway, so why not save everybody the trouble and simply distribute it as a single fpc-2.2.4-i386.deb??

AFAIK
It's debian policy that if installing a mysql unit it has all it needs. And the number of packages is irrelevant, since you only install the top package and the package manager fetches the rest automatically.
This debian packages are not made for single file installers.

Mattias

Reply by email