[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensuse
Subject:    Re: [opensuse] Re: Opensuse apps can't be run on newer suse? Why not? Why are they tied to 1 version
From:       "Brian K. White" <brian () aljex ! com>
Date:       2013-02-14 21:01:59
Message-ID: 511D50C7.9050501 () aljex ! com
[Download RAW message or body]

On 2/14/2013 2:07 PM, Cristian Rodríguez wrote:
> El 14/02/13 14:20, Linda Walsh escribió:
> if they NEED to do that, it is known you
>> either include the lib in a program-private directory, OR you statically
>> link.
>
> Ok, to get rid of your illusion, the best way we can do it is by trying
> to statically link a simple "hello world" program.
>
> cat getpwnam.c
> #include <stdio.h>
> #include <sys/types.h>
> #include <pwd.h>
>
> int main(void)
> {
>    struct passwd *p;
>
> if ((p = getpwnam("root")) == NULL)
>      perror("getpwnam() error");
>    else {
>      printf("getpwnam() returned the following info for user root:\n");
>      printf("  pw_name  : %s\n",       p->pw_name);
>      printf("  pw_uid   : %d\n", (int) p->pw_uid);
>      printf("  pw_gid   : %d\n", (int) p->pw_gid);
>      printf("  pw_dir   : %s\n",       p->pw_dir);
>      printf("  pw_shell : %s\n",       p->pw_shell);
>    }
> }
>
>
> This is trivial program, which is ridiculously simple compared to a real
> life software.
>
> gcc -static getpwnam.c
>
> /tmp/ccAf3rHn.o:getpwnam.c:function main: warning: Using 'getpwnam' in
> statically linked applications requires at runtime the shared libraries
> from the glibc version used for linking.
>
> See now that your supposed approach to avoid "lock-in" and to provide
> "portability" is doomed ?
>
> Here you have a non-complete or exhaustive list on why suggesting
> "static linking" to solve a problem is fooling yourself
>
> http://www.akkadia.org/drepper/no_static_linking.html
>
> Suggesting to use static linking in a distribution or in a production
> deployment is absolute madness as that means we must rebuild, re-test,
> republish all affected programs when a security problem or bug is found
> in a library.
>
> To put an end on this discussion, I must say the problems you are facing
> are of your making due to the twisted crazy understanding of how the
> system really work or must work.
>
> I rest my case.


Neither of you two are fully right or fully wrong, but she is more right 
than you.

-- 
bkw

-- 
To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org
To contact the owner, e-mail: opensuse+owner@opensuse.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic