Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Issues cross-compiling hurd

3 views
Skip to first unread message

Nathan Dehnel

unread,
Jul 16, 2018, 9:51:34 PM7/16/18
to help...@gnu.org
I am trying to compile hurd with cross-hurd, and I get this compilation error:

i586-pc-gnu-gcc -B/cross-tools/bin/ setup-thread.c -c -std=gnu11 -fgnu89-inline  -O2 -Wall -Wundef -Wwrite-strings -fmerge-all-constants -frounding-math -g -Wno-parentheses -Wstrict-prototypes -Wold-style-definition     -ftls-model=initial-exec      -I../include -I/mnt/store/Data/VM/crosshurd-32/cross-hurd/tmp/src/glibc.first_obj/mach  -I/mnt/store/Data/VM/crosshurd-32/cross-hurd/tmp/src/glibc.first_obj  -I../libpthread/sysdeps/mach/hurd/i386  -I../sysdeps/mach/hurd/i386  -I../libpthread/sysdeps/mach/hurd  -I../libpthread/sysdeps/hurd  -I../libpthread/sysdeps/pthread  -I../sysdeps/pthread  -I../sysdeps/mach/hurd  -I../sysdeps/gnu  -I../sysdeps/unix/bsd  -I../sysdeps/unix/inet  -I../sysdeps/mach/i386  -I../libpthread/sysdeps/mach  -I../sysdeps/mach  -I../sysdeps/i386/i586  -I../sysdeps/i386/fpu  -I../sysdeps/x86/fpu/include -I../sysdeps/x86/fpu  -I../libpthread/sysdeps/i386  -I../sysdeps/i386  -I../sysdeps/x86  -I../sysdeps/wordsize-32  -I../sysdeps/ieee754/ldbl-96  -I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754/flt-32  -I../sysdeps/unix  -I../sysdeps/posix  -I../libpthread/sysdeps/posix  -I../sysdeps/ieee754  -I../sysdeps/generic  -I../libpthread -I../hurd -I/mnt/store/Data/VM/crosshurd-32/cross-hurd/tmp/src/glibc.first_obj/hurd/ -I../mach -I/mnt/store/Data/VM/crosshurd-32/cross-hurd/tmp/src/glibc.first_obj/mach/ -I.. -I../libio -I. -nostdinc -isystem /mnt/store/Data/VM/crosshurd-32/cross-hurd/tmp/cross-tools/bin/../lib/gcc/i586-pc-gnu/6.4.0/include -isystem /mnt/store/Data/VM/crosshurd-32/cross-hurd/tmp/cross-tools/bin/../lib/gcc/i586-pc-gnu/6.4.0/include-fixed -isystem /tools/include  -D_LIBC_REENTRANT -include /mnt/store/Data/VM/crosshurd-32/cross-hurd/tmp/src/glibc.first_obj/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h       -o /mnt/store/Data/VM/crosshurd-32/cross-hurd/tmp/src/glibc.first_obj/mach/setup-thread.o -MD -MP -MF /mnt/store/Data/VM/crosshurd-32/cross-hurd/tmp/src/glibc.first_obj/mach/setup-thread.o.dt -MT /mnt/store/Data/VM/crosshurd-32/cross-hurd/tmp/src/glibc.first_obj/mach/setup-thread.o
In file included from ../libpthread/sysdeps/pthread/libc-lockP.h:22:0,
                 from ../sysdeps/mach/libc-lock.h:227,
                 from ../include/link.h:46,
                 from ../include/dlfcn.h:4,
                 from ../sysdeps/generic/ldsodefs.h:32,
                 from ../sysdeps/i386/ldsodefs.h:39,
                 from ../sysdeps/gnu/ldsodefs.h:46,
                 from setup-thread.c:22:
../include/pthread.h:1:26: fatal error: pthread.h: No such file or directory
 #include_next <pthread.h>
                          ^
compilation terminated.

I tried running ./configure LIBS=-lpthread and setting LIBS += -lpthread in configparms, but I'm not really sure what I'm doing. Any suggestions would be appreciated.

Samuel Thibault

unread,
Jul 18, 2018, 8:59:33 PM7/18/18
to Nathan Dehnel, help...@gnu.org
Hello,

Nathan Dehnel, le lun. 16 juil. 2018 18:57:18 -0500, a ecrit:
> I am trying to compile hurd with cross-hurd, and I get this compilation error:

Which source are you taking exactly?

> ../include/pthread.h:1:26: fatal error: pthread.h: No such file or directory
>  #include_next <pthread.h>
>                           ^
> compilation terminated.
>
> I tried running ./configure LIBS=-lpthread and setting LIBS += -lpthread in
> configparms, but I'm not really sure what I'm doing.

The issue is with the header, not the library, so it'd rather be a -I.
But libpthread is supposed to be provided by glibc itself actually, by
using the hurd libpthread repo and adding it as an add-on.

Samuel

Nathan Dehnel

unread,
Jul 19, 2018, 5:01:34 PM7/19/18
to samuel....@gnu.org
>Which source are you taking exactly?
I used the default sources set by cross-hurd in vars.sh: https://github.com/flavioc/cross-hurd

>The issue is with the header, not the library, so it'd rather be a -I.
It doesn't seem to work. Which directory do I include? /usr/include? ./glibc/libpthread/sysdeps/pthread/bits? ./glibc/libpthread/sysdeps/generic/? You're referring to CFLAGS="-I/directory" ./configure, correct?

>But libpthread is supposed to be provided by glibc itself actually, by
using the hurd libpthread repo and adding it as an add-on.
libpthread appears to be in the glibc directory, and is getting passed to configure.
0 new messages