From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CE+LHfB+/GChTAEAgWs5BA (envelope-from ) for ; Sat, 24 Jul 2021 22:58:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id gJUXGfB+/GClIAAAB5/wlQ (envelope-from ) for ; Sat, 24 Jul 2021 20:58:24 +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 606021DA0B for ; Sat, 24 Jul 2021 22:58:23 +0200 (CEST) Received: from localhost ([::1]:46036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7Oiz-00087J-1v for larch@yhetil.org; Sat, 24 Jul 2021 16:58:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7Oim-00087A-St for help-guix@gnu.org; Sat, 24 Jul 2021 16:58:09 -0400 Received: from tobias.gr ([2a02:c205:2020:6054::1]:59202) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7Oik-0004GZ-RX for help-guix@gnu.org; Sat, 24 Jul 2021 16:58:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=MDjOV8IsEyIhe 21Y87r2lcYibJfH+O8/rEqkmoWwqVQ=; h=references:in-reply-to:subject:cc: to:from:date; d=tobias.gr; b=U0fqGg8fpGuDMEtStpBl45BI81Ap+WZTWGhGG2ALO kCDIK/4IEwAqFqxfzzm7Pq0jcSOB+a0+tHuG2kROwTbXL6Z+WDvwlXNBl1d5WzDVSxbsDe Z18CfeWXK9IHGFYErnmUhtzG0Mtd5tH+sCV+/oKTIhwdmYjuEbVxQ/cZrbV6gbjr+NyCpT hH2E7luqYBWrxTJT0pbayQ1icmLKYiso/pwW0sq3gmNqq7j1tDpfiTqS0RyTHPl2Oceoix tT6lJjuVs8g0m2NakYG2EMV8YnkqzIBpXQqoHLNU7+igzdWeF9yhATjckaXF396xDL7MtU qaRQnYSSd9ckIyN1Jzarw== Received: by submission.tobias.gr (OpenSMTPD) with ESMTP id c5643d03; Sat, 24 Jul 2021 20:57:53 +0000 (UTC) MIME-Version: 1.0 Date: Sat, 24 Jul 2021 22:57:53 +0200 From: Tobias Geerinckx-Rice To: phodina Cc: help-guix@gnu.org Subject: Re: Packaging hwinfo In-Reply-To: References: Message-ID: <0ff93c0059ca0941f404b52409c19b2c@tobias.gr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627160304; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=MDjOV8IsEyIhe21Y87r2lcYibJfH+O8/rEqkmoWwqVQ=; b=BspUmaZBbeabBOgXhBOqkGqnH76gIPc9qs+i+yK/3ZLLTvSbhgNh8cPm5jb1sYZ3Co/n5e aZOwbURpOJnExq+m3Xto8UjA8aGNvgV42HwMJ4MgFqb0T4NngXcQOvOOer87N/lqYyKwc4 rm0ImrGg27Sq6mpId4tscQZaCaneW3ZNE/vNoV8GInodlkaicCGTzJGvOaduPp69MYd2rK 5ido1XecUP/r9MIfYZhYRdH9S9aQc9HgceUkvMlDD0eA+VABbNpUPBMAf/M5ChOdmYxzxG 2CXaDQAODh6187bVkZPRZmTrbSLkRq53laqsvQIBfui3UNHdqA4NylkEit00fw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627160304; a=rsa-sha256; cv=none; b=EOiEaWtm2E+PNfBvS6GpdYtky5oBPO/cs4VHeum6tfEqhpvZbHCmr7aNbvwTT1cC2R/obF kNhD8k3wSMVAv2bxVh6OhlbZkLPWB2jIr9OY0k58o7tjFWpuJj3ZQQ+/Fbir8cP1bE89Xk nQ/ngQKjoVtlrlS3aJNK9eWO09NPImiguKpBkyKA2mNYuPmAf2b2+bXEgQVhRriTiIgKKJ R/8vmaQVHcRvnNMKpp7wlJPpgpLX3N4HSWGzwEYCjQDofMf8CKCK78YMUkwCpgUuQhMaCo QfoHk1JbQokJb7RUTqxKrZEYXUdfWQJLHyqAMiGLzWrV0F+VnWP3zX76y76AQg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=tobias.gr header.s=2018 header.b=U0fqGg8f; dmarc=pass (policy=reject) header.from=tobias.gr; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=tobias.gr header.s=2018 header.b=U0fqGg8f; dmarc=pass (policy=reject) header.from=tobias.gr; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 606021DA0B X-Spam-Score: -3.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: XahANeRuynMY Petr, > Besides I also opened an issue Thanks! A good reflex, whether or not upstream cares or notices. Please share packages in a form that can easily be built by others. I added missing module imports and changed a forgotten /usr/lib to /lib. Please also place {native-,}inputs after arguments. Phases need no longer return #t. > CFLAGS+="-fPIC -I$srcdir/$pkgname/src/hd -w" This does not look relevant, so I didn't add it anywhere. > starting phase `build' > gcc -c -O2 -Wall -Wno-pointer-sign -pipe -g > -I/tmp/guix-build-hwinfo-21.75.drv-0/source/src/hd -Lsrc hwinfo.c > make: *** No rule to make target > '/tmp/guix-build-hwinfo-21.75.drv-0/source/src/libhd.a', needed by > 'hwinfo'. Stop. > > The build continues And how: make: *** Waiting for unfinished jobs.... make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. make[1]: Entering directory '/tmp/guix-build-hwinfo-21.75.drv-0/source/src' make[2]: Entering directory '/tmp/guix-build-hwinfo-21.75.drv-0/source/src/hd' i.e.: "Oh no, you made some mistake, I can't make libhd! Anyway, before I perish dramatically, let's chdir into this here 'src/hd' directory and make whatever's there. ¯\_( ツ )_/¯ I'm sure it won't be relevant lol." That's one bug that only upstream can fix. For now, set "#:parallel-build? #f" (with a detailed comment!) and you'll be on your merry, slow, way. Alas: > /gnu/store/74ldv6c74gslx5irsa0a8kn54yi4gc3h-hwinfo-21.75/bin/hwinfo: > error: depends on 'libhd.so.21', which cannot be found in RUNPATH Weird, but (search for '-Wl,-rpath' in Guix) it happens. Let's--no, wait a minute, strange things are afoot: tree /gnu/store/74ldv6c74gslx5irsa0a8kn54yi4gc3h-hwinfo-21.75 ├── bin │   ├── check_hd │   ├── convert_hd │   ├── getsysinfo │   ├── hwinfo │   └── mk_isdnhwdb ├── gnu │   └── store │   └── 74ldv6c74gslx5irsa0a8kn54yi4gc3h-hwinfo-21.75 │   └── lib │   ├── libhd.so -> libhd.so.21 [...] Afootness intensifies: > (string-append "DESTDIR=" %output) Seeing DESTDIR= is never a good sign (I didn't check whether its use in libx86emu is warranted or not). Let's stick with hwinfo & peer into its Makefile again: > ULIBDIR = $(LIBDIR) > [...] > install -d -m 755 $(DESTDIR)/sbin $(DESTDIR)/usr/sbin \ > $(DESTDIR)$(ULIBDIR) Really? No support for the standard $prefix variable? Cool. Making LIBDIR 'relative' works around that. Not the rpath issue, so: > "LIBDIR=/lib" > (string-append "LDFLAGS=-Lsrc -Wl,-rpath=" %output "/lib") The "-Lsrc" is repeated from upstream, because VARIABLE+= on the make command line doesn't actually work. With that, it finally builds and runs. Some software just isn't fun to package. From hwinfo: > using /var/lib/hardware This might need fixing. There may be remaining issues with the package(s); I'm out of time. From the build log: > info(FRITZ!Card PCMCIA): This card has multiple drivers, some functions > are only available on the binonly driver We'll need to make sure this package doesn't include or 'promote' binary blobs in any way. Thanks! T G-R Sent from a Web browser. Excuse or enjoy my brevity.