Recent

Author Topic: Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).  (Read 23133 times)

HappyLarry

  • Full Member
  • ***
  • Posts: 151
Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).
« on: September 16, 2011, 07:02:35 pm »
I am trying to install FreePascal 2.4.4. on Ubuntu 10.04 LTS. I have extracted the files from the download file  fpc-2.4.4.i386 and ran the installation script with

~$ sudo sh install.sh

I answered yes to all the defaults. Everything seemed to be OK. However when I look in Synaptic to see if it really has been installed, then there is nothing showing that it is because the checkboxes are clear.

I tried
$ dpkg -l | grep fpc
in a terminal and nothing showed.

I tried
~$ which fpc
/usr/bin/fpc

I am new to Linux.
Is it installed or not?

Use Lazarus and Free Pascal and stand on the shoulders of giants . . . very generous giants. Thank you.

Rails

  • Guest
Re: Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).
« Reply #1 on: September 16, 2011, 07:10:23 pm »
I am trying to install FreePascal 2.4.4. on Ubuntu 10.04 LTS. I have extracted the files from the download file  fpc-2.4.4.i386 and ran the installation script with

.
.
.

I am new to Linux.
Is it installed or not?

It appears to be installed. Try typing fpc into a console. If it is installed, the compiler will respond with a help page. That, however, doesn't guarantee it is installed fully or properly. For that, you will have to try using it.

If you install something outside your distro's package manager, you very well may not find it with the package manager. If you installed from a script, versus a .deb, the package manager, or its GUI (Synaptic), will never find it.

« Last Edit: September 16, 2011, 07:16:47 pm by Rails »

HappyLarry

  • Full Member
  • ***
  • Posts: 151
Re: Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).
« Reply #2 on: September 16, 2011, 07:31:02 pm »
Thanks.

I have just tried to install Lazarus 0.9.30 on top of Free Pascal by downloading
 lazarus-0.9.30-i386.deb.tar
extracting it by double clicking - then in a terminal executing
 $ sudo dpkg -i *.deb

Lazarus then appears to install except:

---------------------------------------------------------
dpkg: dependency problems prevent configuration of lcl-qt4-0.9.30:
 lcl-qt4-0.9.30 depends on libqt4pas-dev; however:
  Package libqt4pas-dev is not installed.
dpkg: error processing lcl-qt4-0.9.30 (--install):
 dependency problems - leaving unconfigured
Setting up lcl-units-0.9.30 (0.9.30-0) ...
Setting up lcl-utils-0.9.30 (0.9.30-0) ...
update-alternatives: using /usr/lib/lazarus/0.9.30 to provide /usr/lib/lazarus/default (lazarus) in auto mode.

Processing triggers for man-db ...
Setting up lcl-0.9.30 (0.9.30-0) ...
Setting up lazarus-ide-0.9.30 (0.9.30-0) ...
update-alternatives: using /usr/lib/lazarus/0.9.30/startlazarus to provide /usr/bin/lazarus-ide (lazarus-ide) in auto mode.

Setting up lazarus-ide-qt4-0.9.30 (0.9.30-0) ...
Processing triggers for doc-base ...
Processing 1 added doc-base file(s)...
Registering documents with scrollkeeper...
Processing triggers for desktop-file-utils ...
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_GB.utf8.cache...
Setting up lazarus-0.9.30 (0.9.30-0) ...
Setting up lazarus-ide-gtk2-0.9.30 (0.9.30-0) ...
update-alternatives: using /usr/lib/lazarus/0.9.30/lazarus-gtk2 to provide /usr/lib/lazarus/0.9.30/lazarus (lazarus-0.9.30) in auto mode.

Processing triggers for python-support ...
Errors were encountered while processing:
 lcl-qt4-0.9.30

------------------------------------------------------------
When I try to run Lazarus, as it starts I get

The current Free Pascal source directory "/usr/share/fpcsrc/$(FPCVER)/"
does not look correct.
Choose Ok to choose the default "".
Otherwise check Environment -> Environment Options -> Files


and when I create a simple application I get the error message

Error: unit not found: Classes.

These errors seem to suggest that there is something wrong with the Free Pascal installation.

This is a fresh installation of Lucid.

Any ideas?





« Last Edit: September 16, 2011, 07:40:43 pm by HappyLarry »
Use Lazarus and Free Pascal and stand on the shoulders of giants . . . very generous giants. Thank you.

Rails

  • Guest
Re: Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).
« Reply #3 on: September 16, 2011, 07:50:44 pm »

Any ideas?

Well, you have at least one dependency problem, and probably other issues as well.

May I ask why you didn't simply install Laz and FPascal using your package manager, especially since you are new to Linux? Synaptic would have flagged any dependency problems before you installed. Generally, they resolve after a day or two when the package maintainers get all their stuff uploaded to the archive after a change.  Now you have a system in which your package manager is at least partially unaware of a major software component (the compiler). It will have no way of knowing if some future update will screw up your dependencies. Even if you get Laz up and running now, you may have serious breakage in the future because of this. The whole point of package managers is to keep everything in sync all playing happily together, not to mention offloading some serious system administration issues from the users.

I suggest you consider uninstalling FPascal, and maybe Laz too, then reinstalling both programs using Synaptic, at least until you gain experience administering a Linux system.
.   
« Last Edit: September 16, 2011, 07:56:16 pm by Rails »

HappyLarry

  • Full Member
  • ***
  • Posts: 151
Re: Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).
« Reply #4 on: September 16, 2011, 08:01:33 pm »
The problem is that Lucid will install Lazarus 0.9.28 through Synaptic and I need to use 0.9.30 because that is the version that I have to use at work ( school network). You can't open programs written in 0.9.30 using 0.9.28.

What surprises me is that Lazarus won't install properly  on a fresh installation of Lucid. I have made a partition specially and installed Lucid and have virtually nothing else on it. If it doesn't install properly this should be made clear in the wiki. This must have happened to lots of Lazarus users who use Lucid. I have just followed the guidance on the website.
Use Lazarus and Free Pascal and stand on the shoulders of giants . . . very generous giants. Thank you.

Rails

  • Guest
Re: Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).
« Reply #5 on: September 16, 2011, 08:17:53 pm »
OK, start by tracking down libqt4pas-dev. It is missing. See if it available thru your package manager. If it is, install it. You may find it conflicts with something else, though, which could leave you with a hard choice. If it isn't, you will have to get it from somewhere else. It is in the Debian unstable repository for sure. It may be available somewhere else in Ubuntu land. Make sure you get anything it is dependent on as well.

In general, I think you may be trying to install a version of Laz/FP that is a bit too up to date for that version of Ununtu.

If you aren't hung up on Ubuntu, Laz 0.9.30 is in the Debian unstable repository and installs fine. Or you could switch to a later version of Ubuntu, assuming there is one.
« Last Edit: September 16, 2011, 08:28:05 pm by Rails »

HappyLarry

  • Full Member
  • ***
  • Posts: 151
Re: Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).
« Reply #6 on: September 16, 2011, 08:39:28 pm »
Thanks for your reply - I came to the same conclusion (it seems like several lifetimes ago!). I have already tried this - with FP2.4.2 installed. The result was that I got several dependency errors for libqt4pas5. I then downloaded and  installed the files  needed for that but got more dependency errors including for libqtwebkit4. I tried installing this but got still more errors.

I ran update manager before I tried all this so  assume my system is up to date.

Here is the output:

dpkg: dependency problems prevent configuration of libqt4pas5:
 libqt4pas5 depends on libqtcore4 (>= 4:4.7.0~beta2); however:
  Version of libqtcore4 on system is 4:4.6.2-0ubuntu5.2.
dpkg: error processing libqt4pas5 (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libqtwebkit4:
 libqtwebkit4 depends on libphonon4 (>= 4:4.6.0); however:
  Package libphonon4 is not installed.
 libqtwebkit4 depends on libqt4-network (>= 4:4.7.0~beta1); however:
  Version of libqt4-network on system is 4:4.6.2-0ubuntu5.2.
 libqtwebkit4 depends on libqtcore4 (>= 4:4.7.0~beta1); however:
  Version of libqtcore4 on system is 4:4.6.2-0ubuntu5.2.
 libqtwebkit4 depends on libqtgui4 (>= 4:4.7.0~beta2); however:
  Version of libqtgui4 on system is 4:4.6.2-0ubuntu5.2.
 libqtwebkit4 depends on libsqlite3-0 (>= 3.7.2); however:
  Version of libsqlite3-0 on system is 3.6.22-1.
 libqtwebkit4 depends on phonon; however:
  Package phonon is not installed.
dpkg: error processing libqtwebkit4 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libqt4pas5
 libqtwebkit4

Although this was with Free  Pascal 2.4.2 it's basically the same problem.  I can't face all of that again - life is too short. I had hoped that things might just go better with 2.4.4.

As a matter of interest when I installed 2.4.2 it did show up in Synaptic as installed. That's why I don't think that 2.4.4. is properly installed.

Has anyone ever installed Lazarus 0.9.30 on Lucid? If so how? What exactly have I done wrong in the installation?

... and thanks for your suggestions Rails.

Use Lazarus and Free Pascal and stand on the shoulders of giants . . . very generous giants. Thank you.

Rails

  • Guest
Re: Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).
« Reply #7 on: September 16, 2011, 08:53:47 pm »
Was 2.4.2 installed from a deb or RPM (using Alien)? If it was, it should show up in Synaptic. 2.4.4 seems to have been installed from a script. In that case, it would not show up. I suspect that is the difference.



« Last Edit: September 16, 2011, 08:55:55 pm by Rails »

HappyLarry

  • Full Member
  • ***
  • Posts: 151
Re: Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).
« Reply #8 on: September 16, 2011, 09:06:20 pm »
2.4.2 was installed from
fpc_2.4.2-0.i386 deb.tar
using dpkg.

2.4.4 was installed from the  script install.sh that comes with it.

So perhaps 2.4.4. is properly installed.
When I tried to run it it with
$fpc
 it looked OK.

But why would Lazarus say that

The current Free Pascal source directory "/usr/share/fpcsrc/$(FPCVER)/"
does not look correct.


as soon as I start Lazarus?

« Last Edit: September 16, 2011, 09:09:47 pm by HappyLarry »
Use Lazarus and Free Pascal and stand on the shoulders of giants . . . very generous giants. Thank you.

Rails

  • Guest
Re: Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).
« Reply #9 on: September 16, 2011, 09:35:03 pm »
2.4.2 was installed from
fpc_2.4.2-0.i386 deb.tar
using dpkg.

2.4.4 was installed from the  script install.sh that comes with it.

So perhaps 2.4.4. is properly installed.
When I tried to run it it with
$fpc
 it looked OK.

But why would Lazarus say that

The current Free Pascal source directory "/usr/share/fpcsrc/$(FPCVER)/"
does not look correct.


as soon as I start Lazarus?

What is in that directory? Mine has subdirectory 2.4.4, which holds subdirectories compiler, packages, and rtl. I suspect that Laz is looking for something in particular in one of those directories and isn't finding it. Or possibly, there is something left over from 2.4.2 that shouldn't be there.

Edit: You did install the fpc source as well as the binaries, right? Lazarus requires it, in case you weren't aware of that.
 
« Last Edit: September 17, 2011, 12:04:32 am by Rails »

HappyLarry

  • Full Member
  • ***
  • Posts: 151
Re: Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).
« Reply #10 on: September 17, 2011, 10:33:46 am »
There is no folder /usr/share.

I installed Free Pascal using the download
fpc-2.4.4.i386
and running the install script that comes with it.

Does this install the fpcsrc? I assume it does but how do I  check?  If it does, then it doesn't seem to install it where Lazarus expects.

When I ran the install script I answered using the default values. SO I pressed return to the question

Quote
This shell script will attempt to install the Free Pascal Compiler
version 2.4.4 with the items you select

Install prefix (/usr or /usr/local)  [/usr] :

Was that right?

When I run fpc at a terminal I get
Quote
$ fpc
Free Pascal Compiler version 2.4.4 [2011/04/22] for i386
Copyright (c) 1993-2010 by Florian Klaempfl
/usr/lib/fpc/2.4.4/ppc386 [options] <inputfile> [options]
« Last Edit: September 17, 2011, 10:50:06 am by HappyLarry »
Use Lazarus and Free Pascal and stand on the shoulders of giants . . . very generous giants. Thank you.

Rails

  • Guest
Re: Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).
« Reply #11 on: September 17, 2011, 11:15:53 am »
There is no folder /usr/share.



That would be very unusual on any Linux system that I know of.

Try this at the command line:

Code: [Select]

sudo updatedb

sudo locate fpcsrc


Normally, you would not need the sudo on the second line, but use it just in case the source ended up someplace that requires root privileges.

The locate command should list every location containing the term fpcsrc. Either you will get a slew of results, or pretty much nothing if it isn't installed.





HappyLarry

  • Full Member
  • ***
  • Posts: 151
Re: Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).
« Reply #12 on: September 17, 2011, 11:22:22 am »
My mistake.
the folder /usr/sghare exists.
I meant there is no directory /usr/share/fpcsrc.
Use Lazarus and Free Pascal and stand on the shoulders of giants . . . very generous giants. Thank you.

Rails

  • Guest
Re: Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).
« Reply #13 on: September 17, 2011, 11:33:43 am »
If you can't find fpcsrc with the locate command, it did not get installed. You will have to install it. Debian calls their version fpc-source and fpc-source-2.4.4. The first package is a meta package that requires the second one. It installs as fpcsrc.  The Debian packages don't list any dependencies. They would probably install on your Ubuntu machine. They are in the Debian unstable repository.

It is not unusual for binary packages not to install source code.

« Last Edit: September 17, 2011, 11:37:02 am by Rails »

HappyLarry

  • Full Member
  • ***
  • Posts: 151
Re: Problem installing Free Pascal 2.4.4 on Ubuntu 10.04 (Lucid).
« Reply #14 on: September 17, 2011, 11:36:15 am »
Quote
$ sudo locate fpcsrc
/usr/lib/lazarus/0.9.30/components/codetools/fpcsrcrules.inc
/usr/lib/lazarus/0.9.30/components/codetools/examples/testfpcsrcunitrules.lpi
/usr/lib/lazarus/0.9.30/components/codetools/examples/testfpcsrcunitrules.lpr
/usr/lib/lazarus/0.9.30/ide/fpcsrcscan.pas
/usr/lib/lazarus/0.9.30/tools/install/create_clean_fpcsrc_directory.sh
/usr/lib/lazarus/0.9.30/tools/install/fpcsrc-patch
/usr/lib/lazarus/0.9.30/tools/install/macosx/fpcsrc-release.packproj.template
/usr/lib/lazarus/0.9.30/tools/install/macosx/fpcsrc.packproj.template
/usr/lib/lazarus/0.9.30/tools/install/macosx/makefpcsrcsnapshot.sh
/usr/lib/lazarus/0.9.30/units/i386-linux/fpcsrcscan.o
/usr/lib/lazarus/0.9.30/units/i386-linux/fpcsrcscan.ppu

I assume that fpcsrc is not installed.

I have downloaded and extracted fpcbuild-2.4.4.tar.gz onto a folder on the Desktop
It has one folder
fpcbuild-2.4.4
which has 4 folders
demo
fpcdocs
fpcsrc
install
and has 3 files
createbranch.sh
Makefile
Makefile.fpc

Unfortunately it has no instructions. How might I install this?
@Rails: Thanks once again for your patience  :)

Use Lazarus and Free Pascal and stand on the shoulders of giants . . . very generous giants. Thank you.

 

TinyPortal © 2005-2018