public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* libstdc issue
@ 2009-03-06 22:14 Koornstra, Reinoud
  2009-03-07  1:57 ` Ian Lance Taylor
  0 siblings, 1 reply; 12+ messages in thread
From: Koornstra, Reinoud @ 2009-03-06 22:14 UTC (permalink / raw)
  To: gcc-help

Hi Everyone,

I compiled gcc 4.1.2 and installed it.
Compiled swig as well, however, upon starting it give me this:

swig: /lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /lib/libstdc++.so.6)

These libs come included in gcc and I cannot image that such an inconsistency would exist in the gcc source.
Any hints how to resolve this?
Kind Regards,

Reinoud.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: libstdc issue
  2009-03-06 22:14 libstdc issue Koornstra, Reinoud
@ 2009-03-07  1:57 ` Ian Lance Taylor
  2009-03-07  2:22   ` Koornstra, Reinoud
                     ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Ian Lance Taylor @ 2009-03-07  1:57 UTC (permalink / raw)
  To: koornstra; +Cc: gcc-help

"Koornstra, Reinoud" <koornstra@hp.com> writes:

> I compiled gcc 4.1.2 and installed it.
> Compiled swig as well, however, upon starting it give me this:
>
> swig: /lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /lib/libstdc++.so.6)
>
> These libs come included in gcc and I cannot image that such an inconsistency would exist in the gcc source.
> Any hints how to resolve this?

gcc does not normally install libgcc_s.so.1 in /lib, so my guess is that
that file came from your OS, and your dynamic linker is finding it
before the libgcc_s.so.1 which was installed by gcc.  You could try
making it a symlink to the libgcc_s.so.1 which you installed.

Note that you can confuse systems by building and installing gcc into
system directories like /lib, overwriting the system libraries and
compilers.  It's often better to install gcc and use it elsewhere.

Ian

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: libstdc issue
  2009-03-07  1:57 ` Ian Lance Taylor
@ 2009-03-07  2:22   ` Koornstra, Reinoud
  2009-03-09 19:31   ` which glibc to use Koornstra, Reinoud
  2009-03-09 19:46   ` libstdc issue Koornstra, Reinoud
  2 siblings, 0 replies; 12+ messages in thread
From: Koornstra, Reinoud @ 2009-03-07  2:22 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-help

Hi Ian,

Thanks for your answer.
Actually I tried to do it like this:

./configure --prefix= --exec-prefix= --enable-languages=c,c++

Hence, I would suspect after the make and make install it would have overwritten any library.
Also also have the gcc in /usr.
However, in ld.so.conf, first /bin is called so I would expect that always first /bin is being searched for any lib.
How to check what versions of gcc libs are installed?
Any hints on repairing this issue?
Kind Regards,

Reinoud.

-----Original Message-----
From: Ian Lance Taylor [mailto:iant@google.com] 
Sent: Friday, March 06, 2009 5:56 PM
To: Koornstra, Reinoud
Cc: gcc-help@gcc.gnu.org
Subject: Re: libstdc issue

"Koornstra, Reinoud" <koornstra@hp.com> writes:

> I compiled gcc 4.1.2 and installed it.
> Compiled swig as well, however, upon starting it give me this:
>
> swig: /lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /lib/libstdc++.so.6)
>
> These libs come included in gcc and I cannot image that such an inconsistency would exist in the gcc source.
> Any hints how to resolve this?

gcc does not normally install libgcc_s.so.1 in /lib, so my guess is that
that file came from your OS, and your dynamic linker is finding it
before the libgcc_s.so.1 which was installed by gcc.  You could try
making it a symlink to the libgcc_s.so.1 which you installed.

Note that you can confuse systems by building and installing gcc into
system directories like /lib, overwriting the system libraries and
compilers.  It's often better to install gcc and use it elsewhere.

Ian

^ permalink raw reply	[flat|nested] 12+ messages in thread

* which glibc to use
  2009-03-07  1:57 ` Ian Lance Taylor
  2009-03-07  2:22   ` Koornstra, Reinoud
@ 2009-03-09 19:31   ` Koornstra, Reinoud
  2009-03-10  5:47     ` Ian Lance Taylor
  2009-03-09 19:46   ` libstdc issue Koornstra, Reinoud
  2 siblings, 1 reply; 12+ messages in thread
From: Koornstra, Reinoud @ 2009-03-09 19:31 UTC (permalink / raw)
  To: gcc-help

Hi Everyone,

I like to use gcc 4.1.2 as compiler version.
Which glibc version can I use with this one?
Glibc 2.9 give me this error:

checking for -z relro option... no
configure: error: linker with -z relro support required

I guess this option is present in a later version of gcc?
Any hints here?
Kind Regards,

Reinoud.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: libstdc issue
  2009-03-07  1:57 ` Ian Lance Taylor
  2009-03-07  2:22   ` Koornstra, Reinoud
  2009-03-09 19:31   ` which glibc to use Koornstra, Reinoud
@ 2009-03-09 19:46   ` Koornstra, Reinoud
  2 siblings, 0 replies; 12+ messages in thread
From: Koornstra, Reinoud @ 2009-03-09 19:46 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-help

Hi,

I got around the issue by doing this:

ln -s /usr/lib/libstdc++.so.6.0.10 /lib/libstdc++.so.6

Now swig doesn't have an issue.
How come it's correctly installed in /usr (./configure --prefix=/usr --exec-prefix=/usr) but not while installing it in /lib?
Kind Regards,

Reinoud.

-----Original Message-----
From: Ian Lance Taylor [mailto:iant@google.com] 
Sent: Friday, March 06, 2009 5:56 PM
To: Koornstra, Reinoud
Cc: gcc-help@gcc.gnu.org
Subject: Re: libstdc issue

"Koornstra, Reinoud" <koornstra@hp.com> writes:

> I compiled gcc 4.1.2 and installed it.
> Compiled swig as well, however, upon starting it give me this:
>
> swig: /lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /lib/libstdc++.so.6)
>
> These libs come included in gcc and I cannot image that such an inconsistency would exist in the gcc source.
> Any hints how to resolve this?

gcc does not normally install libgcc_s.so.1 in /lib, so my guess is that
that file came from your OS, and your dynamic linker is finding it
before the libgcc_s.so.1 which was installed by gcc.  You could try
making it a symlink to the libgcc_s.so.1 which you installed.

Note that you can confuse systems by building and installing gcc into
system directories like /lib, overwriting the system libraries and
compilers.  It's often better to install gcc and use it elsewhere.

Ian

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: which glibc to use
  2009-03-09 19:31   ` which glibc to use Koornstra, Reinoud
@ 2009-03-10  5:47     ` Ian Lance Taylor
  2009-03-11  5:03       ` Koornstra, Reinoud
  0 siblings, 1 reply; 12+ messages in thread
From: Ian Lance Taylor @ 2009-03-10  5:47 UTC (permalink / raw)
  To: Koornstra, Reinoud; +Cc: gcc-help

"Koornstra, Reinoud" <koornstra@hp.com> writes:

> I like to use gcc 4.1.2 as compiler version.
> Which glibc version can I use with this one?
> Glibc 2.9 give me this error:
>
> checking for -z relro option... no
> configure: error: linker with -z relro support required
>
> I guess this option is present in a later version of gcc?
> Any hints here?

The linker is not part of gcc.  It is part of the GNU binutils.  You
need to use a version of the GNU binutils new enough to support -z
relro.  I think GNU binutils 2.16 or later should work.

Ian

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: which glibc to use
  2009-03-10  5:47     ` Ian Lance Taylor
@ 2009-03-11  5:03       ` Koornstra, Reinoud
  2009-03-11 10:00         ` Kai Ruottu
  2009-03-11 14:03         ` which glibc " Ian Lance Taylor
  0 siblings, 2 replies; 12+ messages in thread
From: Koornstra, Reinoud @ 2009-03-11  5:03 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-help

Hi Ian,

Thanks for your answer.
Any other things I need to have before being able to successfully build glibc?
Kind Regards,

Reinoud.

-----Original Message-----
From: Ian Lance Taylor [mailto:iant@google.com] 
Sent: Monday, March 09, 2009 10:47 PM
To: Koornstra, Reinoud
Cc: gcc-help@gcc.gnu.org
Subject: Re: which glibc to use

"Koornstra, Reinoud" <koornstra@hp.com> writes:

> I like to use gcc 4.1.2 as compiler version.
> Which glibc version can I use with this one?
> Glibc 2.9 give me this error:
>
> checking for -z relro option... no
> configure: error: linker with -z relro support required
>
> I guess this option is present in a later version of gcc?
> Any hints here?

The linker is not part of gcc.  It is part of the GNU binutils.  You
need to use a version of the GNU binutils new enough to support -z
relro.  I think GNU binutils 2.16 or later should work.

Ian

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: which glibc to use
  2009-03-11  5:03       ` Koornstra, Reinoud
@ 2009-03-11 10:00         ` Kai Ruottu
  2009-03-19 19:39           ` gcc options " Koornstra, Reinoud
  2009-03-11 14:03         ` which glibc " Ian Lance Taylor
  1 sibling, 1 reply; 12+ messages in thread
From: Kai Ruottu @ 2009-03-11 10:00 UTC (permalink / raw)
  To: Koornstra, Reinoud; +Cc: gcc-help

Koornstra, Reinoud wrote:

 > Ian Lance Taylor wrote:
 >
>>> I like to use gcc 4.1.2 as compiler version.
>>> Which glibc version can I use with this one?
>>> Glibc 2.9 give me this error:
>>>
>>> checking for -z relro option... no
>>> configure: error: linker with -z relro support required
>>
>> The linker is not part of gcc.  It is part of the GNU binutils.  You
>> need to use a version of the GNU binutils new enough to support -z
>> relro.  I think GNU binutils 2.16 or later should work.
>> Any other things I need to have before being able to successfully build glibc?

Why do you think you must build glibc?

Are you producing a native or a cross compiler?

If native : Please DON'T try to replace your system glibc!

If cross  : Please use the original glibc for your target,
             DON'T try to replace its system glibc!

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: which glibc to use
  2009-03-11  5:03       ` Koornstra, Reinoud
  2009-03-11 10:00         ` Kai Ruottu
@ 2009-03-11 14:03         ` Ian Lance Taylor
  2009-03-11 19:29           ` Koornstra, Reinoud
  1 sibling, 1 reply; 12+ messages in thread
From: Ian Lance Taylor @ 2009-03-11 14:03 UTC (permalink / raw)
  To: Koornstra, Reinoud; +Cc: gcc-help

"Koornstra, Reinoud" <koornstra@hp.com> writes:

> Any other things I need to have before being able to successfully build glibc?

I don't routinely build glibc, so I don't know.  Note that building a
new glibc to replace your system glibc is a job for experts; there are
many subtle issues.  Building a new glibc for a new system is something
handled well by crosstool (http://kegel.com/crosstool).

Ian

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: which glibc to use
  2009-03-11 14:03         ` which glibc " Ian Lance Taylor
@ 2009-03-11 19:29           ` Koornstra, Reinoud
  0 siblings, 0 replies; 12+ messages in thread
From: Koornstra, Reinoud @ 2009-03-11 19:29 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-help

Thanks,
I wasn't planning on replacing my current systems glibc, for else many things would break. :-)
I was planning for a glibc for a new system.
Crosstool is very nice, but it's only for older gcc's.

Just wanted to have a gcc and glibc that go well together for a new system.
Any thoughts upon that?
Kind Regards,

Reinoud.

-----Original Message-----
From: Ian Lance Taylor [mailto:iant@google.com] 
Sent: Wednesday, March 11, 2009 7:03 AM
To: Koornstra, Reinoud
Cc: gcc-help@gcc.gnu.org
Subject: Re: which glibc to use

"Koornstra, Reinoud" <koornstra@hp.com> writes:

> Any other things I need to have before being able to successfully build glibc?

I don't routinely build glibc, so I don't know.  Note that building a
new glibc to replace your system glibc is a job for experts; there are
many subtle issues.  Building a new glibc for a new system is something
handled well by crosstool (http://kegel.com/crosstool).

Ian

^ permalink raw reply	[flat|nested] 12+ messages in thread

* gcc options to use
  2009-03-11 10:00         ` Kai Ruottu
@ 2009-03-19 19:39           ` Koornstra, Reinoud
  2009-03-19 19:55             ` me22
  0 siblings, 1 reply; 12+ messages in thread
From: Koornstra, Reinoud @ 2009-03-19 19:39 UTC (permalink / raw)
  To: gcc-help

Hi,

I am compiling some libs and binaries for core2 duo cpu machines.
The gcc version is 4.3.3 and the arguments I use are:

x86_64-unknown-linux-gnu-gcc -m64 -march=core2 -mtune=core2 bla bla.
When I read the compiled bin with readelf it reports this:

Class: ELF64
Machine: Advanced Micro Devices X86-64
Etc etc.

I guess this is alright....?
Kind Regards,

Reinoud.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gcc options to use
  2009-03-19 19:39           ` gcc options " Koornstra, Reinoud
@ 2009-03-19 19:55             ` me22
  0 siblings, 0 replies; 12+ messages in thread
From: me22 @ 2009-03-19 19:55 UTC (permalink / raw)
  To: Koornstra, Reinoud; +Cc: gcc-help

On Thu, Mar 19, 2009 at 15:37, Koornstra, Reinoud <koornstra@hp.com> wrote:
>
> I am compiling some libs and binaries for core2 duo cpu machines.
> The gcc version is 4.3.3 and the arguments I use are:
>
> x86_64-unknown-linux-gnu-gcc -m64 -march=core2 -mtune=core2 bla bla.
> When I read the compiled bin with readelf it reports this:
>
> Class: ELF64
> Machine: Advanced Micro Devices X86-64
> Etc etc.
>
> I guess this is alright....?
>

Well readelf would have no idea for which processor the program was
tuned, so it presumably can only report the instruction set, which was
developed by AMD.

Seems alright to me,
~ Scott

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-03-19 19:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-06 22:14 libstdc issue Koornstra, Reinoud
2009-03-07  1:57 ` Ian Lance Taylor
2009-03-07  2:22   ` Koornstra, Reinoud
2009-03-09 19:31   ` which glibc to use Koornstra, Reinoud
2009-03-10  5:47     ` Ian Lance Taylor
2009-03-11  5:03       ` Koornstra, Reinoud
2009-03-11 10:00         ` Kai Ruottu
2009-03-19 19:39           ` gcc options " Koornstra, Reinoud
2009-03-19 19:55             ` me22
2009-03-11 14:03         ` which glibc " Ian Lance Taylor
2009-03-11 19:29           ` Koornstra, Reinoud
2009-03-09 19:46   ` libstdc issue Koornstra, Reinoud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).