From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4688 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 09:02:09 -0400 Message-ID: References: <20140320231412.GG26358@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c3275c8bcaa904f51d7f8d X-Trace: ger.gmane.org 1395406957 15074 80.91.229.3 (21 Mar 2014 13:02:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Mar 2014 13:02:37 +0000 (UTC) Cc: musl To: Rich Felker Original-X-From: musl-return-4692-gllmg-musl=m.gmane.org@lists.openwall.com Fri Mar 21 14:02:45 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 1WQz5v-0006d4-0o for gllmg-musl@plane.gmane.org; Fri, 21 Mar 2014 14:02:43 +0100 Original-Received: (qmail 1670 invoked by uid 550); 21 Mar 2014 13:02:41 -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 1662 invoked from network); 21 Mar 2014 13:02:40 -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=PTm9+jgW4ZSg7f/oVMm6nH8U8poO3jE4MJhSzq8RmMs=; b=UkVOYko7t+77RuKOdZ5Vvx+FhS2l/mwrYBn3CVIq5XpkRXWu5moypj5p/R4edxFn7E +dOLP7FTjeFjF8E5p+c7kbuddG4WHx2+3K/arXaD0SABuPn9kcsWT0K4lDk4ki54H96I MRdiIdUMo9eKVNXqy6Sd0/zmD3W9mpMRgVHBeROV3lrxsK//XmakkbIu67Ev7Wo2qPPu 98cBgBZ1GxAcDcHPOSlLazZNdn2rot7e8ZVYs83CUw39QJRt2HnAU0q7aUgBJ32xMX7T P4IdLXTu6hIOh2nZDwydZkrOaBR19z2U4QJffdppZZbeTwXQ4GuFKNHeGaleDHkQqHTG /NJA== X-Received: by 10.112.173.169 with SMTP id bl9mr32035404lbc.1.1395406949565; Fri, 21 Mar 2014 06:02:29 -0700 (PDT) In-Reply-To: <20140320231412.GG26358@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:4688 Archived-At: --001a11c3275c8bcaa904f51d7f8d Content-Type: text/plain; charset=ISO-8859-1 Thanks for your reply. I ran a test using an example thread app. I compiled the cond1.c example from http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html using musl-gcc on Ubuntu 13.04, 2.6 kernel obviously. The executable runs on 2.6 as well as 2.4. I actually expected some kind of failure on 2.4. Did I pick a poor example or am I not understanding still? On Thu, Mar 20, 2014 at 7:14 PM, Rich Felker wrote: > On Thu, Mar 20, 2014 at 04:58:49PM -0400, John Mudd wrote: > > Probably a dumb question. Is part of the value of musl that I can build > an > > app using musl on linux 2.6 and then run the binary on linux 2.4? > > The version of Linux you build on has no bearing on the binary that > comes out, so that's not a problem. > > However, Linux 2.4 is not officially supported since it lacks a lot of > functionality needed to provide a modern POSIX conforming environment. > The most notable is that it can't do threads. If you're ok with that, > the other problems might be small enough that you don't mind. I > remember some people in Freenode #musl trying out 2.4 recently and > finding that a few of the busybox applets didn't work right, though, > due to missing statfs64 syscall. > > This page has details on which kernel versions added which syscalls: > > http://man7.org/linux/man-pages/man2/syscalls.2.html > > so it may be helpful in evaluating if there's anything critical you'd > be missing. If a syscall has two versions, one with "64" on the end, > musl needs the one that ends in "64". > > This is definitely a topic we could attempt to document better if more > people are interested in trying to use 2.4. > > Rich > --001a11c3275c8bcaa904f51d7f8d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks for your reply.

I ran a test usi= ng an example thread app. I compiled the=A0cond1.c example from=A0http:/= /www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html using musl-gc= c on Ubuntu 13.04, 2.6 kernel obviously. The executable runs on 2.6 as well= as 2.4. I actually expected some kind of failure on 2.4. Did I pick a poor= example or am I not understanding still?


On Thu,= Mar 20, 2014 at 7:14 PM, Rich Felker <dalias@aerifal.cx> wr= ote:
On Thu, Mar 20, 2014 at 04:5= 8:49PM -0400, John Mudd wrote:
> Probably a dumb question. Is part of the value of musl that I can buil= d an
> app using musl on linux 2.6 and then run the binary on linux 2.4?

The version of Linux you build on has no bearing on the binary that comes out, so that's not a problem.

However, Linux 2.4 is not officially supported since it lacks a lot of
functionality needed to provide a modern POSIX conforming environment.
The most notable is that it can't do threads. If you're ok with tha= t,
the other problems might be small enough that you don't mind. I
remember some people in Freenode #musl trying out 2.4 recently and
finding that a few of the busybox applets didn't work right, though, due to missing statfs64 syscall.

This page has details on which kernel versions added which syscalls:

http://man7.org/linux/man-pages/man2/syscalls.2.html

so it may be helpful in evaluating if there's anything critical you'= ;d
be missing. If a syscall has two versions, one with "64" on the e= nd,
musl needs the one that ends in "64".

This is definitely a topic we could attempt to document better if more
people are interested in trying to use 2.4.

Rich

--001a11c3275c8bcaa904f51d7f8d--