Recent

Author Topic: Centos 6.10 New install - Linker error  (Read 7308 times)

mm_coder

  • Jr. Member
  • **
  • Posts: 50
Centos 6.10 New install - Linker error
« on: March 01, 2019, 08:03:39 am »
New gui project with a button ...compiler messages below.
Thought this was resolved with a fpc version, but can't find a solution.
Any ideas.


Compile Project, Target: /home/bret/tmp/project1: Exit code 1, Errors: 1, Hints: 2
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.0.4 [2017/10/02] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling /home/bret/tmp/project1.lpr
Compiling unit1.pas
Compiling resource /home/bret/tmp/lib/x86_64-linux/project1.or
linker: /usr/bin/ld: warning: /home/bret/tmp/link.res contains output sections; did you forget -T?
Linking /home/bret/tmp/project1
linker: /usr/bin/ld: BFD version 2.20.51.0.2-5.48.el6 20100205 internal error, aborting at reloc.c line 443 in bfd_get_reloc_size

linker: /usr/bin/ld: Please report this bug.

project1.lpr(21,1) Error: Error while linking

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Centos 6.10 New install - Linker error
« Reply #1 on: March 01, 2019, 10:17:28 am »

Quote
linker: /usr/bin/ld: warning: /home/bret/tmp/link.res contains output sections; did you forget -T?

This is a warning that is fixed in newer LDs.

Code: Pascal  [Select][+][-]
  1. Linking /home/bret/tmp/project1
  2. linker: /usr/bin/ld: BFD version 2.20.51.0.2-5.48.el6 20100205 internal error, aborting at reloc.c line 443 in bfd_get_reloc_size

This internal error is a different problem in LD. Upgrade LD.

mm_coder

  • Jr. Member
  • **
  • Posts: 50
Re: Centos 6.10 New install - Linker error
« Reply #2 on: March 01, 2019, 05:09:04 pm »
Been away from programming terminology for awhile.
LD = linker debugger.........correct?


lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Centos 6.10 New install - Linker error
« Reply #3 on: March 01, 2019, 05:29:13 pm »
Been away from programming terminology for awhile.
LD = linker debugger.........correct?

Not realy. It's just the name of the GNU linker: ld, a part of the trinity of binary utlis: as, ld and gdb
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

mm_coder

  • Jr. Member
  • **
  • Posts: 50
Re: Centos 6.10 New install - Linker error
« Reply #4 on: March 03, 2019, 07:44:37 am »
I'm not getting this. I would love to understand how to correct this?

Is this what I should update?
You referring to: http://ftp.gnu.org/gnu/binutils/

..or maybe the installer works correctly on Centos 7??
Have it working on windows without any issues

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: Centos 6.10 New install - Linker error
« Reply #5 on: March 03, 2019, 08:05:32 am »
If you are able to build and install from source: yes.
But I suggest to look for a binary install if you have no experience in building from source.
Maybe Centos has back-ports, like Debian.

As said, your linker is probably too old (v2.20 from 9!! years ago, Feb 5, 2010) where even the notoriously conservative Debian is already on 2.28 from late 2017.
And your CentOs version also needs an upgrade to 7.6. That would fix a lot more than just the linker issue, but also a lot of security issues and a better kernel.
(If this is not possible, you can mount the CentOs 7.6 live ISO and lift the linker from that.)
« Last Edit: March 03, 2019, 08:23:58 am by Thaddy »
Specialize a type, not a var.

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: Centos 6.10 New install - Linker error
« Reply #6 on: March 03, 2019, 08:21:25 am »
IHave it working on windows without any issues
On Windows FPC uses its own internal linker which is not available for your platform.
The binutils from CentOS 7.6 most likely work on an up-to-date 6.10 too. As I wrote it is probably better to upgrade your whole system if possible. 7.6 has a much newer binutils.
Specialize a type, not a var.

mm_coder

  • Jr. Member
  • **
  • Posts: 50
Re: Centos 6.10 New install - Linker error
« Reply #7 on: March 04, 2019, 01:08:40 am »
Made following notes for install on Centos 7

Lazarus Install/Setup
Download from lazarus-ide (sourceforge)
fpc-3.0.4-1.x86_64.rpm
fpc-src-3.0.4-1.x86_64.rpm
lazarus-2.0.0-0.x86_64.rpm
README.txt


In a terminal.
1.  su to root
2. changeto download folder where the above files were saved.
run the below
rpm -ivh fpc*

When I tried to run this (below).
rpm -ivh lazarus*

I got:  (error: Failed dependencies: gtk2-devel is needed by lazarus-2.0.0-0.x86_64)

So I ran:
yum install gtk2-devel

All the gtk libs/dependencies were installed

Then I ran the below again.
rpm -ivh lazarus*

Install worked.

Started Lazarus and compiled a simple form with a button.
 
Thanks for the handholding


ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: Centos 6.10 New install - Linker error
« Reply #8 on: March 04, 2019, 02:12:31 am »

Thanks for the handholding


And thanks for the notes and for coming back and letting folks know that you were able to get past the problems.


Do give some consideration to upgrading to a newer version of CentOS, though.


https://wiki.centos.org/Download - Other support issues are bound to come up.
-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

mm_coder

  • Jr. Member
  • **
  • Posts: 50
Re: Centos 6.10 New install - Linker error
« Reply #9 on: March 04, 2019, 04:59:13 am »
I did upgrade to Centos 7 for my solution previously posted.

I have lots of stuff still using Centos 6.x. Some for avoidance of systemd, others
for dealing with the new environment Centos 7 brings with it...which I'm not as familiar with.

Bottom line. Thanks for the help. I love the Lazarus environment, and get lazy because
it does so much for you.
cheers

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: Centos 6.10 New install - Linker error
« Reply #10 on: March 04, 2019, 06:19:43 am »
I did upgrade to Centos 7 for my solution previously posted.


 :-[
Totally missed that.   LOL     So, double kudos for you.
-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

 

TinyPortal © 2005-2018