mailing list of musl libc
 help / color / mirror / code / Atom feed
From: John Mudd <johnbmudd@gmail.com>
To: Rich Felker <dalias@aerifal.cx>
Cc: musl <musl@lists.openwall.com>
Subject: Re: Build on linux 2.6 and run on linux 2.4?
Date: Fri, 21 Mar 2014 16:16:29 -0400	[thread overview]
Message-ID: <CAGDMk9G6m7Td28JP-+isNKHNHPKGsSdfmu8Kjd07YNMcbhyXNQ@mail.gmail.com> (raw)
In-Reply-To: <20140321195324.GN26358@brightrain.aerifal.cx>

[-- Attachment #1: Type: text/plain, Size: 1603 bytes --]

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 <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <malloc.h>
#include <memory.h>
#include <assert.h>

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 <dalias@aerifal.cx> 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
>

[-- Attachment #2: Type: text/html, Size: 2557 bytes --]

  reply	other threads:[~2014-03-21 20:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-20 20:58 John Mudd
2014-03-20 23:14 ` Rich Felker
2014-03-21  0:51   ` Rich Felker
2014-03-26  6:22     ` Rich Felker
2014-03-21 13:02   ` John Mudd
2014-03-21 16:40     ` Rich Felker
2014-03-21 17:54     ` John Mudd
2014-03-21 18:02       ` Rich Felker
2014-03-21 18:24         ` John Mudd
2014-03-21 19:09           ` Rich Felker
2014-03-21 19:48           ` John Mudd
2014-03-21 19:53             ` Rich Felker
2014-03-21 20:16               ` John Mudd [this message]
2014-03-22 11:12                 ` Szabolcs Nagy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGDMk9G6m7Td28JP-+isNKHNHPKGsSdfmu8Kjd07YNMcbhyXNQ@mail.gmail.com \
    --to=johnbmudd@gmail.com \
    --cc=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).