From owner-freebsd-stable Tue Aug 20 8:15:26 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB5C937B405 for ; Tue, 20 Aug 2002 08:15:20 -0700 (PDT) Received: from mail.brainbot.com (mail.brainbot.com [134.93.7.97]) by mx1.FreeBSD.org (Postfix) with SMTP id F01C043E42 for ; Tue, 20 Aug 2002 08:15:18 -0700 (PDT) (envelope-from ralf@brainbot.com) Received: (qmail 30322 invoked from network); 20 Aug 2002 11:15:15 -0000 Received: from monster.brainbot.com (192.168.10.58) by heini.brainbot.com with SMTP; 20 Aug 2002 11:15:15 -0000 Received: (qmail 5627 invoked by uid 1001); 20 Aug 2002 11:15:15 -0000 To: freebsd-stable@freebsd.org, freebsd-hackers@freebsd.org Subject: binary incompatible libc ??? From: ralf Date: 20 Aug 2002 13:15:15 +0200 Message-ID: <86fzx9ok70.fsf@monster.brainbot.com> Lines: 31 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 #include 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