Hi, Currently hurd FTBFS on GNU/Hurd due to a problem with the Makeconf/mkinstalldirs scripts. From the build log: make -C libshouldbeinlibc install make[3]: Entering directory '/home/.../hurd-0.9.git20211230/build-deb/ libshouldbeinlibc' mkdir /home mkdir: cannot create directory ‘/home’: File exists mkdir /home/.../hurd-0.9.git20211230/debian/tmp/lib mkdir /home/.../hurd-0.9.git20211230/debian/tmp/lib/i386-gnu ../../Makeconf:307: recipe for target '/home/.../hurd- 0.9.git20211230/debian/tmp/lib/i386-gnu' failed make[3]: *** [/home/.../hurd-0.9.git20211230/debian/tmp/lib/i386-gnu] Error 1 make[3]: Leaving directory '/home/.../hurd-0.9.git20211230/build- deb/libshouldbeinlibc' ../Makefile:280: recipe for target 'libshouldbeinlibc-install' failed make[2]: *** [libshouldbeinlibc-install] Error 2 On the buildd the build succeeds: make[3]: Entering directory '/<<PKGBUILDDIR>>/build- deb/libshouldbeinlibc' mkdir /<<PKGBUILDDIR>>/debian/tmp/lib mkdir /<<PKGBUILDDIR>>/debian/tmp/lib/i386-gnu mkdir /<<PKGBUILDDIR>>/debian/tmp/usr mkdir /<<PKGBUILDDIR>>/debian/tmp/usr/include where I: NOTICE: Log filtering will replace 'build/hurd-52h0Hx/hurd- 0.9.git20211230' with '<<PKGBUILDDIR>>' Maybe building hurd in a chroot would also succeed. This has not been attempted yet. The attached patch, Makeconf.patch, has been used to successfully build hurd on GNU/Hurd locally. Alternately one could modify mkinstalldirs accordingly since MKINSTALLDIRS = $(top_srcdir)/mkinstalldirs, and replacing mkdir with mkdir -p, as given in mkinstalldirs.patch. With this patch hurd builds fine too. It might be the preferred solution. From the build log: make -C libshouldbeinlibc install make[3]: Entering directory '/home/hurd-0.9.git20211230/build- deb/libshouldbeinlibc' mkdir -p /home/.../hurd-0.9.git20211230/debian/tmp/lib mkdir -p /home/.../hurd-0.9.git20211230/debian/tmp/lib/i386-gnu mkdir -p /home/.../hurd-0.9.git20211230/debian/tmp/usr mkdir -p /home/.../hurd-0.9.git20211230/debian/tmp/usr/include Thanks!
Hello, Svante Signell, le mar. 25 janv. 2022 16:15:46 +0100, a ecrit: Is this really unmodified source code? I don't see how there could be an mkdir /home triggered by the build rules you are patching: None of these are to be /home The -d test just above makes it so that since /home already exists, no mkdir would be called. Here there is not even an "mkdir" printed, so it's not the patch that fixed it, but something else, which is what you should rather be after. I'd say revert your patch, and check e.g. with stat why exactly the "test ! -d $pathcomp" wouldn't say that /home is already a directory. And check with e.g. echo what rule exactly produces such mkdir /home on your system, there is really no reason for it to be there. Samuel
Yes, unmodified sources. Found on two up-to-date images already. Could this be related to the /proc/5/stat bug?
Svante Signell, le mar. 25 janv. 2022 17:04:41 +0100, a ecrit: I don't see how that could be. Samuel
BTW: When you (or somebody else) have confirmed/not confirmed building the latest hurd successfully on an up-to-date image (no chroot, no buildd) we can continue this discussion. If not this discussion ends here. Thanks!
Svante Signell, le mar. 25 janv. 2022 17:52:13 +0100, a ecrit: When I hack on the hurd package I don't use a chroot or a buildd. I can confirm again that building the package with a mere dpkg-buildpackage works fine for me. This is as non-root user, I tried both on the / partition, and on a separate partition. I also tried upgrading the 20210812 image to the latest packages, it built successfully. I do get the /proc/5/stat error, so that doesn't seem to be the trigger. So yes, it seems that the investigation has to happen on your systems. Samuel
But on a third image I get: mkdir: cannot create directory ‘/home’: File exists Something is fishy...
Svante Signell, le mar. 25 janv. 2022 22:15:50 +0100, a ecrit: As I already wrote, first make sure exactly *what* is producing this call. That way you'll see where the fish comes from. Samuel
I'd really appreciate to know the difference of an old image upgraded to current and a new one?? Thanks!
Svante Signell, le mar. 25 janv. 2022 23:40:17 +0100, a ecrit: No idea. As I've already written, I'm just using the debian-hurd-20210812.img image, upgraded to current archive. Samuel
I did add set -x to mkinstalldirs: make[3]: Entering directory '/home/.../hurd-0.9.git20211230/build- deb/libshouldbeinlibc' + errstatus=0 + echo :/home/.../hurd-0.9.git20211230/debian/tmp/lib/i386-gnu + sed -ne s/^:\//#/;s/^://;s/\// /g;s/^#/\//;p + set fnord /home srs DEBs hurd hurd-0.9.git20211230 debian tmp lib i386-gnu + shift + pathcomp= + pathcomp=/home + test ! -d /home + echo mkdir /home mkdir /home + mkdir /home mkdir: cannot create directory ‘/home’: File exists + lasterr=1 + test ! -d /home + errstatus=1 + pathcomp=/home/ ...
Svante Signell, le mer. 26 janv. 2022 10:31:23 +0100, a ecrit: Ah ok, that's what /home comes from, mkinstalldirs already splits the path into separate components. So here the problem is that test ! -d /home says that /home is not a directory. Is there anything special about your /home path? Perhaps show the output of stat /home Samuel
Size: 4096 Blocks: 8 IO Block: 8192 directory
Device: 1a0h/416d Inode: 2 Links: 4
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2022-01-27 07:58:34.000000000 +0100
Modify: 2017-01-20 13:14:35.000000000 +0100
Change: 2017-01-20 13:14:35.000000000 +0100
Birth: -
With similar results for the other two boxes.
cat /etc/fstab:
/dev/hd0s6 /home ext2 defaults 0 2
/dev/hd0s2 /home ext2 defaults 0 2
/dev/hd0s2 /home ext2 defaults 0 2
/bin/sh is linked to dash.
dash 0.5.11+git20210903+057cd650a4ed-3
On all boxes the little script
#! /bin/sh
if test ! -d /home; then
echo "/home is not a directory"
else
echo "/home is a directory"
fi
returns : /home is a directory
and:
file /home
/home: directory
Thanks!
Svante Signell, le jeu. 27 janv. 2022 12:08:47 +0100, a ecrit: One additional thing is that make install is run under fakeroot, so you'll have to also involve fakeroot in your tests. Samuel
fakeroot is automatically called. But here is one result: fakeroot stat /home File: /home Size: 4096 Blocks: 8 IO Block: 8192 directory Device: 1a1h/417d Inode: 2 Links: 4 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2022-01-26 23:12:36.000000000 +0100 Modify: 2019-07-05 23:29:24.000000000 +0200 Change: 2019-07-05 23:29:24.000000000 +0200 Birth: - fakeroot ./test_for_directory.sh /home is a directory
Svante Signell, le jeu. 27 janv. 2022 23:17:38 +0100, a ecrit: I'm out of ideas for now. Perhaps you could add the stat call inside the mkinstalldirs script, to make sure that yes the stat() call does report non-directory here. And perhaps also call ps there, to perhaps see the actual situation it's getting run under. Perhaps fakeroot-tcp vs fakeroot-hurd? Samuel