This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: binutils test result mysteries


On Sun, Dec 2, 2012 at 8:25 AM, Dennis Clarke <dclarke@blastwave.org> wrote:
>> On 2012-12-02 07:29, Dennis Clarke wrote:
>> > ----- Original Message -----
>> > From: Dimitry Andric <dimitry@andric.com>
>> > Date: Saturday, December 1, 2012 8:35 pm
>> ...
>> >> Red Hat makes it difficult to get a static C library, for some reason.
>> >> You need to turn on the "RHEL Server Optional" category in your package
>> >> manager to even see it.
>> >
>> > Looks like they hid it way down in this :
>> >
>> > [root@sedna ~]# yum provides "*/libc.a"
>> > Loaded plugins: refresh-packagekit, rhnplugin
>> > 1:compat-glibc-2.5-46.2.x86_64 : Compatibility C library
>> > Repo        : rhel-x86_64-workstation-6
>> > Matched from:
>> > Filename    : /usr/lib/x86_64-redhat-linux5E/lib64/libc.a
>> >
>> > The name "Compatibility C library" doesn't fill me with warm and
>> fuzzy joy.
>>
>> No, this is not the one you need.  You need exactly the "glibc-static"
>> package.  You must enable the "RHEL Server Optional" category in Red Hat
>> Network to be able to download it with yum.  If you cannot do this,
>> either switch to CentOS, or accept that some tests will fail.
>
> The static glibc package does not exist for RHEL Workstation so I opened a support case. with Red Hat.
>
> I note that I probably need the static libgcc also :
>
> $ cat -n h.c
>      1  #define _POSIX_SOURCE 1
>      2  #include <stdio.h>
>      3
>      4  int
>      5  main(int argc, char *argv[])
>      6  {
>      7      printf ( "Hello World!\n" );
>      8      return (0);
>      9  }
>
>
> $ gcc -m64 -g -malign-double -std=iso9899:199409 -pedantic-errors -mno-mmx -mno-sse -mno-fused-madd -fexceptions -fpic -fvisibility=default -Wl,-rpath=/usr/local/lib -Wl,-q -o h h.c
> sedna.adbs.ca $ ./h
> Hello World!
>
> $ gcc -m64 -g -malign-double -std=iso9899:199409 -pedantic-errors -mno-mmx -mno-sse -mno-fused-madd -fexceptions -fpic -fvisibility=default -Wl,-rpath=/usr/local/lib -Wl,-q -Wl,-Bstatic -o h h.c
> /usr/bin/ld: cannot find -lgcc_s
> collect2: ld returned 1 exit status
>

You need

[root@gnu-27 hjl]# rpm -qf /lib64/libgcc_s.so.1
libgcc-4.4.6-4.el6.x86_64
[root@gnu-27 hjl]#

and

[root@gnu-27 hjl]# rpm -qf /usr/lib64/libc.a
glibc-static-2.12-1.80.el6.x86_64
[root@gnu-27 hjl]#

glibc-static rpm is on RHEL 6 optional channel.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]