Re: Circular dependency with glibc libpthread libihash

2014-05-31 Thread Ludovic Courtès
Samuel Thibault  skribis:

> Ludovic Courtès, le Fri 30 May 2014 17:29:27 +0200, a écrit :
>> Manolis Ragkousis  skribis:
>> 
>> > I had to put one more line after AC_NO_EXECUTABLES, otherwise it would 
>> > fail with
>> >>> syntax error near unexpected token `fi'.
>> 
>> AC_NO_EXECUTABLES expands to nothing, hence the error.  It seems that we
>> don’t even have to use it in a conditional.
>
> ? I see in the autoconf source code that it was modified precisely so
> that it can be used in a conditional.

Yes, the comment says that, but it’s unclear to me that’s it’s still
relevant: the macro expands to nothing, so what’s gained by using it in
a conditional?

Anyway, things work as is, so maybe it’s not worth bothering.  ;-)

Ludo’.



Re: Circular dependency with glibc libpthread libihash

2014-05-30 Thread Samuel Thibault
Ludovic Courtès, le Fri 30 May 2014 17:29:27 +0200, a écrit :
> Manolis Ragkousis  skribis:
> 
> > I had to put one more line after AC_NO_EXECUTABLES, otherwise it would fail 
> > with
> >>> syntax error near unexpected token `fi'.
> 
> AC_NO_EXECUTABLES expands to nothing, hence the error.  It seems that we
> don’t even have to use it in a conditional.

? I see in the autoconf source code that it was modified precisely so
that it can be used in a conditional.

Samuel



Re: Circular dependency with glibc libpthread libihash

2014-05-30 Thread Ludovic Courtès
Manolis Ragkousis  skribis:

> I had to put one more line after AC_NO_EXECUTABLES, otherwise it would fail 
> with
>>> syntax error near unexpected token `fi'.

AC_NO_EXECUTABLES expands to nothing, hence the error.  It seems that we
don’t even have to use it in a conditional.

Ludo’.



Re: Circular dependency with glibc libpthread libihash

2014-05-29 Thread Samuel Thibault
Manolis Ragkousis, le Thu 29 May 2014 21:01:02 +, a écrit :
> Works like a charm.

Good, applied, thanks!
Samuel



Re: Circular dependency with glibc libpthread libihash

2014-05-29 Thread Manolis Ragkousis
> Could you try
>
> AC_MSG_WARN("cross-compiling, disabling linking")
>
> ?

diff --git a/configure.ac b/configure.ac
index ecabfdf..7ede6db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,6 +83,13 @@ AC_PROG_INSTALL
 AC_PROG_AWK
 AC_PROG_SED

+if test "x$cross_compiling" = "xyes"; then
+   # It may be that we don't have a working libc yet, for instance
+   # because we're bootstrapping the cross-compilation tool chain.
+   # Thus, use this undocumented Autoconf macro designed for this.
+   AC_NO_EXECUTABLES
+   AC_MSG_WARN("cross-compiling, disabling linking")
+fi
 AC_PROG_CC
 # Require GCC.
 if test x$GCC != xyes; then

Works like a charm.

Manolis



Re: Circular dependency with glibc libpthread libihash

2014-05-29 Thread Samuel Thibault
Manolis Ragkousis, le Wed 28 May 2014 18:47:57 +, a écrit :
> I sent the mail by mistake incomplete, I am sorry.
> 
> > Could you try this patch for the Hurd’s configure.in?
> 
> I had to put one more line after AC_NO_EXECUTABLES, otherwise it would fail 
> with
> >> syntax error near unexpected token `fi'.
> Other than that it works as expected for me.
> 
> diff --git a/configure.ac b/configure.ac
> index ecabfdf..7ede6db 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -83,6 +83,13 @@ AC_PROG_INSTALL
>  AC_PROG_AWK
>  AC_PROG_SED
> 
> +if test "x$cross_compiling" = "xyes"; then
> +   # It may be that we don't have a working libc yet, for instance
> +   # because we're bootstrapping the cross-compilation tool chain.
> +   # Thus, use this undocumented Autoconf macro designed for this.
> +   AC_NO_EXECUTABLES
> +   echo done

Could you try

AC_MSG_WARN("cross-compiling, disabling linking")

?

Samuel



Re: Circular dependency with glibc libpthread libihash

2014-05-28 Thread Manolis Ragkousis
I sent the mail by mistake incomplete, I am sorry.

> Could you try this patch for the Hurd’s configure.in?

I had to put one more line after AC_NO_EXECUTABLES, otherwise it would fail with
>> syntax error near unexpected token `fi'.
Other than that it works as expected for me.

diff --git a/configure.ac b/configure.ac
index ecabfdf..7ede6db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,6 +83,13 @@ AC_PROG_INSTALL
 AC_PROG_AWK
 AC_PROG_SED

+if test "x$cross_compiling" = "xyes"; then
+   # It may be that we don't have a working libc yet, for instance
+   # because we're bootstrapping the cross-compilation tool chain.
+   # Thus, use this undocumented Autoconf macro designed for this.
+   AC_NO_EXECUTABLES
+   echo done
+fi
 AC_PROG_CC
 # Require GCC.
 if test x$GCC != xyes; then

Manolis



Re: Circular dependency with glibc libpthread libihash

2014-05-28 Thread Manolis Ragkousis
> Could you try this patch for the Hurd’s configure.in?

I had to put one more line after AC_NO_EXECUTABLES, otherwise it would fail with
>> syntax error near unexpected token `fi'.



Re: Circular dependency with glibc libpthread libihash

2014-04-11 Thread Ludovic Courtès
Manolis Ragkousis  skribis:

> 0:00 Ludovic Courtès :
>>
>> Could you show what test tries to compile a program?  (Send config.log.)
>>
>
> Here it is

Thanks.

> This file contains any messages produced by compilers while
> running configure, to aid debugging if configure makes a mistake.
>
> It was created by GNU Hurd configure 0.5, which was
> generated by GNU Autoconf 2.69.  Invocation command line was

[...]

> configure:2937: checking whether the C compiler works
> configure:2959: i686-pc-gnu-gccconftest.c  >&5
> /gnu/store/kavylb2khfqq9rj42diyciinv3i8inj4-gcc-cross-sans-libc-i686-pc-gnu-4.8.2/libexec/gcc/i686-pc-gnu/ld:
>  cannot find crt1.o: No such file or directory
> /gnu/store/kavylb2khfqq9rj42diyciinv3i8inj4-gcc-cross-sans-libc-i686-pc-gnu-4.8.2/libexec/gcc/i686-pc-gnu/ld:
>  cannot find crti.o: No such file or directory
> /gnu/store/kavylb2khfqq9rj42diyciinv3i8inj4-gcc-cross-sans-libc-i686-pc-gnu-4.8.2/libexec/gcc/i686-pc-gnu/ld:
>  cannot find -lc
> /gnu/store/kavylb2khfqq9rj42diyciinv3i8inj4-gcc-cross-sans-libc-i686-pc-gnu-4.8.2/libexec/gcc/i686-pc-gnu/ld:
>  cannot find crtn.o: No such file or directory
> collect2: error: ld returned 1 exit status

Could you try this patch for the Hurd’s configure.in?

diff --git a/configure.ac b/configure.ac
index ecabfdf..7ede6db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,6 +83,13 @@ AC_PROG_INSTALL
 AC_PROG_AWK
 AC_PROG_SED
 
+if test "x$cross_compiling" = "xyes"; then
+   # It may be that we don't have a working libc yet, for instance
+   # because we're bootstrapping the cross-compilation tool chain.
+   # Thus, use this undocumented Autoconf macro designed for this.
+   AC_NO_EXECUTABLES
+fi
+
 AC_PROG_CC
 # Require GCC.
 if test x$GCC != xyes; then

Thanks,
Ludo’.


Re: Circular dependency with glibc libpthread libihash

2014-04-11 Thread Manolis Ragkousis
0:00 Ludovic Courtès :
>
> Could you show what test tries to compile a program?  (Send config.log.)
>

Here it is
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU Hurd configure 0.5, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ../source/configure 
CONFIG_SHELL=/gnu/store/281n6ma5jxy9sb3nwc09mzpqx43vczr6-bash-4.2/bin/bash 
SHELL=/gnu/store/281n6ma5jxy9sb3nwc09mzpqx43vczr6-bash-4.2/bin/bash 
--prefix=/gnu/store/qsyxfd97vcy5fq2hkq5r2gaq5zidjpi7-hurd-minimal-cross-i686-pc-gnu-0.5
 --enable-fast-install --host=i686-pc-gnu --without-parted

## - ##
## Platform. ##
## - ##

hostname = localhost
uname -m = x86_64
uname -r = 3.13.6-1-ARCH
uname -s = Linux
uname -v = #1 SMP PREEMPT Fri Mar 7 22:47:48 CET 2014

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch  = unknown
/usr/bin/arch -k   = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo  = unknown
/bin/machine   = unknown
/usr/bin/oslevel   = unknown
/bin/universe  = unknown

PATH: 
/gnu/store/kavylb2khfqq9rj42diyciinv3i8inj4-gcc-cross-sans-libc-i686-pc-gnu-4.8.2/bin
PATH: 
/gnu/store/nkrr16lw55p75483z2an0c67nnqdm4l5-binutils-cross-i686-pc-gnu-2.23.2/bin
PATH: /gnu/store/144wbw5kmmwnxd57zr5q274sx4pa52kd-mig-cross-1.4/bin
PATH: /gnu/store/1i1jcl43kcs9v0g962sj5s70igxy2g2g-autoconf-2.69/bin
PATH: /gnu/store/f4v605p9fva9kjragznh3l28nfpzmcqp-tar-1.27.1/bin
PATH: /gnu/store/7267cq3clzcbgd1k7s5rg0i0vp2yklpl-gzip-1.6/bin
PATH: /gnu/store/a1ir9y0bgaazp6n58y3qbhmfymjq3yxq-bzip2-1.0.6/bin
PATH: /gnu/store/1zs7xnaby6vl49195sid1klx3gk03mwd-xz-5.0.4/bin
PATH: /gnu/store/2ly72pfnmg28ps7jdj83516gvbn6371j-diffutils-3.3/bin
PATH: /gnu/store/1qdk13ly4c5iqqz7nay0x4fn6ls5r1b9-patch-2.7.1/bin
PATH: /gnu/store/gjl05yl9lvgjhznz5v985mys861svp34-coreutils-8.21/bin
PATH: /gnu/store/sj5ivydxwm1943y2g06vhwfwpn9hc1a1-sed-4.2.2/bin
PATH: /gnu/store/v2q2595q6n4gs32j15ga65bgy0yqg76g-grep-2.15/bin
PATH: /gnu/store/r534qbhj6jni2x30q4rgl8ry8rilarak-findutils-4.4.2/bin
PATH: /gnu/store/3j4pxqg9rskk9365m6jqi59pvcyq1d82-gawk-4.1.0/bin
PATH: /gnu/store/pwm61di9kpfks4acn0k6kp2rwa0wjl5j-make-4.0/bin
PATH: /gnu/store/281n6ma5jxy9sb3nwc09mzpqx43vczr6-bash-4.2/bin
PATH: /gnu/store/r7lpkp8d2df74rw24ndcivxvjzdgxn8d-ld-wrapper-0/bin
PATH: /gnu/store/xbryfykc21adgrq3z56g4c6xvv2lb645-binutils-2.23.2/bin
PATH: /gnu/store/z8qifq9172ad17a7mxg9w8jq51axwwqr-gcc-4.8.2/bin
PATH: /gnu/store/5v11czsqd9x9xqvsww9dk7h5i47laym0-glibc-2.18/bin
PATH: /gnu/store/5v11czsqd9x9xqvsww9dk7h5i47laym0-glibc-2.18/sbin


## --- ##
## Core tests. ##
## --- ##

configure:2245: checking build system type
configure:2259: result: x86_64-unknown-linux-gnu
configure:2279: checking host system type
configure:2292: result: i686-pc-gnu
configure:2402: checking for a BSD-compatible install
configure:2470: result: 
/gnu/store/281n6ma5jxy9sb3nwc09mzpqx43vczr6-bash-4.2/bin/bash 
/tmp/nix-build-hurd-minimal-cross-i686-pc-gnu-0.5.drv-0/source/install-sh -c -C
configure:2485: checking for gawk
configure:2501: found 
/gnu/store/3j4pxqg9rskk9365m6jqi59pvcyq1d82-gawk-4.1.0/bin/gawk
configure:2512: result: gawk
configure:2523: checking for a sed that does not truncate output
configure:2587: result: 
/gnu/store/sj5ivydxwm1943y2g06vhwfwpn9hc1a1-sed-4.2.2/bin/sed
configure:2601: checking for i686-pc-gnu-gcc
configure:2617: found 
/gnu/store/kavylb2khfqq9rj42diyciinv3i8inj4-gcc-cross-sans-libc-i686-pc-gnu-4.8.2/bin/i686-pc-gnu-gcc
configure:2628: result: i686-pc-gnu-gcc
configure:2897: checking for C compiler version
configure:2906: i686-pc-gnu-gcc --version >&5
i686-pc-gnu-gcc (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2917: $? = 0
configure:2906: i686-pc-gnu-gcc -v >&5
Using built-in specs.
COLLECT_GCC=i686-pc-gnu-gcc
COLLECT_LTO_WRAPPER=/gnu/store/kavylb2khfqq9rj42diyciinv3i8inj4-gcc-cross-sans-libc-i686-pc-gnu-4.8.2/libexec/gcc/i686-pc-gnu/4.8.2/lto-wrapper
Target: i686-pc-gnu
Configured with: 
Thread model: single
gcc version 4.8.2 (GCC) 
configure:2917: $? = 0
configure:2906: i686-pc-gnu-gcc -V >&5
i686-pc-gnu-gcc: error: unrecognized command line option '-V'
i686-pc-gnu-gcc: fatal error: no input files
compilation terminated.
configure:2917: $? = 1
configure:2906: i686-pc-gnu-gcc -qversion >&5
i686-pc-gnu-gcc: error: unrecognized command line option '-qversion'
i686-pc-gnu-gcc: fatal error: no input files
compilation terminated.
configure:2917: $? = 1
configure:2937: checking whether the C compiler works
configure:2959: i686-pc-gnu-gccconftest.c  >&5
/gnu/store/kavylb2khfqq9rj42diyciinv3i8inj4-gcc-cross-sans-libc-i686-pc-gnu-4.8.2/libexec/gcc/i686-pc-gnu/ld:
 cannot find crt1.o: No such file or directory
/gnu/store/kavylb2khfqq9rj42diyciinv3i8inj4

Re: Circular dependency with glibc libpthread libihash

2014-04-11 Thread Ludovic Courtès
Manolis Ragkousis  skribis:

> When libpthread tries to link against "libihash.so" I get the error:
>
> /lib/libihash.so: file not recognized: File format not recognized.
>
> This happens because libihash was built using the native compiler.
> So I changed the flag in libihash configure to "--host" so it will use
> the cross-compiler. But then I got the error "configure:3008: error: C
> compiler cannot create executables."
> I read the config.log file and the problem arise from this
> /../gcc-cross-sans-libc-i686-pc-gnu-4.8.2/libexec/gcc/i686-pc-gnu/ld:
> cannot find crt1.o: No such file or directory
> /../gcc-cross-sans-libc-i686-pc-gnu-4.8.2/libexec/gcc/i686-pc-gnu/ld:
> cannot find crti.o: No such file or directory
> /../gcc-cross-sans-libc-i686-pc-gnu-4.8.2/libexec/gcc/i686-pc-gnu/ld:
> cannot find -lc
> /../gcc-cross-sans-libc-i686-pc-gnu-4.8.2/libexec/gcc/i686-pc-gnu/ld:
> cannot find crtn.o: No such file or directory
>
> It tries to compile a program, but cannot find these files, so it
> fails. But in order to have them we need glibc.

Could you show what test tries to compile a program?  (Send config.log.)

Thanks,
Ludo’.



Re: Circular dependency with glibc libpthread libihash

2014-04-10 Thread Samuel Thibault
Manolis Ragkousis, le Fri 11 Apr 2014 00:03:40 +, a écrit :
> When libpthread tries to link against "libihash.so" I get the error:
> 
> /lib/libihash.so: file not recognized: File format not recognized.
> 
> This happens because libihash was built using the native compiler.
> So I changed the flag in libihash configure to "--host" so it will use
> the cross-compiler. But then I got the error "configure:3008: error: C
> compiler cannot create executables."

> It tries to compile a program, but cannot find these files, so it
> fails. But in order to have them we need glibc.
> 
> We have a circular dependency glibc+libpthread -> libihash -> glibc,
> so I guess an intermediate glibc is our only option. Or is there
> another way?

I'd say the build system of the hurd repository should be made to accept
not to be able to build programs, and then only build the libraries in
that case. That way it won't need crt stuff.

Samuel