* * *

Author Topic: FPC 3.0 on Centos 6.5  (Read 3938 times)

BPascal

  • New member
  • *
  • Posts: 13
FPC 3.0 on Centos 6.5
« on: October 28, 2016, 11:39:56 am »
Hi.

I want to install fpc (not lazarus) on a Centos 6.5 but no package for fpc is availabe using yum.

[root@mail ~]# yum install fpc
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.nl.leaseweb.net
 * epel: mirror.nl.leaseweb.net
 * extras: centos.mirror.triple-it.nl
 * remi: nl.mirror.babylon.network
 * remi-php55: nl.mirror.babylon.network
 * remi-safe: nl.mirror.babylon.network
 * updates: centos.mirror.transip.nl
Setting up Install Process
No package fpc available.
Error: Nothing to do


How to install fpc?

Thanks!

BPascal

  • New member
  • *
  • Posts: 13
Re: FPC 3.0 on Centos 6.5
« Reply #1 on: October 28, 2016, 11:55:57 am »
(solution)

Download version from https://sourceforge.net/projects/freepascal/files/Linux/3.0.0/
(I've downloaded fpc-3.0.0.x86_64-linux.tar)

(Using FTP I've uploaded .tar file to my Centos 6.5 server)

Go to terminal and follow steps ( based on http://www.freepascal.org/docs-html/user/usersu5.html )

- Go to fpc-3.0.0.x86_64-linux.tar directory
# tar -xvf fpc-3.0.0.x86_64-linux.tar
- (yes to all)
# cd fpc-3.0.0.x86_64-linux/
# ./install.sh

That's all

Edson

  • Hero Member
  • *****
  • Posts: 786
Re: FPC 3.0 on Centos 6.5
« Reply #2 on: November 27, 2016, 03:38:57 am »
I have done:

Quote
tar -xvf fpc-3.0.0.x86_64-linux.tar
cd fpc-3.0.0.x86_64-linux/
./install.sh

But when executing "fp" in console, I get:

Quote
"fp: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by fp)"

Can someone give me a solution, please? I have CentOS release 6.8 - x86_64.
Lazarus 1.6 - FPC 3.0.0 - x86_64-win64 on  Windows 7

Leledumbo

  • Hero Member
  • *****
  • Posts: 7685
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: FPC 3.0 on Centos 6.5
« Reply #3 on: November 27, 2016, 07:50:43 am »
Can someone give me a solution, please? I have CentOS release 6.8 - x86_64.
CentOS ships with a very old glibc version (2.12, dating over 6 years ago). Googling around it seems like a common problem in CentOS where new softwares are compiled with new glibc version. You may either install glibc 2.14 or newer, alongside 2.12 (you can't remove 2.12 as other parts of the OS depend on it) or if possible (not sure which kernel version your CentOS uses), build fpc from source.

Edson

  • Hero Member
  • *****
  • Posts: 786
Re: FPC 3.0 on Centos 6.5
« Reply #4 on: November 27, 2016, 06:16:39 pm »
It looks like FPC 3.0 cannot be easily installed in CentOS 6  :-[. I have read, the best solution is to migrate to CentOS 7, but  it's not so appropriate for me.

But I have tested with FPC 2.6.4 and 2.6.0, and all of then ask for GLIBC 2.14.  :o
Lazarus 1.6 - FPC 3.0.0 - x86_64-win64 on  Windows 7

Leledumbo

  • Hero Member
  • *****
  • Posts: 7685
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: FPC 3.0 on Centos 6.5
« Reply #5 on: November 27, 2016, 07:42:24 pm »
It looks like FPC 3.0 cannot be easily installed in CentOS 6  :-[. I have read, the best solution is to migrate to CentOS 7, but  it's not so appropriate for me.

But I have tested with FPC 2.6.4 and 2.6.0, and all of then ask for GLIBC 2.14.  :o
Well, even glibc 2.14 itself is only 1 year younger than 2.12. If you stick to old system, you will be left behind sooner or later.

Graeme

  • Hero Member
  • *****
  • Posts: 1410
    • Graeme on the web
Re: FPC 3.0 on Centos 6.5
« Reply #6 on: November 27, 2016, 11:34:11 pm »
I've got both FPC 2.6.4 and FPC 3.0.0 installed and working 100% on CentOS 6 here. The setup was done a long time ago, so can't remember the details. But I can say that it does work, and there is no need to forcefully upgrade to CentOS 7.

Code: [Select]
$ lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.6 (Final)
Release: 6.6
Codename: Final

 $ fpc -i
Free Pascal Compiler version 2.6.4

Compiler Date      : 2014/03/03
Compiler CPU Target: x86_64

Supported targets:
  Linux for x86-64
  FreeBSD for x86-64
  Win64 for x64
  Darwin for x86_64
  Solaris for x86-64 (under development)
  OpenBSD for x86-64 (under development)
  NetBSD for x86-64 (under development)
...snip...

 $ ./fpc -i
Free Pascal Compiler version 3.0.0

Compiler date      : 2016/04/29
Compiler CPU target: x86_64

Supported targets (targets marked with '{*}' are under development):
  Linux: Linux for x86-64
  FreeBSD: FreeBSD for x86-64
  Win64: Win64 for x64
  Darwin: Darwin for x86_64
  solaris: Solaris for x86-64 {*}
  OpenBSD: OpenBSD for x86-64 {*}
  NetBSD: NetBSD for x86-64 {*}
  DragonFly: DragonFly for x86-64
...snip...

How do I find out what glib version I have?
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Edson

  • Hero Member
  • *****
  • Posts: 786
Re: FPC 3.0 on Centos 6.5
« Reply #7 on: November 28, 2016, 02:04:30 am »
How do I find out what glib version I have?

I use: 

Quote
ldd --version

And gives in my system: (GNU libc) 2.12

Lazarus 1.6 - FPC 3.0.0 - x86_64-win64 on  Windows 7

feds

  • New member
  • *
  • Posts: 13
Re: FPC 3.0 on Centos 6.5
« Reply #8 on: November 28, 2016, 03:30:14 am »
How do I find out what glib version I have?

I use: 

Quote
ldd --version

And gives in my system: (GNU libc) 2.12

On RH/CentOS
Quote
yum list glibc
might give a somewhat more detailed revision info.

Graeme

  • Hero Member
  • *****
  • Posts: 1410
    • Graeme on the web
Re: FPC 3.0 on Centos 6.5
« Reply #9 on: November 28, 2016, 10:40:11 am »
Thanks for the info... This was the first time I ever used CentOS (I set it up in a VM for development for a specific client). I'm more of a FreeBSD guy.

Here is the output. I got from 'ldd' and 'yum'.

Code: [Select]
$ ldd --version
ldd (GNU libc) 2.12
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
graemeg@wisadevel ~/devel/fpcpackages/fppdf/utils


$ yum list glibc
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
 * base: mirror.vorboss.net
 * centosplus: mirror.vorboss.net
 * contrib: mirror.vorboss.net
 * extras: mirror.vorboss.net
 * fasttrack: mirror.vorboss.net
 * updates: mirror.vorboss.net
base                                                                                   | 3.7 kB     00:00     
centosplus                                                                             | 3.4 kB     00:00     
centosplus/primary_db                                                                  | 2.0 MB     00:00     
contrib                                                                                | 2.9 kB     00:00     
extras                                                                                 | 3.4 kB     00:00     
fasttrack                                                                              | 3.3 kB     00:00     
updates                                                                                | 3.4 kB     00:00     
updates/primary_db                                                                     | 3.7 MB     00:00     
Installed Packages
glibc.x86_64                                    2.12-1.166.el6_7.7                                    @updates
Available Packages
glibc.i686                                      2.12-1.192.el6                                        base   
glibc.x86_64                                    2.12-1.192.el6                                        base

So it seems I have GLIBC 2.12 installed.

I can also add that I normally compile my own newer FPC versions - because I often require multiple FPC compiler versions, and always install them in my $HOME directory in separate "fpc-x.y.z" directories.  Looking inside the ~/devel/fpc-3.0.0/ I can see my usual build script go.sh so I definitely compiled FPC 3.0.0 using the released FPC 2.6.4 (which I probably installed from the official Free Pascal console installer). This almost always reduces the install dependencies too (Linux package managers, 99% of the time have too many restrictive dependencies associated).

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

Edson

  • Hero Member
  • *****
  • Posts: 786
Re: FPC 3.0 on Centos 6.5
« Reply #10 on: November 28, 2016, 07:35:21 pm »
I only need FPC 3.0.0. Is there some easy way to have it in CentOS 6.8? I'm new in CentOS too, so I have no idea how to do this.
Lazarus 1.6 - FPC 3.0.0 - x86_64-win64 on  Windows 7

Graeme

  • Hero Member
  • *****
  • Posts: 1410
    • Graeme on the web
Re: FPC 3.0 on Centos 6.5
« Reply #11 on: November 29, 2016, 10:40:00 am »
I only need FPC 3.0.0. Is there some easy way to have it in CentOS 6.8? I'm new in CentOS too, so I have no idea how to do this.
I never actually tried the text mode FP IDE on CentOS 6.7 - it actually gives the same "version `GLIBC_2.14' not found" error. But then, I never use the text mode IDE for anything. The rest of the FPC 3.0.0 compiler works perfectly though. I highly recommend you try MSEide instead of the text mode IDE - if you want a very fast and feature packed IDE, with much less memory usage and 3rd party library requirements than say Lazarus IDE. You don't have to develop MSEgui based application with MSEide (I don't), but I do use MSEide for everything else (console, web and fpGUI based applications). It works very well.
« Last Edit: November 29, 2016, 10:44:21 am by Graeme »
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Leledumbo

  • Hero Member
  • *****
  • Posts: 7685
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: FPC 3.0 on Centos 6.5
« Reply #12 on: November 29, 2016, 10:47:50 am »
I never actually tried the text mode FP IDE on CentOS 6.7 - it actually gives the same "version `GLIBC_2.14' not found" error.
AFAIK the text mode IDE is the only thing that links to a C library indirectly for terminal handling, hence everything but the IDE works regardless of glibc version (but still depends on minimal kernel version).

Edson

  • Hero Member
  • *****
  • Posts: 786
Re: FPC 3.0 on Centos 6.5
« Reply #13 on: December 01, 2016, 10:52:24 pm »
Finally (I don't know how) I have the fpc working in CentOS 6.8  :D:

Quote
[usuario@CENTOS-64 ~]$ cat /etc/redhat-release
CentOS release 6.8 (Final)

[usuario@CENTOS-64 ~]$ fpc prueba.pas
Free Pascal Compiler version 3.0.0 [2015/11/20] for x86_64
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling prueba.pas
Linking prueba
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
3 lines compiled, 0.0 sec

[usuario@CENTOS-64 ~]$ ldd --version
ldd (GNU libc) 2.12
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.


The IDE, still give error:

Quote
fp: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by fp)

Anyway I don't need the IDE, by now.
Lazarus 1.6 - FPC 3.0.0 - x86_64-win64 on  Windows 7

Leledumbo

  • Hero Member
  • *****
  • Posts: 7685
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: FPC 3.0 on Centos 6.5
« Reply #14 on: December 02, 2016, 05:15:07 am »
Finally (I don't know how) I have the fpc working in CentOS 6.8  :D:
It should have worked from the start, only the IDE doesn't.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus