[OT]: GCC Issue

M

Materialised

Hi everyone.

I know this is off topic, but i though I would ask in the hope someone
else here has encountered this problem.

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
 
B

Ben Measures

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Materialised wrote:
| /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.

I'm not too sure but
info ld
gives
| `-lARCHIVE'
| `--library=ARCHIVE'
| Add archive file ARCHIVE to the list of files to link. This
| option may be used any number of times. `ld' will search its
| path-list for occurrences of `libARCHIVE.a' for every ARCHIVE
| specified.
|

| On systems which support shared libraries, `ld' may also search for
| libraries with extensions other than `.a'. Specifically, on ELF
| and SunOS systems, `ld' will search a directory for a library with
| an extension of `.so' before searching for one with an extension of
| `.a'. By convention, a `.so' extension indicates a shared library.
|

| The linker will search an archive only once, at the location where
| it is specified on the command line. If the archive defines a
| symbol which was undefined in some object which appeared before
| the archive on the command line, the linker will include the
| appropriate file(s) from the archive. However, an undefined
| symbol in an object appearing later on the command line will not
| cause the linker to search the archive again.
|

| See the `-(' option for a way to force the linker to search
| archives multiple times.
|

| You may list the same archive multiple times on the command line.
|

| This type of archive searching is standard for Unix linkers.
| However, if you are using `ld' on AIX, note that it is different
| from the behaviour of the AIX linker.

In short, ldd might be looking for a gcc library but can't find one.
Then again, it might be something else.

- --
Ben M.

- ----------------
What are Software Patents for?
To protect the small enterprise from bigger companies.

What do Software Patents do?
In its current form, they protect only companies with
big legal departments as they:
a.) Patent everything no matter how general
b.) Sue everybody. Even if the patent can be argued
invalid, small companies can ill-afford the
typical $500k cost of a law-suit (not to mention
years of harrasment).

Don't let them take away your right to program
whatever you like. Make a stand on Software Patents
before its too late.

Read about the ongoing battlUntitled 1e at http://swpat.ffii.org/
- ----------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFACy2akY9EF6QEdTkRAqjqAKCmiL2StjvqkzI7x11Tu4G3/JxOewCfd4k9
Q3K9vX/DyaIkalnJf1ZUCdE=
=oMze
-----END PGP SIGNATURE-----
 
M

Materialised

Ben said:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Materialised wrote:
| /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.

I'm not too sure but
info ld
gives
| `-lARCHIVE'
| `--library=ARCHIVE'
| Add archive file ARCHIVE to the list of files to link. This
| option may be used any number of times. `ld' will search its
| path-list for occurrences of `libARCHIVE.a' for every ARCHIVE
| specified.
|

| On systems which support shared libraries, `ld' may also search for
| libraries with extensions other than `.a'. Specifically, on ELF
| and SunOS systems, `ld' will search a directory for a library with
| an extension of `.so' before searching for one with an extension of
| `.a'. By convention, a `.so' extension indicates a shared library.
|

| The linker will search an archive only once, at the location where
| it is specified on the command line. If the archive defines a
| symbol which was undefined in some object which appeared before
| the archive on the command line, the linker will include the
| appropriate file(s) from the archive. However, an undefined
| symbol in an object appearing later on the command line will not
| cause the linker to search the archive again.
|

| See the `-(' option for a way to force the linker to search
| archives multiple times.
|

| You may list the same archive multiple times on the command line.
|

| This type of archive searching is standard for Unix linkers.
| However, if you are using `ld' on AIX, note that it is different
| from the behaviour of the AIX linker.

In short, ldd might be looking for a gcc library but can't find one.
Then again, it might be something else.

- --
Ben M.

- ----------------
What are Software Patents for?
To protect the small enterprise from bigger companies.

What do Software Patents do?
In its current form, they protect only companies with
big legal departments as they:
a.) Patent everything no matter how general
b.) Sue everybody. Even if the patent can be argued
invalid, small companies can ill-afford the
typical $500k cost of a law-suit (not to mention
years of harrasment).

Don't let them take away your right to program
whatever you like. Make a stand on Software Patents
before its too late.

Read about the ongoing battlUntitled 1e at http://swpat.ffii.org/
- ----------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFACy2akY9EF6QEdTkRAqjqAKCmiL2StjvqkzI7x11Tu4G3/JxOewCfd4k9
Q3K9vX/DyaIkalnJf1ZUCdE=
=oMze
-----END PGP SIGNATURE-----
Personally I think its a permissions issue.
As root can use it fine, and so can I (member of wheel)
But even compiling the simplest hello world example as a user, gives me
the error detailed above.

But I dont have the level of expertese to know which permissions are the
issue.
 
M

Materialised

Materialised said:
Hi everyone.

I know this is off topic, but i though I would ask in the hope someone
else here has encountered this problem.

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.
Figured out my problem, it was a system issue, not a gcc issue. Thanks
for your help.

--
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
 
T

Tim Prince

Materialised said:
Hi everyone.

I know this is off topic, but i though I would ask in the hope someone
else here has encountered this problem.

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)
If you're using FreeBSD, with a version of gcc which is no longer supported,
you ought to get familiar with FreeBSD support groups. c.l.c is not one of
those. You haven't even mentioned checking the search paths used by gcc to
see whether the library actually is missing, and I imagine any support group
would expect some effort in that direction. If you haven't installed info
gcc, or read the on-line documentation, those would be good first steps.
 
T

Tristan Miller

Greetings.

Materialised said:
I know this is off topic, but i though I would ask in the hope someone
else here has encountered this problem.

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.

Good, you took the first step and did a search of the archives first. But
what made you think that comp.lang.c was a more appropriate place for your
admittedly off-topic question than the gnu.gcc.* and various BSD groups?

Regards,
Tristan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top