From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19836 invoked from network); 23 Sep 2020 16:36:47 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 23 Sep 2020 16:36:47 -0000 Received: (qmail 26516 invoked by uid 550); 23 Sep 2020 16:36:44 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 26493 invoked from network); 23 Sep 2020 16:36:43 -0000 Date: Wed, 23 Sep 2020 12:36:31 -0400 From: Rich Felker To: Jeffrey Walton Cc: musl@lists.openwall.com Message-ID: <20200923163630.GK3265@brightrain.aerifal.cx> References: <20200920171446.GB3265@brightrain.aerifal.cx> <2533200.g9kxISXj3W@omega> <20200922184610.GI3265@brightrain.aerifal.cx> <20200923160824.GJ3265@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] Re: OS detection wrong on Alpine Linux 3.10 On Wed, Sep 23, 2020 at 12:16:36PM -0400, Jeffrey Walton wrote: > On Wed, Sep 23, 2020 at 12:08 PM Rich Felker wrote: > > > > On Wed, Sep 23, 2020 at 09:13:16AM -0400, James Y Knight wrote: > > > > > > > > >All I need to know is what version of Musl I am dealing with and I can > > > > >configure myself. > > > > > > > > Are you willing to maintain an #ifdef forest for all the versions of > > > > all the libcs and all the kernels your programs may be used with, so > > > > you can list exhaustively the available features in every configuration? > > > > > > At the risk of jumping in on a question asked of someone else: yes, > > > absolutely! (Not _all_ available features of course, just the ones > > > required.) > > > > > > There are generally not that many nonstandard features you'd want to use in > > > a typical program, and using an ifdef forest to implement an abstraction > > > layer around those couple items is just fine. > > > > I can't know whether you're "willing", but you're definitely not > > willing and able. "All the..." includes people's personal projects > > (from scratch or patches to existing ones) that you will never see, > > future systems that come into existence long past your involvement in > > the project or even your lifetime, etc. > > Unless something has changed recently, Botan, Crypto++ and OpenSSL are > still being carried by most Linux distributions. OpenSSL is also > regularly distributed as part of other OSes, like AIX, Android, BSDs, > iOS, OS X and Solaris. > > And unlike some other projects,[1] Botan, Crypto++ and OpenSSL > actually work in practice on all the platforms without a configuration > program that performs feature tests. OpenSSL most certainly does not; it just has a fairly large set of known systems it works on. Early in musl history there were lots of problems with it; IIRC it wanted to use some broken ancient pty or termio APIs rather than the modern ones because __linux__ && !__GLIBC__, among other things. If you made up a new POSIX-conforming system from scratch and didn't teach OpenSSL about it, I'm almost sure it would have build or runtime problems. > [1] the Rust compiler comes to mind here. It works on Linux x86_64, > but it's hit or miss whether it works or not on other architectures > like ARMv7, Aarch64 and PowerPC, even after an approved configuration > program is run. I think now you're confusing host and target. Of course a compiler needs explicit support for each target arch/ABI, and this is not something detectable. This doesn't mean it can't run on arbitrary hosts. (Of course it's already unable to run on arbitrary hosts because it's written in Rust and thereby has a dependency on something that can't target arbitrary hosts, but you can hack around that with an emulator if you really care.) Rich