From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oGHHItwSwWCF8gAAgWs5BA (envelope-from ) for ; Wed, 09 Jun 2021 21:13:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +MEYHtwSwWC1GwAA1q6Kng (envelope-from ) for ; Wed, 09 Jun 2021 19:13:32 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CB5F114EE2 for ; Wed, 9 Jun 2021 21:13:31 +0200 (CEST) Received: from localhost ([::1]:38552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lr3dq-0001tH-Q3 for larch@yhetil.org; Wed, 09 Jun 2021 15:13:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqyWx-0003Ne-UR for bug-guix@gnu.org; Wed, 09 Jun 2021 09:46:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49302) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqyWv-0007gT-Sh for bug-guix@gnu.org; Wed, 09 Jun 2021 09:46:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lqyWv-0005QG-JY for bug-guix@gnu.org; Wed, 09 Jun 2021 09:46:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#45165: binutils-mesboot0 fails at configure, cannot find lex References: <1C1332EB-3389-416F-A8A7-0CF6A469AE29@carldong.me> In-Reply-To: <1C1332EB-3389-416F-A8A7-0CF6A469AE29@carldong.me> Resent-From: kitzman Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 09 Jun 2021 13:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45165 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 45165@debbugs.gnu.org Received: via spool by 45165-submit@debbugs.gnu.org id=B45165.162324633520807 (code B ref 45165); Wed, 09 Jun 2021 13:46:01 +0000 Received: (at 45165) by debbugs.gnu.org; 9 Jun 2021 13:45:35 +0000 Received: from localhost ([127.0.0.1]:60848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqyWU-0005PW-C8 for submit@debbugs.gnu.org; Wed, 09 Jun 2021 09:45:35 -0400 Received: from knopi.disroot.org ([178.21.23.139]:35530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqyLa-00058n-3s for 45165@debbugs.gnu.org; Wed, 09 Jun 2021 09:34:19 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 7623C5BE49 for <45165@debbugs.gnu.org>; Wed, 9 Jun 2021 15:34:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3msKT6IJFSAq for <45165@debbugs.gnu.org>; Wed, 9 Jun 2021 15:34:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1623245654; bh=hH5wJ1H2nUiZeEMzWNTYQfBNkuHaL7TPah4uK8EkFvU=; h=From:To:Subject:Date; b=JCVvTlJf7WF8vR1llBaczvTGhy3Rkf4WGZrd6KQC6xuoVKFF81SGOY95LtENMucKf bsWsnZDMQe0VepqgRRgMJ01/TjrllK8TlzlWFPKnBCQzkwvgwUlceVtEEjkuubiJ03 56onCmF2rQGeoIQrkdN1PEdRBBf/a7cJopArBmO7vCZZoSl7TsR83FAM9/nv9QD9lb wj8KGlFMeC/tG9xmY1M1Ybbia5+IjTjtxlGqiZn7Q6vrxydVCQuB0psOUimark8NDu lA+CIre8V2TMjl01eDTw6Ws2SoxGPNtp7++oTsp4r5HKQhfpSRhUAPJaRFaC9c7PRf /QtBRKn7jpn2A== Date: Wed, 09 Jun 2021 16:36:37 +0300 Message-ID: <87bl8fkvmi.fsf@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Wed, 09 Jun 2021 09:45:34 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Wed, 09 Jun 2021 15:13:08 -0400 X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" Reply-to: kitzman From: kitzman via Bug reports for GNU Guix X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1623266011; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=0i9sdBFJA6/Ede+JXFlWWDUDM+ifMKFypI0HrdrVHCo=; b=kkFdVgF2LicgvkSwck3/IATh37O01THogP16FDMBhnuREjux0H8faP5KND4ca5Cm3Jbkhv WrXawDOjqSgdCvEAPax/mqS29OGF0UZx2Omz4c/nuNIwJLv12FWOh4bqYyvANoFmr/8BlZ DYvyaF4uPkgPsxcBdQqjhxLM3A7FJGclxWUblcrfMddH/45B4xJp/7jpfGUDPzHG/3teWR ESkHBF1j5pPr+VyxkoaW0HgmHiGBMOES+P/yr/cdMqjS0u/qDWQXlS2HZwtzH4/HIAbjqN X8vTPnDjUoTmNXGb1eiL1fyMaTbbSb88Xt8XQglOPN8pIVhA04/UarOcD9o84A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1623266011; a=rsa-sha256; cv=none; b=nS1XH56G+zfhZoZd/EMjFOiHbAlUv3+Q9DNRIaHozkwe3ZrCT88tuXhefIzePdOTW4ggOJ Ow3G1/c7OE/9clhDA3iZPLGihhShQ3amQwc9SPT7trhx64JFlbI7B8YSQ3fC/i/g9wuEDK aMGL7FySY0EEWnuv9LRLW4F/yuxHZxZ2v8IcfpaDH1HIc3D/a1i6FsDWty3/X6arJtaE/I YA0hRuyYcBsFzWcrfC3I8hme5kDfUliLHjMkcAwthAqZb+4nWRdngW9Kl53v/wR5yVWSUO 2+RpyBQoAqkBUN0SMLhWXs3ObUCw/e8dNpgDzFz3sjREjYrBTD3KrgwVTuy+Og== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=JCVvTlJf; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.43 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=JCVvTlJf; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: CB5F114EE2 X-Spam-Score: -2.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: nOQxoM6h9WlX Dear all, I have ran into the exact same issue (I will assume it's the same source). I suppose this is only relevant for certain forks of the kernel, not the mainline one - I also assume that my train thought might prove useful... hopefully. * Syscalls * The stat syscall works - but then bash tries to getuid (so it knows if it's checking for the owner or for others), and returns -1 (not implemented= ). The returned mode by "stat" is checked in "test_eaccess", line 221, "test.c" of bash 2.05b. There, it checks the euid (to see if it either checks for o+w or u+w). The get[e]?[ug]id functions return -1 in my case - thus making bash believe it's not the same user, thus checking if others can write, and failing. Upon further inspection, the syscall happening to get the ids is actually a 32-bit one - which makes sense considering bash-mesboot0 is built only for i686. Take for example (taken from strace): - syscall 199 (getuid32) - syscall 102 (getuid, for x86_64) - syscall 24 (getuid for 32-bit) The first two work (for me). At the stage of gcc-mesboot1, these are the on= es used. For binutils-mesboot0, the last one is used, and on my system, gives an error. Patching binutils-mesboot0, gawk-mesboot, gnu-make-mesboot was easy: test -w and test -x bash builtins were replaced by their coreutils-mesboot0 counterpart inside the build . Currently I have stumbled upon problems making gcc-mesboot1, which uses make-mesboot, which, when you do a "$(call ...)", internally it tries to do an "execve" syscall (weirdly enough, it does the right syscalls for getuid etc) - syscall 59 (execve) works (my normal make's syscall ALSO bash-mesboot's syscall at this point) - syscall 11 (execve) doesn't (the one used by make), gives ENOMEM Sure, if "test" commands were the only things to be patched I would be contempt with this upload: https://0x0.st/-_5w.scm . But I didn't manage to bootstrap my system only using my kernel. * Kernel * I'm not using a mainline kernel, let alone options. But the standard kernel supplied with my distro works. Referring to kernel's configuration: --- Mine Carl's Libre =E2=9C=93 Arch =E2=9C=93 Option not set not set y y CONFIG_UID16 (obsolete?) not set y y not set CONFIG_EXPERT y y y y CONFIG_X86_64 y y y y CONFIG_X86 (32 + 64, according to docs) not set not set y not set CONFIG_X86_X32 y y y y CONFIG_X86_VSYSCALL_EMULATION y not set y not set CONFIG_LEGACY_VSYSCALL_NONE y y y y CONFIG_IA32_EMULATION --- I'm not even a sub-mediocre when it comes to kernel code: Checking the kernel file arch/x86/entry/syscalls/syscall_32.tbl, that one contains the emulation functions - however, the kernel that I'm using -doesn't- have the IA32 functions defined in the table, but the mainline one does. A quick way to check this is to cat "/proc/kallsyms", look for "__ia32_sys_getuid", and see where (and if) it's mapped in memory. For me, it's not, ergo, the syscalls are not implemented, thus it returns -1. (or so I think) Might this be the issue? ** My solution: ** At this point, the chosen solution for me - build the packages in a VM, and wait for mesboot's x86_64 support. I don't think this is a problem with Guix - I find it normal if IA32 emulation is enabled, to have the syscalls. Kind regards, kitzman