Unix Programming - gcc issue

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > May 2004 > gcc issue





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author gcc issue
Materialised

2004-01-23, 5:36 pm

Hi everyone.

Gcc has just started acting really funny on me. I am using
gcc --ver
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.2.2 [FreeBSD] 20030205 (release)

on FreeBSD 5.1

The problem is when users on the system try to compile any c program the
get the error message

/usr/bin/ld: cannot find -lgcc

Does anyone know what causes this, I have searched google groups, but it
seems that all references to this are for windows machines and lcc.
--
Materialised

Please note the email address this message uses in its headers is a spam
trap.
If you wish to contact me, you can do so at the following address:
bWlja0Bjb2RlZ3VydXMub3Jn
Paul Pluzhnikov

2004-01-23, 5:36 pm

Materialised <materialised@privacy.net> writes:
quote:

> Gcc has just started acting really funny on me. I am using



Did you move it from where it was installed to some other place?
quote:

> Using built-in specs.



I think that means it can't find its specs file in the place where
it is looking for it.
quote:

> /usr/bin/ld: cannot find -lgcc



That library is normally deep in the gcc install tree, e.g.
/usr/lib/gcc-lib/i486-suse-linux/2.95.3/libgcc.a

Run 'gcc -v foo.o' and look at the -L/... directives it passes to
the linker. Chances are these directories have disappeared.
quote:

> If you wish to contact me, you can do so at the following address:
> bWlja0Bjb2RlZ3VydXMub3Jn



How are we supposed to use the address above?

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
Steven G. Kargl

2004-01-23, 5:36 pm

In article <buf8i1$h06ik$1@id-220437.news.uni-berlin.de>,
Materialised <materialised@privacy.net> writes:
quote:

>
> The problem is when users on the system try to compile any c program the
> get the error message
>
> /usr/bin/ld: cannot find -lgcc
>
> Does anyone know what causes this, I have searched google groups, but it
> seems that all references to this are for windows machines and lcc.



Do you have these libraries

/usr/lib/libgcc.a
/usr/lib/libgcc_p.a
/usr/lib/libgcc_pic.a

What are the permissions on /usr/lib?

--
Steve
Materialised

2004-01-23, 5:36 pm

Paul Pluzhnikov wrote:
quote:

> Materialised <materialised@privacy.net> writes:
>
>
>
>
> Did you move it from where it was installed to some other place?
>
>
>
>
> I think that means it can't find its specs file in the place where
> it is looking for it.
>
>
>
>
> That library is normally deep in the gcc install tree, e.g.
> /usr/lib/gcc-lib/i486-suse-linux/2.95.3/libgcc.a
>
> Run 'gcc -v foo.o' and look at the -L/... directives it passes to
> the linker. Chances are these directories have disappeared.
>
>
>
>
> How are we supposed to use the address above?
>
> Cheers,


I havent moved it, it think ts a permissions issue to be hionest, as gcc
works fine as root, and fine under my own personal account which is a
member of the wheel group.
Materialised

2004-01-23, 5:36 pm

Steven G. Kargl wrote:
quote:

> In article <buf8i1$h06ik$1@id-220437.news.uni-berlin.de>,
> Materialised <materialised@privacy.net> writes:
>
>
>
> Do you have these libraries
>
> /usr/lib/libgcc.a
> /usr/lib/libgcc_p.a
> /usr/lib/libgcc_pic.a
>
> What are the permissions on /usr/lib?
>


I think you might have hit on something there, all file in /usr/lib are
-r--r--r--

and all the symlinks are

lrwxrwxrwx

Is this right?


--
Materialised

Please note the email address this message uses in its headers is a spam
trap.
If you wish to contact me, you can do so at the following address:
bWlja0Bjb2RlZ3VydXMub3Jn

www.CodeGurus.org
Materialised

2004-01-23, 5:36 pm

Materialised wrote:
quote:

> Hi everyone.
>
> Gcc has just started acting really funny on me. I am using
> gcc --ver
> Using built-in specs.
> Configured with: FreeBSD/i386 system compiler
> Thread model: posix
> gcc version 3.2.2 [FreeBSD] 20030205 (release)
>
> on FreeBSD 5.1
>
> The problem is when users on the system try to compile any c program the
> get the error message
>
> /usr/bin/ld: cannot find -lgcc
>
> Does anyone know what causes this, I have searched google groups, but it
> seems that all references to this are for windows machines and lcc.


Well I have figured out my problem.
I created the login group users in my login.conf with the following
properties.

user:\
:passwd_format=md5:\
:copyright=/etc/COPYRIGHT:\
:welcome=/etc/motd:\
:setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\
:path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
/usr/local/bin /usr/X11R6/bin ~/bin:\
:nologin=/var/run/nologin:\
:cputime=3h:\
:datasize=unlimited:\
:stacksize=unlimited:\
:memorylocked=unlimited:\
:memoryuse=20M:\
:filesize=50M:\
:coredumpsize=5M:\
:openfiles=10:\
:maxproc=10:\
:sbsize=unlimited:\
:vmemoryuse=75M:\
:priority=0:\
:ignoretime@:\
:umask=022:

Now members of that group cant access the files needed for gcc.

To fix this should I simply add /usr/lib/ to the path?


--
Materialised

Please note the email address this message uses in its headers is a spam
trap.
If you wish to contact me, you can do so at the following address:
bWlja0Bjb2RlZ3VydXMub3Jn

www.CodeGurus.org
Steven G. Kargl

2004-01-23, 5:36 pm

In article <bufb80$h2pns$1@id-220437.news.uni-berlin.de>,
Materialised <materialised@privacy.net> writes:
quote:

> Steven G. Kargl wrote:
> I think you might have hit on something there, all file in /usr/lib are
> -r--r--r--
>
> and all the symlinks are
>
> lrwxrwxrwx
>
> Is this right?
>



Yes. However, you need the proper permission in /usr

drwxr-xr-x 4 root wheel - 8704 Jan 11 09:45 lib/
drwxr-xr-x 9 root wheel - 512 Mar 23 2003 libdata/
drwxr-xr-x 8 root wheel - 1536 Jan 11 09:44 libexec/

--
Steve
Ralf Becker

2004-05-10, 5:44 pm

In comp.unix.programmer Materialised <materialised@privacy.net> wrote:
> Materialised wrote:
> Well I have figured out my problem.
> I created the login group users in my login.conf with the following
> properties.
>
> user:\
> :passwd_format=md5:\
> :copyright=/etc/COPYRIGHT:\
> :welcome=/etc/motd:\
> :setenv=MAIL=/var/mail/$,BLOCKSIZE=K,FTP_PASSIVE_MODE=YES:\
> :path=/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
> /usr/local/bin /usr/X11R6/bin ~/bin:\
> :nologin=/var/run/nologin:\
> :cputime=3h:\
> :datasize=unlimited:\
> :stacksize=unlimited:\
> :memorylocked=unlimited:\
> :memoryuse=20M:\
> :filesize=50M:\
> :coredumpsize=5M:\
> :openfiles=10:\
> :maxproc=10:\
> :sbsize=unlimited:\
> :vmemoryuse=75M:\
> :priority=0:\
> :ignoretime@:\
> :umask=022:
>
> Now members of that group cant access the files needed for gcc.
>
> To fix this should I simply add /usr/lib/ to the path?

No.
The PATH-variable sets the search path for executables.
>
>


--
Ralf Becker ralf@akk.org
Arbeitskreis Kultur und Kommunikation / Universitaet Karlsruhe
Paulckeplatz 1 76131 Karlsruhe
Tel 0721/96403-22 Fax 0721/608-4019
--------------------
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com