unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: guix-devel@gnu.org, 30537@debbugs.gnu.org
Subject: bug#30537: glibc 2.26 refuses to run on CentOS 6.8
Date: Fri, 23 Feb 2018 23:26:12 +0100	[thread overview]
Message-ID: <87fu5r9wcb.fsf__12435.7205736034$1519424714$gmane$org@gnu.org> (raw)
In-Reply-To: <87eflgstqt.fsf@mdc-berlin.de> (Ricardo Wurmus's message of "Mon, 19 Feb 2018 19:46:02 +0100")

Hello,

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> I have a bad day.  After the upgrade to glibc 2.26 none of the
> Guix-installed software runs on the HPC cluster running CentOS 6.8.

Bah.  :-(

> The glibc 2.26 expects a minimum kernel version of 3.x on x86_64, but
> CentOS 6.8 only comes with a heavily patched 2.6.32.

It’s annoying, but we can surely apply the patch you sent (though rather
by passing ‘--enable-kernel’ if possible, as Danny suggested.)


personality(2) has a knob to change the kernel version reported by
uname(2) to 2.6.  Here it’s a case where we’d need the reverse:
reporting 3.2 instead of 2.6.  That doesn’t seem to exist.

Looking for other hacks (or kludges), I found the kernel module below at
<https://www.linuxquestions.org/questions/linux-general-1/uname-hack-modules-in-kernel-2-6-a-172167/>,
which could be adjusted to report a different kernel version:

--8<---------------cut here---------------start------------->8---
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/utsname.h>

#ifndef UNAME_DUMB_STEPPING
#define UNAME_DUMB_STEPPING '5';
#endif

MODULE_AUTHOR("The one who invented the uname hack");
MODULE_DESCRIPTION("Changes the uname output");
MODULE_LICENSE("GPL");

static int uname_hack_init() {
	save = system_utsname.machine[1];
	system_utsname.machine[1] = UNAME_DUMB_STEPPING;
	return 0;
}

static void uname_hack_cleanup() {
	system_utsname.machine[1] = save;
}

module_init(uname_hack_init);
module_exit(uname_hack_cleanup);
--8<---------------cut here---------------end--------------->8---

Another option would be to ptrace processes, handle the first ‘uname’
call, and then PTRACE_DETACH.  Ugly.

Ludo’.

      parent reply	other threads:[~2018-02-23 22:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 18:46 glibc 2.26 refuses to run on CentOS 6.8 Ricardo Wurmus
     [not found] ` <87d110stkn.fsf@mdc-berlin.de>
     [not found]   ` <87a7w4ssmx.fsf@mdc-berlin.de>
2018-02-19 19:41     ` bug#30537: " Ricardo Wurmus
     [not found]     ` <878tbosr7h.fsf@mdc-berlin.de>
2018-02-19 20:28       ` Jan Nieuwenhuizen
2018-02-21 23:12       ` Mark H Weaver
     [not found]       ` <87bmgiey3k.fsf@netris.org>
2018-02-22 20:30         ` Efraim Flashner
2018-02-23 22:01         ` bug#30537: Grafts vs. early bootstrapping packages Ludovic Courtès
2018-02-20  1:22 ` bug#30537: glibc 2.26 refuses to run on CentOS 6.8 Leo Famulari
2018-02-20 11:52   ` Leo Famulari
2018-02-20 12:34     ` Ricardo Wurmus
2018-02-20 12:51       ` Leo Famulari
2018-02-20 14:33         ` Ricardo Wurmus
2018-02-20 17:55           ` Ricardo Wurmus
2018-02-20  9:39 ` Efraim Flashner
2018-02-23 22:26 ` Ludovic Courtès [this message]

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to='87fu5r9wcb.fsf__12435.7205736034$1519424714$gmane$org@gnu.org' \
    --to=ludo@gnu.org \
    --cc=30537@debbugs.gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=ricardo.wurmus@mdc-berlin.de \
    /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.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).