Recent

Author Topic: Unable to compile on Ubuntu 14.04  (Read 18596 times)

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1290
Re: Unable to compile on Ubuntu 14.04
« Reply #30 on: November 02, 2015, 06:15:02 am »
try make all
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

Paolo_R

  • New Member
  • *
  • Posts: 34
Re: Unable to compile on Ubuntu 14.04
« Reply #31 on: November 02, 2015, 06:35:14 am »
try make all

JP - That certainly caused a lot of activity  :)

Has that also installed fpc 2.6.4? Or do I need to do a 'make install'?
« Last Edit: November 02, 2015, 06:43:06 am by Paolo_R »

Paolo_R

  • New Member
  • *
  • Posts: 34
Re: Unable to compile on Ubuntu 14.04
« Reply #32 on: November 02, 2015, 06:44:50 am »
I tried to compile testapp.pas from the from the ../packages/fv/examples directory but it failed again. The compiler is still showing 2.6.2-8.

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: Unable to compile on Ubuntu 14.04
« Reply #33 on: November 02, 2015, 07:01:33 am »
Quote
Has that also installed fpc 2.6.4? Or do I need to do a 'make install'?
The latter  ;)

I tried to compile testapp.pas from the from the ../packages/fv/examples directory but it failed again. The compiler is still showing 2.6.2-8.
It might be helpful to use your package manager to remove the 'old' fpc installation. The 'problem' is that all paths/configurations now points to your old 2.6.2 installation.

You should (emphasis on should) be able to manually travel to the directory where the new compiled compiler was installed and invoke fp from there manually. At least you would be able to check if things worked out correctly with compilation.

The log from the make install should be able to provide you with the path where the new compiler was installed. Alternatively do a zipinstall so that everything ends up in a (for you distributable) archive

Paolo_R

  • New Member
  • *
  • Posts: 34
Re: Unable to compile on Ubuntu 14.04
« Reply #34 on: November 02, 2015, 07:31:14 am »
molly: OK I've completely removed all fpc 2.6.2 compiler, units etc. When I load fp (the ide) the various directories are inserted in Options->Directories using fp.cfg from /home/paul which are what I put into fp.cfg

What I've now got is:

Units:
/usr/lib/fpc/2.6.4/units/i386-linux/
/usr/lib/fpc/2.6.4/units/i386-linux/*
/usr/lib/fpc/2.6.4/units/i386-linux/rtl

Include files:
/usr/share/fpcsrc/2.6.4/packages/fv/src
/usr/lib/fpc/2.6.4

I'm not sure about these include files. I suspect that using Fi (in fp.cfg) was incorrect. Can you advise on this?


molly

  • Hero Member
  • *****
  • Posts: 2330
Re: Unable to compile on Ubuntu 14.04
« Reply #35 on: November 02, 2015, 07:55:42 am »
What I've now got is:

Units:
/usr/lib/fpc/2.6.4/units/i386-linux/
/usr/lib/fpc/2.6.4/units/i386-linux/*
/usr/lib/fpc/2.6.4/units/i386-linux/rtl
If that is where the .ppu files are actually located then that looks fine to me.

Quote
Include files:
/usr/share/fpcsrc/2.6.4/packages/fv/src
/usr/lib/fpc/2.6.4

I'm not sure about these include files. I suspect that using Fi (in fp.cfg) was incorrect. Can you advise on this?
Yes, the use of -Fi in front of the path when using the configuration windows of FP-IDE is (as you suspected) wrong.

FP-IDE's configuration dialogs (at least those that ask for providing paths) only expects paths to be inserted, each path on a separate line.

As long as you don;t plan on compiling the compiler and platform related units (again, and with wanting to use FP-IDe for that), i would get rid of providing these currently shown include paths all-together.

Instead (and if you still have the FPC-2.6.4 source on your disk located), copy the platform.inc file from fpc-sources, inside the directory where the FV example (of your fpc installation) is located.

(it is the same solution used as upcoming FPC 3.x release)

I'm more anxious to know if you are at least able to compile a simple helloworld program without any errors, and then check f you are able to compile an example that depends on one of the units that makes use of your configured paths.

Paolo_R

  • New Member
  • *
  • Posts: 34
Re: Unable to compile on Ubuntu 14.04
« Reply #36 on: November 02, 2015, 08:25:52 am »
molly: you mentioned earlier about a make install log. Where would I find this?

whereis fpc gives /usr/local/bin/fpc /usr/local/lib/fpc

If I type 'fpc' I get 'Error: ppc386 can't be executed, error message: Failed to execute "ppc386". err 7'

I still cannot compile testapp.pas

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: Unable to compile on Ubuntu 14.04
« Reply #37 on: November 02, 2015, 08:51:48 am »
molly: you mentioned earlier about a make install log. Where would I find this?

whereis fpc gives /usr/local/bin/fpc /usr/local/lib/fpc
Ouch. And sorry for that.

When you typed make install + enter a lot of output was produced (i hope), that _was_ the log.

In order to make the log permanent store on disk you should have invoked make install with something like a solution mentioned here (never mind the bsd platform or other software being 'make install"-ed)

Quote
If I type 'fpc' I get 'Error: ppc386 can't be executed, error message: Failed to execute "ppc386". err 7'
Oh dear... did you perhaps forgot to mention (or i overlooked) that you are running a 64-bit version of linux ?

If so, then i'm affraid i run into troubles helping you solve that in an effective manner (i simply lack the experience creating/using 32-bit compiler on a 64-bit distro).

If not, then i have no clue as of why ppc386 gives you an error.

Quote
I still cannot compile testapp.pas
Yes, unfortunately that much was clear. Sorry for that.

fwiw: in case it would have been me into this situation, i would start from scratch again.
- let package manager install fpc 2.6.2
- download fpc 2.6.4 sources and follow JP's instructions
Add perhaps additional extra steps to produce the correct compiler for your chosen target -> look how others perhaps solved it, maybe a wiki article mentioning the problem encountered and providing a solution.

and see where that would bring me.

But it might perhaps be more helpful if a real linux user could give you a hand here.

Paolo_R

  • New Member
  • *
  • Posts: 34
Re: Unable to compile on Ubuntu 14.04
« Reply #38 on: November 02, 2015, 09:30:42 am »


Oh dear... did you perhaps forgot to mention (or i overlooked) that you are running a 64-bit version of linux ?

If so, then i'm affraid i run into troubles helping you solve that in an effective manner (i simply lack the experience creating/using 32-bit compiler on a 64-bit distro).

If not, then i have no clue as of why ppc386 gives you an error.

In fact I'm running 32-bit Ubuntu and I assumed that fpc-2.6.4 was also 32-bit

Quote
fwiw: in case it would have been me into this situation, i would start from scratch again.
- let package manager install fpc 2.6.2
- download fpc 2.6.4 sources and follow JP's instructions

I think I might well do that. Anyway thanks for your help (and JP as well).

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: Unable to compile on Ubuntu 14.04
« Reply #39 on: November 02, 2015, 10:14:22 am »
In fact I'm running 32-bit Ubuntu and I assumed that fpc-2.6.4 was also 32-bit
Well, that's the point  :)

since you've downloaded the sources of FPC 2.6.4 and compiled them yourself, the make script should 'detect' your platform and automatically create and install the compiler that's suitable for your system.

The makefile interprets environment settings on your system to detect the correct parameters for compilation/installation. It is also possible to provide additional parameters to the make-script, for example to create a special cross-compiler for a specific target.

My current understanding of your situation is that something went wrong with detecting your system correctly and that the wrong compiler (or none at all) was created.

I'll keep trying to search on that error, but the first hits i encountered that mentioned that error was in situations where people tried to create a 32-bit FPC compiler on a 64-bit system. Hence my asking for verification.

Nevertheless i do apologize for getting you into this current situation.

You could always opt for letting synaptic install fpc 2.6.2 for you, try to configure it properly with the correct paths (just give it another try/attempt now that you're a little wiser) and copy the missing include file.

Hopefully someone else might be able to tap in and give you/us an extra hand.

Paolo_R

  • New Member
  • *
  • Posts: 34
Re: Unable to compile on Ubuntu 14.04
« Reply #40 on: November 02, 2015, 10:35:34 am »
molly:

Quote
Nevertheless i do apologize for getting you into this current situation.

Don't worry about it. I'll figure it out - eventually  :)

 

TinyPortal © 2005-2018