Re: Developer environment setup problem

Milos Nikic <[email protected]> Sun, 22 Jun 2025 08:55:16 -0700
Newsgroups gmane.os.hurd.general,gmane.os.hurd.bugs
Message-ID <CAOeJtk_TXfb6CLfy5=jmm-WwbQajhvASZrXbF=DWZHgoyS2SMQ@mail.gmail.com>
--000000000000a10a0706382b1f1c
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Thank you Samuel,

I did post the configs already (but I guess they just got lost in the
emails) here they are again:

https://justpaste.it/gg2af is config log from Debian Hurd

In the meantime I got development from Qemu working thanks to your guys
suggestions. (I already submitted a few small patches). Thanks for that.

Cross compiling I haven't tried again. The log from that day is here:
https://justpaste.it/fya16

Thanks again for all you do!


On Sun, Jun 22, 2025, 7:27=E2=80=AFAM Samuel Thibault <samuel.thibault@gnu.=
org>
wrote:

> Hello,
>
> Milos Nikic, le dim. 15 juin 2025 17:16:54 -0700, a ecrit:
> > I am developing inside qemu (on Arch linux) with debian
> > image debian-hurd-20230608.img.
>
> That image is quite old actually. Perhaps better use a more up-to-date
> image, I have now uploaded 20250622.
>
> > When i ".configure" and then make gnumach it passes.
> > However when i copy it to my /boot/ and then point GRUB to it, i get
> kernel
> > panic on next reboot:.
> >
> > "Kernel page fault at address 0xc1000000, eip =3D 0xc10a73f6
> > Kernel Page fault trap, eip 0xc10a73f6
> > kernel trap, type 14, code =3D 3
> > Dump of i386_saved_state c11dbe98:
> > EAX fffffffc EBX c008993c ECX 3fc22677 EDX 00008000
> > ESI c0ff6e28 EDI c0fffffe EBP c07a3010 ESP 00000004
> > CS 0008 SS 0000 DS 0010 ES 0010 FS 0010 GS 0010
> > v86:            DS 000c ES 0000 FS c037 GS c037
> > EIP c10a73f6 EFLAGS 00010016
> > trapno 14: Page fault, error 00000003
> > panic i386/i386/trap.c:347: kernel_trap: trap"
>
> Possibly the newer gnumach code has build troubles with the older
> compiler from 2023.
>
> > Is a cross compiling route recommended instead?
>
> No, it's more hairy to set up.
>
> [email protected], le lun. 16 juin 2025 20:36:28 +0000, a ecrit:
> > I think that way is fairly easy-ish.  And it
> > makes it easy to apply the Debian specific patches, which you WILL WANT
> to do.
>
> The gnumach package does not have any important debian-specific patch.
> The hurd package does have some, but you don't want to install hurd by
> hand anyway. Like glibc and other such thing deeply integrated into the
> distribution, it won't easily work except for simple cases such as
> the ext2fs translator and such. The rest (configuration files, MAKEDEV
> etc.) always remains quite distribution-specific, so for working on them
> you'd indeed rather work on the debian package.
>
> > And apply the Debian specific patches.  These are patches that mostly
> work,
> > but are NOT quite polished enough
> >
> >  via ... I forget the command it's something like
> >
> > COMMAND_NAME -a
>
> dh_quilt_patch is simplest.
>
> > That applies all of the debian specific commands.  Make your changes,
> then
> > just running make will make GNU Mach.   I think 'make install' should
> > install your changed kernel.
>
> But also headers and whatnot. Simpler to just copy over the kernel into
> /boot/
>
> Milos Nikic, le lun. 16 juin 2025 21:25:21 -0700, a ecrit:
> > Yes I used the pristine gnumach and mig. Just cloned and pulled again
> today.
> >
> > I compiled gnumach on my Linux Arch (cross compiled?).  With a script
> from [1]
> > compile-scratch.sh
> > Then I ran
> > $ make tests/test-task.iso (from my build directory).
> > The thing didn't even compile correctly:
> >
> > /usr/bin/ld: /tmp/ccYq0CRM.o: in function `test_task':
> >
> /home/user/Projects/hurd/gnumach/build/../tests/test-task.c:57:(.text+0x2=
7e):
> > undefined reference to `__stack_chk_fail_local'
>
> As I already mentioned, please post your config.log. Apparently gnumach
> doesn't manage to disable the stack protection feature (not supported in
> kernel mode), we need to determine why that fails on your host while it
> does work on our hosts.
>
> > Lots of errors, such as:
> > ../tests/test-task.c:28:10: fatal error: gnumach.user.h: No such file o=
r
> > directory
> >    28 | #include <gnumach.user.h>
> >
>
> Diego Nieto Cid, le mar. 17 juin 2025 13:38:53 +0100, a ecrit:
> > On Mon, Jun 16, 2025 at 09:25:21PM -0700, Milos Nikic wrote:
> > > $ cd gnumach
> > > $ git fetch origin
> > > $ git reset --hard origin/master
> > > $ autoreconf -i
> > > $ mkdir build
> > > $ cd build
> > > $ ../configure --host=3Di686-gnu CC=3D'gcc -m32'
> >
> > I usually call configure without parameters and let it
> > find the host triplet by itself (which usually is the same
> > as the running system).
>
> If you happen to *need* these options to get things working, that's a
> bug and we *need* to fix it rather than work around it. Again, posting
> your config.log would allow us to actually understand what is happening
> in your case, otherwise we will remain clueless.
>
> Diego Nieto Cid, le jeu. 19 juin 2025 01:16:20 +0100, a ecrit:
> > On Tue, Jun 17, 2025 at 05:18:30PM -0700, Milos Nikic wrote:
> > >
> > > As far as that "n", I have no idea where that is coming from. It's no=
t
> > > happening when I try on the  Host, only inside Hurd.
> > > I see in the Makefile there is a line such as:
> > > MIGCOM =3D $(MIG) -n -cc cat - /dev/null
> > >
> >
> > It's USER_MIG that is missing. For some reason, on i386, gnumach's
> configure
> > doesn't set it.
>
> It does get set here.
>
> *Again*, posting config.log would allow us to determine why that doesn't
> happen on that host.
>
> Diego Nieto Cid, le jeu. 19 juin 2025 01:42:28 +0100, a ecrit:
> > On Thu, Jun 19, 2025 at 01:16:20AM +0100, Diego Nieto Cid wrote:
> > >
> > > You can also test by installing mig from the Debian repository instea=
d
> of
> > > building it from source.
> > >
> >
> > If you go that route you would need:
> >
> >     sudo apt install mig-i686-gnu
> >
> > Or maybe the test makefiles need some fixing, not sure.
>
> Makefiles should be able to whatever is available on the system, yes.
>
> But we need config.log to determine how it's going wrong here.
>
> Samuel
>

--000000000000a10a0706382b1f1c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">Thank you Samuel,<div dir=3D"auto"><br></div><div dir=3D"=
auto">I did post the configs already (but I guess they just got lost in the=
 emails) here they are again:</div><div dir=3D"auto"><br></div><div dir=3D"=
auto"><a href=3D"https://justpaste.it/gg2af" target=3D"_blank" rel=3D"noref=
errer">https://justpaste.it/gg2af</a> is config log from Debian Hurd=C2=A0<=
/div><div dir=3D"auto"><br></div><div dir=3D"auto">In the meantime I got de=
velopment from Qemu working thanks to your guys suggestions. (I already sub=
mitted a few small patches). Thanks for that.</div><div dir=3D"auto"><br></=
div><div dir=3D"auto">Cross compiling I haven&#39;t tried again. The log fr=
om that day is here:</div><div dir=3D"auto"><a href=3D"https://justpaste.it=
/fya16">https://justpaste.it/fya16</a></div><div dir=3D"auto"><br></div><di=
v dir=3D"auto">Thanks again for all you do!</div><div dir=3D"auto"><br></di=
v></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr=
">On Sun, Jun 22, 2025, 7:27=E2=80=AFAM Samuel Thibault &lt;<a href=3D"mail=
to:[email protected]" target=3D"_blank" rel=3D"noreferrer">samuel.thi=
[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,=
<br>
<br>
Milos Nikic, le dim. 15 juin 2025 17:16:54 -0700, a ecrit:<br>
&gt; I am developing inside qemu (on Arch linux) with debian<br>
&gt; image=C2=A0debian-hurd-20230608.img.<br>
<br>
That image is quite old actually. Perhaps better use a more up-to-date<br>
image, I have now uploaded 20250622.<br>
<br>
&gt; When i &quot;.configure&quot; and then make gnumach it passes.<br>
&gt; However when i copy it to my /boot/ and then point GRUB to it, i get k=
ernel<br>
&gt; panic on next reboot:.<br>
&gt; <br>
&gt; &quot;Kernel page fault at address 0xc1000000, eip =3D 0xc10a73f6<br>
&gt; Kernel Page fault trap, eip 0xc10a73f6<br>
&gt; kernel trap, type 14, code =3D 3<br>
&gt; Dump of i386_saved_state c11dbe98:<br>
&gt; EAX fffffffc EBX c008993c ECX 3fc22677 EDX 00008000<br>
&gt; ESI c0ff6e28 EDI c0fffffe EBP c07a3010 ESP 00000004<br>
&gt; CS 0008 SS 0000 DS 0010 ES 0010 FS 0010 GS 0010<br>
&gt; v86: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0DS 000c ES 0000 FS c037 =
GS c037<br>
&gt; EIP c10a73f6 EFLAGS 00010016<br>
&gt; trapno 14: Page fault, error 00000003<br>
&gt; panic i386/i386/trap.c:347: kernel_trap: trap&quot;<br>
<br>
Possibly the newer gnumach code has build troubles with the older<br>
compiler from 2023.<br>
<br>
&gt; Is a cross compiling=C2=A0route recommended instead?<br>
<br>
No, it&#39;s more hairy to set up.<br>
<br>
<a href=3D"mailto:[email protected]" rel=3D"noreferrer noreferrer" target=
=3D"_blank">[email protected]</a>, le lun. 16 juin 2025 20:36:28 +0000, a =
ecrit:<br>
&gt; I think that way is fairly easy-ish.=C2=A0 And it<br>
&gt; makes it easy to apply the Debian specific patches, which you WILL WAN=
T to do.<br>
<br>
The gnumach package does not have any important debian-specific patch.<br>
The hurd package does have some, but you don&#39;t want to install hurd by<=
br>
hand anyway. Like glibc and other such thing deeply integrated into the<br>
distribution, it won&#39;t easily work except for simple cases such as<br>
the ext2fs translator and such. The rest (configuration files, MAKEDEV<br>
etc.) always remains quite distribution-specific, so for working on them<br=
>
you&#39;d indeed rather work on the debian package.<br>
<br>
&gt; And apply the Debian specific patches.=C2=A0 These are patches that mo=
stly work,<br>
&gt; but are NOT quite polished enough <br>
&gt; <br>
&gt;=C2=A0 via ... I forget the command it&#39;s something like<br>
&gt; <br>
&gt; COMMAND_NAME -a<br>
<br>
dh_quilt_patch is simplest.<br>
<br>
&gt; That applies all of the debian specific commands.=C2=A0 Make your chan=
ges, then <br>
&gt; just running make will make GNU Mach.=C2=A0 =C2=A0I think &#39;make in=
stall&#39; should<br>
&gt; install your changed kernel.<br>
<br>
But also headers and whatnot. Simpler to just copy over the kernel into<br>
/boot/<br>
<br>
Milos Nikic, le lun. 16 juin 2025 21:25:21 -0700, a ecrit:<br>
&gt; Yes I used the pristine gnumach and mig. Just cloned and pulled=C2=A0a=
gain today.<br>
&gt; <br>
&gt; I compiled gnumach on my Linux Arch (cross compiled?).=C2=A0 With a sc=
ript from=C2=A0[1]<br>
&gt; compile-scratch.sh<br>
&gt; Then I ran=C2=A0<br>
&gt; $ make tests/test-task.iso (from my build directory).<br>
&gt; The thing didn&#39;t even compile correctly:<br>
&gt; <br>
&gt; /usr/bin/ld: /tmp/ccYq0CRM.o: in function `test_task&#39;:<br>
&gt; /home/user/Projects/hurd/gnumach/build/../tests/test-task.c:57:(.text+=
0x27e):<br>
&gt; undefined reference to `__stack_chk_fail_local&#39;<br>
<br>
As I already mentioned, please post your config.log. Apparently gnumach<br>
doesn&#39;t manage to disable the stack protection feature (not supported i=
n<br>
kernel mode), we need to determine why that fails on your host while it<br>
does work on our hosts.<br>
<br>
&gt; Lots of errors, such as:<br>
&gt; ../tests/test-task.c:28:10: fatal error: gnumach.user.h: No such file =
or<br>
&gt; directory<br>
&gt; =C2=A0 =C2=A028 | #include &lt;gnumach.user.h&gt;<br>
&gt; <br>
<br>
Diego Nieto Cid, le mar. 17 juin 2025 13:38:53 +0100, a ecrit:<br>
&gt; On Mon, Jun 16, 2025 at 09:25:21PM -0700, Milos Nikic wrote:<br>
&gt; &gt; $ cd gnumach<br>
&gt; &gt; $ git fetch origin<br>
&gt; &gt; $ git reset --hard origin/master<br>
&gt; &gt; $ autoreconf -i<br>
&gt; &gt; $ mkdir build<br>
&gt; &gt; $ cd build<br>
&gt; &gt; $ ../configure --host=3Di686-gnu CC=3D&#39;gcc -m32&#39;<br>
&gt; <br>
&gt; I usually call configure without parameters and let it<br>
&gt; find the host triplet by itself (which usually is the same<br>
&gt; as the running system).<br>
<br>
If you happen to *need* these options to get things working, that&#39;s a<b=
r>
bug and we *need* to fix it rather than work around it. Again, posting<br>
your config.log would allow us to actually understand what is happening<br>
in your case, otherwise we will remain clueless.<br>
<br>
Diego Nieto Cid, le jeu. 19 juin 2025 01:16:20 +0100, a ecrit:<br>
&gt; On Tue, Jun 17, 2025 at 05:18:30PM -0700, Milos Nikic wrote:<br>
&gt; &gt; <br>
&gt; &gt; As far as that &quot;n&quot;, I have no idea where that is coming=
 from. It&#39;s not<br>
&gt; &gt; happening when I try on the=C2=A0 Host, only inside Hurd.<br>
&gt; &gt; I see in the Makefile there is a line such as:<br>
&gt; &gt; MIGCOM =3D $(MIG) -n -cc cat - /dev/null<br>
&gt; &gt;<br>
&gt; <br>
&gt; It&#39;s USER_MIG that is missing. For some reason, on i386, gnumach&#=
39;s configure<br>
&gt; doesn&#39;t set it.<br>
<br>
It does get set here.<br>
<br>
*Again*, posting config.log would allow us to determine why that doesn&#39;=
t<br>
happen on that host.<br>
<br>
Diego Nieto Cid, le jeu. 19 juin 2025 01:42:28 +0100, a ecrit:<br>
&gt; On Thu, Jun 19, 2025 at 01:16:20AM +0100, Diego Nieto Cid wrote:<br>
&gt; &gt; <br>
&gt; &gt; You can also test by installing mig from the Debian repository in=
stead of<br>
&gt; &gt; building it from source.<br>
&gt; &gt; <br>
&gt; <br>
&gt; If you go that route you would need:<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0sudo apt install mig-i686-gnu<br>
&gt; <br>
&gt; Or maybe the test makefiles need some fixing, not sure.<br>
<br>
Makefiles should be able to whatever is available on the system, yes.<br>
<br>
But we need config.log to determine how it&#39;s going wrong here.<br>
<br>
Samuel<br>
</blockquote></div>

--000000000000a10a0706382b1f1c--