From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4704 Path: news.gmane.org!not-for-mail From: John Mudd Newsgroups: gmane.linux.lib.musl.general Subject: Re: Build on linux 2.6 and run on linux 2.4? Date: Fri, 21 Mar 2014 16:16:29 -0400 Message-ID: References: <20140320231412.GG26358@brightrain.aerifal.cx> <20140321180204.GL26358@brightrain.aerifal.cx> <20140321195324.GN26358@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c3a452dbf9e504f52390f9 X-Trace: ger.gmane.org 1395433012 25187 80.91.229.3 (21 Mar 2014 20:16:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Mar 2014 20:16:52 +0000 (UTC) Cc: musl To: Rich Felker Original-X-From: musl-return-4708-gllmg-musl=m.gmane.org@lists.openwall.com Fri Mar 21 21:17:02 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WR5sE-0000Fc-BW for gllmg-musl@plane.gmane.org; Fri, 21 Mar 2014 21:17:02 +0100 Original-Received: (qmail 18209 invoked by uid 550); 21 Mar 2014 20:17:01 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 18197 invoked from network); 21 Mar 2014 20:17:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=Nthdoq0QiqZvFNH3ZxmbdkStSIGKsn2FPJW+psv/61o=; b=c7yslgsbkl66f8L+odKl9yTH7Kn7WfEl+3y5pAKUi4fEYKF7UCXp3eR8GiNCirRsft 8fXtmoZt/DluNAV9StKo/1UkKqbKhzkPgT3y/vhljNAtNRiepDuYxdMjl2rcUp9ACyOX 8HdVZib6wek/FAUEJLWCEZ96EH+XKRHn+XqGmeuwm1yZvcwPI5Q2+7rsIpaIANTd9aJb g2Zl4iindQ5pfzLnQNZVn4qz7xaNUOIkXwrDtZfOUGNYIrdn2YA6ct/1ZQz518Pr8RJ6 TzylmjRVl4k/ddwBRgLhD0ouyBSb1Cdh/WPGekrwKSTPvChN6/m9Qs9QvolG96ppuo3q SBmg== X-Received: by 10.112.13.70 with SMTP id f6mr26727861lbc.5.1395433009836; Fri, 21 Mar 2014 13:16:49 -0700 (PDT) In-Reply-To: <20140321195324.GN26358@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:4704 Archived-At: --001a11c3a452dbf9e504f52390f9 Content-Type: text/plain; charset=ISO-8859-1 You're too modest? Here's what I get when I build a simple C program on 2.6 without musl and try to run on the RH "2.4". $ test_malloc FATAL: kernel too old Segmentation fault $ $ cat test_malloc.c #include #include #include #include #include #include int main(int argc, char *argv[]) { assert(argc == 2); int n = atoi(argv[1]); char *c = malloc(n); printf("allocated.\n"); memset(c, 0, n); printf("set.\n"); printf("sleeping...\n"); sleep(60); return 0; } $ On Fri, Mar 21, 2014 at 3:53 PM, Rich Felker wrote: > On Fri, Mar 21, 2014 at 03:48:31PM -0400, John Mudd wrote: > > $ getconf GNU_LIBPTHREAD_VERSION > > NPTL 0.60 > > $ > > > > So that's it, I lucked out? I can start building my apps on a modern > Linux > > and still run on my older ones? If so then this is like being told time > > travel is possible. > > Your luck is just that your kernel that claims to be 2.4 is really > essentially 2.6, so it's not as old as you think it is. My impression > is that "enterprise" vendors like RH like to stick with the version > number that was widely known as being stable and reliable at the time, > and end up applying so many patches/backports/local customizations > that the old version number is pretty misleading. > > Anyway, if your goal is just to be able to run programs on this > version of RHEL, you should be fine! If you also need to run on other > old systems that print "2.4" as their version number, you probably > need to do further research. > > Rich > --001a11c3a452dbf9e504f52390f9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
You're too modest? Here's what I get when I build = a simple C program on 2.6 without musl and try to run on the RH "2.4&q= uot;.=A0

$ test_malloc =A0
FATAL: kernel = too old
Segmentation fault
$=A0

= $ cat test_malloc.c
#include <stdio.h>
#include &= lt;stdlib.h>
#include <unistd.h>
#include <= malloc.h>
#include <memory.h>
#include <assert.h>

int main(int argc, char *argv[])
{
=A0= =A0 assert(argc =3D=3D 2);

=A0 =A0 int n =3D atoi= (argv[1]);
=A0 =A0 char *c =3D malloc(n);
=A0 =A0 printf("allocate= d.\n");
=A0 =A0 memset(c, 0, n);
=A0 =A0 printf(&q= uot;set.\n");
=A0 =A0 printf("sleeping...\n");
=A0 =A0 sleep(60);

=A0 =A0 return 0;
}
$




On Fri, Mar 21, 2014 at 3:53 PM, Rich Felker <dalias@= aerifal.cx> wrote:
On Fri, Mar 21, 2014 at 03:4= 8:31PM -0400, John Mudd wrote:
> $ getconf GNU_LIBPTHREAD_VERSION
> NPTL 0.60
> $
>
> So that's it, I lucked out? I can start building my apps on a mode= rn Linux
> and still run on my older ones? If so then this is like being told tim= e
> travel is possible.

Your luck is just that your kernel that claims to be 2.4 is really essentially 2.6, so it's not as old as you think it is. My impression is that "enterprise" vendors like RH like to stick with the versi= on
number that was widely known as being stable and reliable at the time,
and end up applying so many patches/backports/local customizations
that the old version number is pretty misleading.

Anyway, if your goal is just to be able to run programs on this
version of RHEL, you should be fine! If you also need to run on other
old systems that print "2.4" as their version number, you probabl= y
need to do further research.

Rich

--001a11c3a452dbf9e504f52390f9--