Recent

Author Topic: /usr/bin/ld: warning: link.res contains output sections; did you forget -T?  (Read 24719 times)

iru

  • Sr. Member
  • ****
  • Posts: 321
Gentlefolk,

I installed Lazarus on Ubuntu 11.04 following instructions from 'silvio' as follows:

wget -c http://silvioprog.com.br/download/install_fpc_lazarus_svn_version.tar.gz

 tar -vzxf install_fpc_lazarus_svn_version.tar.gz

 ./install_fpc_lazarus_svn_version.sh

Worked beautifully, Lazarus IDE version 0.9.31, svn 31208.

But when I try to compile a simple form with one button I get an error message:

/usr/bin/ld: warning: link.res contains output sections; did you forget -T?

A general Google check and a check of the forum for something like this showed nothing.

Any ideas??

Thanks, Ian

bobo

  • Full Member
  • ***
  • Posts: 171
It is just a warning,  not an error.  Everything should work.

There are dozens of such warnings while compiling FPC or Lazarus themselves.

iru

  • Sr. Member
  • ****
  • Posts: 321
Gentlefolk,

Thanks for the response.

However the messages window was a little small and I now see a long list of errors as follows:

/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/usr/bin/ld: cannot find -lX11
/usr/bin/ld: cannot find -lgdk_pixbuf-2.0
/usr/bin/ld: cannot find -lgtk-x11-2.0
/usr/bin/ld: cannot find -lgdk-x11-2.0
/usr/bin/ld: cannot find -lgobject-2.0
/usr/bin/ld: cannot find -lglib-2.0
/usr/bin/ld: cannot find -lgthread-2.0
/usr/bin/ld: cannot find -lgmodule-2.0
/usr/bin/ld: cannot find -lpango-1.0
/usr/bin/ld: cannot find -latk-1.0
/usr/bin/ld: cannot find -lcairo
project1.lpr(20,1) Error: Error while linking
project1.lpr(20,1) Fatal: There were 1 errors compiling module, stopping

It looks like the install process did not set up links to the required files/libraries or these are missing.

Any suggestions?

Thanks, Ian

iru

  • Sr. Member
  • ****
  • Posts: 321
Gentlefolk,

A little more chasing shows an entry in the forum reporting the same problem.

The contents of the response are a little beyond me but there is the comment:

"This is only developers headers for FPC compiler. Compiled executable run on ubuntu without this packages".

I believe this is telling me that some portion/s of the FPC compiler are missing.

Ian

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11453
  • FPC developer.

I believe this is telling me that some portion/s of the FPC compiler are missing.

It is not.  Probably you didn't install the development packages for those packages (GTK2 and its dependancies) are not installed.


bobo

  • Full Member
  • ***
  • Posts: 171
Iru, you did not install the prerequisite Linux packages for FPC/Lazarus.

Before you start with FPC/Lazarus compilations, you need to have at least the following packages installed:
build-essential libx11-dev libgtk2.0-dev libgdk-pixbuf-dev

(there might be more)
you can do this in a terminal window with a
Code: [Select]
sudo apt-get install build-essential libx11-dev libgtk2.0-dev libgdk-pixbuf-dev
« Last Edit: June 16, 2011, 11:30:41 pm by bobo »

iru

  • Sr. Member
  • ****
  • Posts: 321
Gentlefolk,

Thank you for the responses, I am getting there!

However I (and the APT-GET and the Synaptic Package manager) cannot find libgdk-pixbuf-dev anywhere.

is this the correct name/spelling/?

Thanks, Ian

bobo

  • Full Member
  • ***
  • Posts: 171
If you still get errors regarding pixbuf, you need to find it. Did you try with just the others installed?

I am not sure what is it called exactly in Ubuntu 11.04 , maybe libgdk-pixbuf2.0-dev or something similar. Look for packages with pixbuf in their name.

kodok_buncit

  • New Member
  • *
  • Posts: 33
    • fajardelphiscript
try to search on usr/lib .
i believe the needed library is somewhere in your system but with different name.
 i also get same problem couple years ago..

then if you have found it, do something like this
Code: [Select]
sudo ln -s /usr/lib/libgtk-x11-2.0.so.0.2000.1 /usr/lib/libgtk-x11-2.0.so

read this http://lazarus.freepascal.org/index.php/topic,6125.0.html
Peace and blessings be upon you all

iru

  • Sr. Member
  • ****
  • Posts: 321
Gentlefolk,

Thanks for the responses and the suggestions contained.

I surfed around /usr/lib found something like lgkd_pixbuf-2.0, checked it out in the update manager.

All seemed OK.

Read: http://lazarus.freepascal.org/index.php/topic,6125.0.html.

Chased around some more. Rebooted Linu, restarted Lazarus, compiled a basic program OK.

Not sure exactly what solved the problem.....

Thanks Ian

 

TinyPortal © 2005-2018