Skip site navigation (1)Skip section navigation (2)
Date:      20 Aug 2002 13:15:15 +0200
From:      ralf <ralf@brainbot.com>
To:        freebsd-stable@freebsd.org, freebsd-hackers@freebsd.org
Subject:   binary incompatible libc ???
Message-ID:  <86fzx9ok70.fsf@monster.brainbot.com>

next in thread | raw e-mail | index | archive | help
Hi,
seems like libc version on 4.6 branch are binary incompatible. Doing a
simple malloc fails, when compiled on a newer version. Linking with
-static makes it work. Programs compiled on older version, work on the
newer one:

ralf@monster:~$ cat t.c
#include <stdlib.h>
#include <stdio.h>

int main()
{
        if (!malloc(100)) {
                perror("malloc failed");
        }
        return 0;
}
ralf@monster:~$ gcc -v; uname -a
Using builtin specs.
gcc version 2.95.4 20020320 [FreeBSD]
FreeBSD monster.brainbot.com 4.6-STABLE FreeBSD 4.6-STABLE #19: Sun Aug 18 22:29:07 CEST 2002     ralf@monster.brainbot.com:/usr/obj/usr/src/sys/MONSTER  i386
ralf@monster:~$ gcc t.c
ralf@monster:~$ ./a.out   
ralf@monster:~$ ssh nibbler
ralf@nibbler:~$ ./a.out 
malloc failed: Cannot allocate memory
ralf@nibbler:~$ gcc -v; uname -a
Using builtin specs.
gcc version 2.95.3 20010315 (release) [FreeBSD]
FreeBSD nibbler.brainbot.com 4.6-STABLE FreeBSD 4.6-STABLE #1: Mon Jun 17 23:07:53 CEST 2002     ralf@nibbler.brainbot.com:/usr/obj/usr/src/sys/GENERIC  i386
ralf@nibbler:~$ 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86fzx9ok70.fsf>