From: Tobias Geerinckx-Rice <me@tobias.gr>
To: phodina <phodina@protonmail.com>
Cc: help-guix@gnu.org
Subject: Re: Packaging hwinfo
Date: Sat, 24 Jul 2021 22:57:53 +0200 [thread overview]
Message-ID: <0ff93c0059ca0941f404b52409c19b2c@tobias.gr> (raw)
In-Reply-To: <xfxGnQpbAwfZ-JnYj-l_SzE9WikpjC9tymHZfysizrO1Yqca9Ot1mn8WkAsKu4RrWrKwE4VcfkavgIYmmyVDx77WaQyHDeTkTNvvhcRGVWQ=@protonmail.com>
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.
next prev parent reply other threads:[~2021-07-24 20:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-24 15:56 Packaging hwinfo phodina
2021-07-24 17:44 ` Wiktor Żelazny
2021-07-24 18:20 ` phodina
2021-07-24 19:50 ` Wiktor Żelazny
2021-07-24 20:57 ` Tobias Geerinckx-Rice [this message]
2021-07-26 6:09 ` phodina
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=0ff93c0059ca0941f404b52409c19b2c@tobias.gr \
--to=me@tobias.gr \
--cc=help-guix@gnu.org \
--cc=phodina@protonmail.com \
/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.
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).