Recent

Author Topic: ld: cannot find -lgcc after upgrade to Ubuntu 10.04 ...  (Read 16410 times)

mionut

  • Newbie
  • Posts: 5
ld: cannot find -lgcc after upgrade to Ubuntu 10.04 ...
« on: August 11, 2010, 09:14:23 pm »
Hi all!

After upgrading the distribution to Ubuntu 10.04 Compiling my old projects stopped compiling/linking with the message "/usr/bin/ld: cannot find -lgcc". Since downgrading the distribution is somehow problematic, I'm asking desperately the lazarus community for help. Did anyone else encountered this problem?

[edit]
There is another message that previously did not came up at compiling/linking: "/usr/bin/ld: warning: /home/ionut/src/voice/eadtst/link.res contains output sections; did you forget -T?"
Please help ...


Thank you.
« Last Edit: August 11, 2010, 09:24:15 pm by mionut »

Troodon

  • Sr. Member
  • ****
  • Posts: 484
Re: ld: cannot find -lgcc after upgrade to Ubuntu 10.04 ...
« Reply #1 on: August 11, 2010, 10:15:34 pm »
I wouldn't worry about the second one.

As for the (first) linking error, what Lazarus + FPC version do you run on your Ubuntu 10.04 machine? Also, try reinstalling gcc in Synaptic.
« Last Edit: August 11, 2010, 10:17:41 pm by Troodon »
Lazarus/FPC on Linux

mionut

  • Newbie
  • Posts: 5
Re: ld: cannot find -lgcc after upgrade to Ubuntu 10.04 ...
« Reply #2 on: August 11, 2010, 10:23:30 pm »
Lazarus version: 0.9.28.2-8ubuntu1 beta
FPC version: Free Pascal Compiler version 2.4.0-2 [2010/03/06] for i386

Reinstalled gcc with synaptic. Same annoying message "ld: cannot find -lgcc".

Thank you for the response.


mica

  • Full Member
  • ***
  • Posts: 196
Re: ld: cannot find -lgcc after upgrade to Ubuntu 10.04 ...
« Reply #3 on: August 11, 2010, 10:43:18 pm »
32/64 bit Problem?
32 bit FPC with 64 bit OS?

mionut

  • Newbie
  • Posts: 5
Re: ld: cannot find -lgcc after upgrade to Ubuntu 10.04 ...
« Reply #4 on: August 11, 2010, 10:49:03 pm »
If my previous distribution was 32 bit is it possible that the upgraded one is 64 bit? Anyway, I've read about this on some other forums, did install gcc-multilib ... but no joy.

gcc -v gives the following:
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)

So i think it's a 32 bit distro...

« Last Edit: August 11, 2010, 10:50:41 pm by mionut »

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2673
Re: ld: cannot find -lgcc after upgrade to Ubuntu 10.04 ...
« Reply #5 on: August 11, 2010, 11:12:12 pm »
Lazarus version: 0.9.28.2-8ubuntu1 beta
FPC version: Free Pascal Compiler version 2.4.0-2 [2010/03/06] for i386

Reinstalled gcc with synaptic. Same annoying message "ld: cannot find -lgcc".

Thank you for the response.



Did you install the libgcc-devel package ?
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

mionut

  • Newbie
  • Posts: 5
Re: ld: cannot find -lgcc after upgrade to Ubuntu 10.04 ...
« Reply #6 on: August 11, 2010, 11:21:32 pm »
apt-cache search libgcc gives nothing containing dev or devel ...


#apt-cache search libgcc
libgcc1 - GCC support library
libgcc1-dbg - GCC support library (debug symbols)


What package are you refering?#

dpkg -l | grep gcc output:
ii  gcc                                        4:4.4.3-1ubuntu1                                           The GNU C compiler
ii  gcc-4.3                                    4.3.4-10ubuntu1                                            The GNU C compiler
ii  gcc-4.3-base                               4.3.4-10ubuntu1                                            The GNU Compiler Collection (base package)
ii  gcc-4.4                                    4.4.3-4ubuntu5                                             The GNU C compiler
ii  gcc-4.4-base                               4.4.3-4ubuntu5                                             The GNU Compiler Collection (base package)
ii  gcc-4.4-multilib                           4.4.3-4ubuntu5                                             The GNU C compiler (multilib files)
ii  gcc-multilib                               4:4.4.3-1ubuntu1                                           The GNU C compiler (multilib files)
ii  gccxml                                     0.9.0+cvs20090916-1                                        XML output extension to GCC
ii  lib64gcc1                                  1:4.4.3-4ubuntu5                                           GCC support library (64bit)
ii  libgcc1                                    1:4.4.3-4ubuntu5                                           GCC support library




Troodon

  • Sr. Member
  • ****
  • Posts: 484
Re: ld: cannot find -lgcc after upgrade to Ubuntu 10.04 ...
« Reply #7 on: August 12, 2010, 01:37:19 am »
If you installed the Lazarus metapackage then it should have also installed all the required dependencies. When I upgraded from 9.10 to 10.04 it went smoothly. I would uninstall and reinstall Lazarus.
Lazarus/FPC on Linux

mionut

  • Newbie
  • Posts: 5
Re: ld: cannot find -lgcc after upgrade to Ubuntu 10.04 ...
« Reply #8 on: August 12, 2010, 11:35:37 am »
Hi,

I've reinstalled lazarus metapackage. Same error. :(

Some more info. In my project i use a unit (fftw_s for fast fourier transforms by Daniel Mantione) that has a directive {$LINKLIB gcc} somewhere in the source. This should be a required library for libfftw3. If i comment out this directive, project builds and links ok. Will test if this will have some negative impact on the project.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: ld: cannot find -lgcc after upgrade to Ubuntu 10.04 ...
« Reply #9 on: August 12, 2010, 12:55:26 pm »
ii  lib64gcc1                                  1:4.4.3-4ubuntu5                                           GCC support library (64bit)
ii  libgcc1                                    1:4.4.3-4ubuntu5                                           GCC support library

Probably these ones.

Troodon

  • Sr. Member
  • ****
  • Posts: 484
Re: ld: cannot find -lgcc after upgrade to Ubuntu 10.04 ...
« Reply #10 on: August 12, 2010, 01:35:52 pm »
OK, so your project (not Lazarus/FPC) needs library libgcc.so (or a symlink with that name) and cannot find it in the PATH. My best guess is that you need file /lib/libgcc_s.so.1 in package libgcc1. Try creating a symlink to it (as superuser: ln -s /lib/libgcc_s.so.1 /lib/libgcc.so) then reboot and build your project again. If it still doesn't work for you then delete the symlink (as superuser: rm /lib/libgcc.so) to avoid potential file conflicts in the future.
« Last Edit: August 12, 2010, 02:06:01 pm by Troodon »
Lazarus/FPC on Linux

 

TinyPortal © 2005-2018