bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(no subject)


From: Reetesh Ranjan
Subject: (no subject)
Date: Wed, 10 Apr 2002 17:15:26 +0530

Hello,

The content of this mail was generated using gnubug utility. However, sendmail 
could not send it to address@hidden
Hence, this forwarding to this e-mail id.

Regards
Reetesh

>Submitter-Id:  net
>Originator:    Reetesh Ranjan
>Organization:
        Wipro Technologies
        53/1 Hosur Road, Madivala
        Bangalore 560038
        Tel: +91-80-502001-9 Extm. 3074
>Confidential:  no
>Synopsis:      Loading a program linked with dynamic libraries fails
>Severity:      critical
>Priority:      high
>Category:      libc
>Class:         support
>Release:       libc-2.1.3
>Environment:

Host type: i386-redhat-linux-gnu
System: Linux server 2.2.14-12 #1 Tue Apr 25 13:04:07 EDT 2000 i686 unknown
Architecture: i686

Addons: c_stubs crypt glibc-compat linuxthreads
Build CFLAGS: -g -O3
Build CC: egcs
Compiler version: egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
Kernel headers: 2.2.14-12
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio

>Description:
        I am using MIT kerberos version 1.2.2 libraries (not the default RPMs
        and all kerberos RPMs are removed before we proceed). It can be con-
        figured for producing and linking with either static libraries or dy-
        namic libraries. When static libraries are produced and programs are
        linked with it, running these programs works fine. But when we create
        dynamic libraries and link with them, at run-time we get an error of
        'error in loading shared libraries : <path of a library we built>: un-
        defined symbol : stat', for the same programs.

        I also tried to check for the symbol 'stat' in the different versions
        of the libraries and the programs. For both static and dynamic libra-
        ries, the symbol stat is shown as 'U stat' (output of nm). Also, for
        the same program linked with either the static or dynamic libraries,
        ouput of nm on the program shows 'U stat'. However, for the case of the
        program linked with static libraries we do not get any loading problem.
        Strange though, it works like that!

        We also tried to dig in the stat.h file and libc. /lib/libc.so.6 does
        not seem to have the symbol 'stat'. /usr/lib/libc.a has it as 'W stat'
        in the file stat.o in the archive.

        I also tried to see the gcc -E output of a kerberos .c with all other
        compile options/flags as used by kerberos build. This .c is including
        sys/stat.h. The gcc -E output shows an 'extern __inline__ int stat'
        prototype and an 'extern __inline__ int stat' definition for stat. I
        tried the gcc -E output for a test file with no flags which kerberos
        build uses, rather with no flags/options absolutely and got the same
        result. Then I called 'stat' in my test .c and build an executable.
        The nm output on this executable again shows 'U stat'; however, it runs
        perfectly.

>How-To-Repeat:
        1  Building

        Please download krb5-1.2.2 source tarball from www.mit.edu
        Untar to get krb5-1.2.2 in your workdir

        In the directory krb5-1.2.2/src 

        Do './configure && make && make install' for building and linking with
        static libraries

        Do './configure --disable-static --enable-dynamic && make && make
        install' for building and linking with dynamic libraries

        2  Testing a program

        Go to krb5-1.2.2/src/kdc

        Statically linked:
        run './krb5kdc'

        Dynamically linked:
        Do 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../lib' and
        run ./krb5kdc'
         
>Fix:
        Please help me in getting the fix for this.




Attachment: Wipro_Disclaimer.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]