Lazarus

Free Pascal => Beginners => Topic started by: Middlecope on October 09, 2014, 04:07:15 pm

Title: compiling the fpc source
Post by: Middlecope on October 09, 2014, 04:07:15 pm
Is there a article that tells me how to compile the fpc source?
All things are done in my home directory
The fpc source is downloaded by SVN and placed in a directory named fpc.
The fpc-2.6.4 is installed with ./install.sh without problem.
How can I compile the fpc compiler and how to replace the old fpc-2.6.4 with the new one?
Code: [Select]
export PP=/home/user/fpc-2.6.4/bin/ppcx64
make all

A lot of output but it is stuck at:
Code: [Select]
make[7] Entering directory /home/user/fpc/rtl/linux
as --64 -o /home/user/fpc/rtl/units/x86_64-linux/prtO.o x86_64/prtO.as
make[7] as: Command not found
Machine openSUSE 13.1
Thanks for your attention!
Title: Re: compiling the fpc source
Post by: Blaazen on October 09, 2014, 04:40:16 pm
Try command:
Code: [Select]
$ fpc -iVIf you have properly installed FPC, it should prompt
Code: [Select]
2.6.4
Go to directory where you downloaded FPC.
Write:
Code: [Select]
$ svn update
$ make distclean
$ make all
$ su
***password***
make install
If everything went w/o errors, go to
Code: [Select]
/usr/local/binand change the symlink ppcx64 to path:
Code: [Select]
/usr/local/lib/fpc/2.7.1/ppcx64Now try again:
Code: [Select]
$ fpc -iVIt should prompt
Code: [Select]
2.7.1
Title: Re: compiling the fpc source
Post by: marcov on October 09, 2014, 04:41:49 pm
Code: [Select]
fpc -iTO
Code: [Select]
fpc -iTP
show resp. the default OS and CPU of the compiler. Useful if you want to see if the correct compiler is chosen set as default.
Title: Re: compiling the fpc source
Post by: Middlecope on October 09, 2014, 05:22:44 pm
Thanks
I am working in my home directory so I skipped the "su" command
All the files in ~/fpc_2.6.4/bin were placed in home/usr/bin
fpc -iV gives 2.6.4 fpc -iTO gives linux fpc -iTP gives x86_64
"make distclean" goes without error
Unfortunately the "make all" gives the error mentioned in my first post
Any more ideas?
Title: Re: compiling the fpc source
Post by: marcov on October 09, 2014, 09:53:55 pm
AS is part of the binutils package.  In general, the requirements assume you have a general "build-essentials" or similar package installed that contains binutils-gdb-gcc-make-(g)libc.
Title: Re: compiling the fpc source
Post by: Middlecope on October 09, 2014, 11:47:45 pm
Yes binutils was missing. Thanks you very much for the hint
Now it is compiling like a dream. Thanks.
A very small problem with "make install"
How can I instruct make "install" to place everything in my home directory?
/usr/local/lib/fpc cannot be created it should be /home/teunis/local/lib/fpc etc.
Thanks in advance. Teunis
Title: Re: compiling the fpc source
Post by: cdbc on October 10, 2014, 12:34:19 am
Hi
On Linux, you need SU to install anything! (root account). Security  ;D
Regards Benny
Title: Re: compiling the fpc source
Post by: Leledumbo on October 10, 2014, 06:28:50 am
How can I instruct make "install" to place everything in my home directory?
Code: [Select]
make <additional options or commands or targets> INSTALL_PREFIX=/home/yourusername/fpc/or/anywhere/you/want
Title: Re: compiling the fpc source
Post by: marcov on October 10, 2014, 09:22:45 am
There is also the buildfaq: http://www.stack.nl/~marcov/buildfaq.pdf
Title: Re: compiling the fpc source
Post by: Middlecope on October 14, 2014, 12:15:00 am
Yes thank you that did the trick
Everybody thank you for RESOLVING my problem/question
TinyPortal © 2005-2018