On Fri, Jan 15, 2021 at 7:39 PM haha wang <hahw...@yandex.com> wrote:
> I have founded that at 15 Nov 2020, commit > a1ede3a40249ea2efe54e182998bd8519e37a31e, sthibaul have fixed > includability of <hurd/signal.h> in all standards and removed the > dependence of the `cthread.h`. But it hasn't been released and I would get > the GLIBC source directly from the git repo. > Hi I'm the main contributor of github.com/flavioc/crosshurd and I recommend pulling the new scripts since they will use the upstream glibc repo. I tried it yesterday and it should work just fine. Thanks Flavio > > 15.01.2021, 22:34, "haha wang" <hahw...@yandex.com>: > > I try to compile the Hurd from the source the first time with the help of > cross-hurd. By calling `bash bootstrap.sh", the compiling procedure goes > and passes a few stages. > > ``` > cd src && > compile_binutils && > compile_gmp && > compile_mpfr && > compile_mpc && > compile_gcc && > compile_pkgconfiglite && > install_gnumach_headers && > install_gnumig && > install_hurd_headers && > compile_first_glibc && > compile_full_gcc && > compile_second_glibc && > print_info "bootstrap.sh finished successfully" && > exit 0 > ``` > but it fails and the `compile_first_glibc` stage and get the following > error: > > ``` > mutex-solid.c:20:10: fatal error: cthreads.h: No such file or directory > 20 | #include <cthreads.h> > | ^~~~~~~~~~~~ > compilation terminated. > make[2]: *** > [/home/hahawang/code/hurd/my-cross-hurd/tmp/src/glibc-2.32.first_obj/mach/mutex-solid.o] > Error 1 > make[1]: *** [mach/subdir_lib] Error 2 > make: *** [all] Error 2 > mutex-solid.c:20:10: fatal error: cthreads.h: No such file or directory > 20 | #include <cthreads.h> > | ^~~~~~~~~~~~ > compilation terminated. > ``` > I have found the `cthread.h` within the source package of the gnumach but > not at the include path of the cross-building Hurd. It seems that it > haven't been installed yet. > By reading the `INSTALL-cross` guide, I have found the first compiling of > glibc always fails and you can just ignore it. I do as it told, continue to > compile gcc again. But the second compiling of gcc failed too and dumped > the following error: > > ``` > cc1: note: self-tests are not enabled in this build > cc1plus: note: self-tests are not enabled in this build > In file included from ../../../gcc-9.2.0/libgcc/libgcc2.c:27: > ../../../gcc-9.2.0/libgcc/../gcc/tsystem.h:87:10: fatal error: stdio.h: No > such file or directory > 87 | #include <stdio.h> > | ^~~~~~~~~ > compilation terminated. > make[2]: *** [_muldi3.o] Error 1 > make[1]: *** [all-target-libgcc] Error 2 > make: *** [all] Error 2 > ``` > It seems that compiling gcc the second time needs glibc to provide a > working `stdio.h`, but the glibc also needs a second compiling after the > compiling of gcc succeeds. Now it stuck. I know its a chicken-and-egg > problem, but how to fix it? Should I replace gcc with another version or > find some patch files? Thank you in advance. > > GCC and GLIBC version: > [1] GCC: gcc-9.2.0 > [2] GLIBC: glibc-2.32 > > > -- Flávio Cruz / flavioc...@gmail.com