Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-02

ll 1.8.0 compiles fail with "Error while linking"

7 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tom Lisjac

Hi all,

Getting "Error while linking" when trying to compile the 1.8.0 ide or any test programs on an old Fedora 19 and fresh installs of Fedora 23 and Centos 6.8. Reviewed some bugs and forum postings, but there doesn't seem to be a fix or workaround available.

I'd like to get this working on an RPM based distro, but am wondering if I'd have better luck trying a debian flavor.

Any suggestions would be appreciated.

Thanks,

-Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180210/b5003cb3/attachment.html>

Reply by email

Michael Van Canneyt
to Tom Lisjac
Tom Lisjac wrote 11 lines
Hi all, Getting "Error while linking" when trying to compile the 1.8.0 ide or any test programs on an old Fedora 19 and fresh installs of Fedora 23 and Centos 6.8. Reviewed some bugs and forum postings, but there doesn't seem to be a fix or workaround available. I'd like to get this working on an RPM based distro, but am wondering if I'd have better luck trying a debian flavor. Any suggestions would be appreciated.

Can you provide more output ?
'Error while linking' is not much to go on.
to be able to diagnose, a little more would be good...

Michael.

Reply by email

zeljko
to Tom Lisjac: Getting "Error while linking" when trying to compile the 1.8.0 ide or any test programs…
Tom Lisjac wrote 11 lines
Hi all, Getting "Error while linking" when trying to compile the 1.8.0 ide or any test programs on an old Fedora 19 and fresh installs of Fedora 23 and Centos 6.8. Reviewed some bugs and forum postings, but there doesn't seem to be a fix or workaround available. I'd like to get this working on an RPM based distro, but am wondering if I'd have better luck trying a debian flavor. Any suggestions would be appreciated.

You're probably missing some devel packages.

zeljko

Reply by email

Péter Gábor
to zeljko

2018-02-11 09:35 keltezéssel, zeljko via Lazarus írta:

Show quoted text 16 lines
On 02/10/2018 11:50 PM, Tom Lisjac via Lazarus wrote: > Hi all, > > Getting "Error while linking" when trying to compile the 1.8.0 ide or > any test programs on an old Fedora 19 and fresh installs of Fedora 23 > and Centos 6.8. Reviewed some bugs and forum postings, but there > doesn't seem to be a fix or workaround available. > > I'd like to get this working on an RPM based distro, but am wondering > if I'd have better luck trying a debian flavor. > > Any suggestions would be appreciated. You're probably missing some devel packages. zeljko

I think zeljko is true... however low dispk space and a lot of other issues can result in "Error while linking":

You can list dependencies with the following command (in terminal):

  readelf -d ~/Projektek/Lazarus-trunk/lazarus | grep NEEDED   objdump -p ~/Projektek/Lazarus-trunk/lazarus | grep NEEDED   ldd ~/Projektek/Lazarus-trunk/lazarus

You can list only the missing dependencies with 'grep' command like this:   ldd ~/Projektek/Lazarus-trunk/lazarus | grep "not found"

The result of the above command hardly depends on the installed Lazarus components, and may change if you  install or uninstall some of the Lazarus components.

Péter Gábor

Reply by email

Mattias Gaertner
to Péter Gábor
[...] >> Getting "Error while linking" when trying to compile the 1.8.0 ide or >> any test programs on an old Fedora 19 and fresh installs of Fedora 23

Compiling via make or via the IDE?

On Fedora the normal IDE needs these rpms:
gtk2-devel, glibc-devel, binutils, gdb

Have you tried installing the rpms from our website? They were built on Fedora.

Show quoted text 7 lines
>> and Centos 6.8. Reviewed some bugs and forum postings, but there >> doesn't seem to be a fix or workaround available. >> >> I'd like to get this working on an RPM based distro, but am wondering >> if I'd have better luck trying a debian flavor. >> >> Any suggestions would be appreciated.

Usually there are more messages than just "Error while linking". Please post them.

Show quoted text 11 lines
> You're probably missing some devel packages. > > zeljko I think zeljko is true... however low dispk space and a lot of other issues can result in "Error while linking": You can list dependencies with the following command (in terminal):   readelf -d ~/Projektek/Lazarus-trunk/lazarus | grep NEEDED   objdump -p ~/Projektek/Lazarus-trunk/lazarus | grep NEEDED   ldd ~/Projektek/Lazarus-trunk/lazarus

When linking the IDE fails there is no lazarus, is there? Instead there should be link.res files.

Show quoted text 6 lines
You can list only the missing dependencies with 'grep' command like this:   ldd ~/Projektek/Lazarus-trunk/lazarus | grep "not found" The result of the above command hardly depends on the installed Lazarus components, and may change if you  install or uninstall some of the Lazarus components.

Mattias

Reply by email

Tom Lisjac
to Mattias Gaertner

Thanks Zeljke, Péter and Mattias.

Plenty of space on all three OS'es and I installed all the dependencies that the rpm's (from sourceforge) required.

I've upgraded the Fedora 19 install many times without issues. This is the error after upgrading to 1.8.0 when compiling a blank form or the IDE from the ide:

Build IDE: Exit code 512, Errors: 1
[lazarus] Error 1
[idepkg] Error 2
make: *** [idepkg] Error 2
lazarus.pp(161,1) Error: Error while linking

It was originally the same on a new Fedora 23, but booted the VM up again today and now see this with a blank form compile:

Compile Project, Target: /home/user/tmp/project1: Exit code 256, Errors: 1, Warnings: 2
project1.lpr(20,1) Warning: "crtbeginS.o" not found, this will probably cause a linking failure
project1.lpr(20,1) Warning: "crtendS.o" not found, this will probably cause a linking failure
project1.lpr(20,1) Error: Error while linking

A forum search search suggested checking the path in /etc/fpc.cfg:

# path to the gcclib
#ifdef cpui386
-Fl/usr/lib/gcc/x86_64-redhat-linux/4.8.3/32
#endif
#ifdef cpux86_64
-Fl/usr/lib/gcc/x86_64-redhat-linux/4.8.3
#endif

Both are correct on Fedora 19 as I can see crtbeginS.o and crtendS.o in those directories, but neither of those entries are present in the /etc/fpc.cfg on Fedora 23, so it's still not clear what the problem is and how to fix it.

Thanks,

-Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180211/e1a959da/attachment.html>

Reply by email

zeljko
to Tom Lisjac
Tom Lisjac wrote 36 lines
Thanks Zeljke, Péter and Mattias. Plenty of space on all three OS'es and I installed all the dependencies that the rpm's (from sourceforge) required. I've upgraded the Fedora 19 install many times without issues. This is the error after upgrading to 1.8.0 when compiling a blank form or the IDE from the ide: Build IDE: Exit code 512, Errors: 1 [lazarus] Error 1 [idepkg] Error 2 make: *** [idepkg] Error 2 lazarus.pp(161,1) Error: Error while linking It was originally the same on a new Fedora 23, but booted the VM up again today and now see this with a blank form compile: Compile Project, Target: /home/user/tmp/project1: Exit code 256, Errors: 1, Warnings: 2 project1.lpr(20,1) Warning: "crtbeginS.o" not found, this will probably cause a linking failure project1.lpr(20,1) Warning: "crtendS.o" not found, this will probably cause a linking failure project1.lpr(20,1) Error: Error while linking A forum search search suggested checking the path in /etc/fpc.cfg: # path to the gcclib #ifdef cpui386 -Fl/usr/lib/gcc/x86_64-redhat-linux/4.8.3/32 #endif #ifdef cpux86_64 -Fl/usr/lib/gcc/x86_64-redhat-linux/4.8.3 #endif

eg. my current Fedora 26 have
/usr/lib/gcc/x86_64-redhat-linux/7
/usr/lib/gcc/x86_64-redhat-linux/7/32
so just change fpc.cfg according to your gcc dir.
In any case warning about crtbeginS.o and crtendS.o won't break linking stage, something else is missing.

Reply by email