unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* Cross-building GHC
@ 2013-03-09 12:23 Nikita Karetnikov
  2013-03-14 17:32 ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Nikita Karetnikov @ 2013-03-09 12:23 UTC (permalink / raw)
  To: bug-guix

[-- Attachment #1: Type: text/plain, Size: 2273 bytes --]

I'm trying to cross-build the Glasgow Haskell Compiler 7.6.2 [1].

I got stuck when I was trying to build a cross-compiler (Stage 1).
For some reason, it uses '/usr/bin/ld' instead of a cross-linker.

Could anyone try to reproduce the problem?

The process is described here [2].  If I got it right, you have to run

# ./configure && make && make install && make clean

twice (Stage 0 and libs boot phases).  Then you should be able to
build the Stage 1 compiler:

# ./configure --target=mips64el-linux \
              --with-gcc=/nix/store/khdyz3i5aih56lxfk6hjvp3884apm7qb-gcc-cross-mips64el-linux-gnu-4.7.2/bin/mips64el-linux-gnu-gcc \
              --with-ld=/nix/store/bqw0chxysv4x73mf6bv7jqmgy7553xqh-binutils-cross-mips64el-linux-gnu-2.22/bin/mips64el-linux-gnu-ld \
              --with-nm=/nix/store/khdyz3i5aih56lxfk6hjvp3884apm7qb-gcc-cross-mips64el-linux-gnu-4.7.2/bin/mips64el-linux-gnu-gcc-nm

However, the above doesn't work.  I'm getting the following error:

/usr/bin/ld: /nix/store/mifp2p1zjlvb4ndslw1r8grkpglybqjf-glibc-cross-mips64el-linux-gnu-2.17/include/../lib/crt1.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: /nix/store/mifp2p1zjlvb4ndslw1r8grkpglybqjf-glibc-cross-mips64el-linux-gnu-2.17/include/../lib/crt1.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: /nix/store/mifp2p1zjlvb4ndslw1r8grkpglybqjf-glibc-cross-mips64el-linux-gnu-2.17/include/../lib/crt1.o: Relocations in generic ELF (EM: 8)
/usr/bin/ld: /nix/store/mifp2p1zjlvb4ndslw1r8grkpglybqjf-glibc-cross-mips64el-linux-gnu-2.17/include/../lib/crt1.o: Relocations in generic ELF (EM: 8)
/nix/store/mifp2p1zjlvb4ndslw1r8grkpglybqjf-glibc-cross-mips64el-linux-gnu-2.17/include/../lib/crt1.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
configure: error: Building ghc-pwd failed

The GCC-related configuration, which works for a "hello world" program,
can be found here [3].  The only difference is that I used

# export LIBRARY_PATH=/nix/store/mifp2p1zjlvb4ndslw1r8grkpglybqjf-glibc-cross-mips64el-linux-gnu-2.17/include

instead of C_LIBRARY_PATH.

[1] http://www.haskell.org/ghc/dist/7.6.2/ghc-7.6.2-src.tar.bz2
[2] http://hackage.haskell.org/trac/ghc/wiki/CrossCompilation
[3] https://lists.gnu.org/archive/html/bug-guix/2013-03/msg00047.html

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cross-building GHC
  2013-03-09 12:23 Cross-building GHC Nikita Karetnikov
@ 2013-03-14 17:32 ` Ludovic Courtès
  2013-03-14 19:12   ` Nikita Karetnikov
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2013-03-14 17:32 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> I'm trying to cross-build the Glasgow Haskell Compiler 7.6.2 [1].
>
> I got stuck when I was trying to build a cross-compiler (Stage 1).
> For some reason, it uses '/usr/bin/ld' instead of a cross-linker.

You mean it _tries_ to use it, because it’s not available in chroot
builds, right?

> # ./configure --target=mips64el-linux \
>               --with-gcc=/nix/store/khdyz3i5aih56lxfk6hjvp3884apm7qb-gcc-cross-mips64el-linux-gnu-4.7.2/bin/mips64el-linux-gnu-gcc \
>               --with-ld=/nix/store/bqw0chxysv4x73mf6bv7jqmgy7553xqh-binutils-cross-mips64el-linux-gnu-2.22/bin/mips64el-linux-gnu-ld \
>               --with-nm=/nix/store/khdyz3i5aih56lxfk6hjvp3884apm7qb-gcc-cross-mips64el-linux-gnu-4.7.2/bin/mips64el-linux-gnu-gcc-nm
>
> However, the above doesn't work.  I'm getting the following error:
>
> /usr/bin/ld: /nix/store/mifp2p1zjlvb4ndslw1r8grkpglybqjf-glibc-cross-mips64el-linux-gnu-2.17/include/../lib/crt1.o: Relocations in generic ELF (EM: 8)
> /usr/bin/ld: /nix/store/mifp2p1zjlvb4ndslw1r8grkpglybqjf-glibc-cross-mips64el-linux-gnu-2.17/include/../lib/crt1.o: Relocations in generic ELF (EM: 8)
> /usr/bin/ld: /nix/store/mifp2p1zjlvb4ndslw1r8grkpglybqjf-glibc-cross-mips64el-linux-gnu-2.17/include/../lib/crt1.o: Relocations in generic ELF (EM: 8)
> /usr/bin/ld: /nix/store/mifp2p1zjlvb4ndslw1r8grkpglybqjf-glibc-cross-mips64el-linux-gnu-2.17/include/../lib/crt1.o: Relocations in generic ELF (EM: 8)
> /nix/store/mifp2p1zjlvb4ndslw1r8grkpglybqjf-glibc-cross-mips64el-linux-gnu-2.17/include/../lib/crt1.o: could not read symbols: File in wrong format
> collect2: ld returned 1 exit status
> configure: error: Building ghc-pwd failed

Perhaps it needs both a native GCC and a cross-GCC (ditto for ‘ld’), no?
(For instance because ghc-pwd is a program to run during the build, so
it needs to be a native program.)

Does it have --with-target-gcc or similar in addition to --with-gcc?

If not, you should find the Makefile that triggers the faulty
/usr/bin/ld invocation above, and see if you could patch it somehow.

Wild guesses & free advice.  ;-)

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cross-building GHC
  2013-03-14 17:32 ` Ludovic Courtès
@ 2013-03-14 19:12   ` Nikita Karetnikov
  2013-03-14 23:20     ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Nikita Karetnikov @ 2013-03-14 19:12 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

[-- Attachment #1: Type: text/plain, Size: 1269 bytes --]

> You mean it _tries_ to use it, because it’s not available in chroot
> builds, right?

It'll try to use '/usr/bin/ld' if I run 'unset COMPILER_PATH'.  I guess
that it's trying to autodetect the right linker during './configure'.

However, if I run

export COMPILER_PATH=/nix/store/khdyz3i5aih56lxfk6hjvp3884apm7qb-gcc-cross-mips64el-linux-gnu-4.7.2/libexec/gcc/mips64el-linux-gnu:/nix/store/khdyz3i5aih56lxfk6hjvp3884apm7qb-gcc-cross-mips64el-linux-gnu-4.7.2/libexec/gcc/mips64el-linux-gnu/4.7.2

to specify the location of subprograms, it'll complain about
unrecognized opcodes.  For example:

configure: Building in-tree ghc-pwd
/tmp/ghc30831_0/ghc30831_0.s: Assembler messages:

/tmp/ghc30831_0/ghc30831_0.s:23:0:
     Error: Unrecognized opcode `cmpl $92,3(%esi)'

/tmp/ghc30831_0/ghc30831_0.s:24:0:
     Error: Unrecognized opcode `jne .LcF1'

> Perhaps it needs both a native GCC and a cross-GCC (ditto for ‘ld’), no?
> (For instance because ghc-pwd is a program to run during the build, so
> it needs to be a native program.)

I think that it's the reason for the above messages, but I can't say for
sure.

> Does it have --with-target-gcc or similar in addition to --with-gcc?

No.  Is there a workaround (e.g., envvars)?

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cross-building GHC
  2013-03-14 19:12   ` Nikita Karetnikov
@ 2013-03-14 23:20     ` Ludovic Courtès
  2013-05-16  8:04       ` Nikita Karetnikov
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2013-03-14 23:20 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> You mean it _tries_ to use it, because it’s not available in chroot
>> builds, right?
>
> It'll try to use '/usr/bin/ld' if I run 'unset COMPILER_PATH'.  I guess
> that it's trying to autodetect the right linker during './configure'.
>
> However, if I run
>
> export COMPILER_PATH=/nix/store/khdyz3i5aih56lxfk6hjvp3884apm7qb-gcc-cross-mips64el-linux-gnu-4.7.2/libexec/gcc/mips64el-linux-gnu:/nix/store/khdyz3i5aih56lxfk6hjvp3884apm7qb-gcc-cross-mips64el-linux-gnu-4.7.2/libexec/gcc/mips64el-linux-gnu/4.7.2
>
> to specify the location of subprograms, it'll complain about
> unrecognized opcodes.  For example:

Yes, because COMPILER_PATH will influence both the native and the
cross-compiler.  Same problem as discussed at
<http://gcc.gnu.org/ml/gcc/2013-02/msg00124.html>.  That makes
COMPILER_PATH unusable in this context.

We need to check how to collect2 finds the cross ld, and adjust our
cross-GCC accordingly.

(That’s admittedly very vague, but finding out the details is left as an
exercise to the reader.  ;-)).

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cross-building GHC
  2013-03-14 23:20     ` Ludovic Courtès
@ 2013-05-16  8:04       ` Nikita Karetnikov
  2013-05-16 18:16         ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Nikita Karetnikov @ 2013-05-16  8:04 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

[-- Attachment #1: Type: text/plain, Size: 3785 bytes --]

I said that "you have to run './configure && make && make install &&
make clean' [...] to build the Stage 1 compiler." [1]  This is not
correct:

1. It seems that mips64el is not supported.  So it's necessary to port
   [2] GHC.

2. './configure && make && make install' build the Stage 2 (final)
   compiler, not Stage 1.

I've tried to port through .hc files (as described here [2]).

First I installed the cross-compiler to my profile and ran the following
commands:

# export CPATH="/root/.guix-profile/include"
# export LIBRARY_PATH="/root/.guix-profile/lib"
# export C_INCLUDE_PATH=/nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include

# ln -s /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/lib/crt1.o /nix/store/x4j44am492nnajlwja1c7gs2ikqkdff4-gcc-cross-mips64el-linux-gnu-4.7.3/lib/gcc/mips64el-linux-gnu/4.7.3/crt1.o
# ln -s /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/lib/crti.o /nix/store/x4j44am492nnajlwja1c7gs2ikqkdff4-gcc-cross-mips64el-linux-gnu-4.7.3/lib/gcc/mips64el-linux-gnu/4.7.3/crti.o
# ln -s /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/lib/crtn.o /nix/store/x4j44am492nnajlwja1c7gs2ikqkdff4-gcc-cross-mips64el-linux-gnu-4.7.3/lib/gcc/mips64el-linux-gnu/4.7.3/crtn.o

These symlinks are needed because CROSS_LIBRARY_PATH doesn't work.

I tested the above using a simple C program:

#include<stdio.h>

main()
{
    printf("Hello World");
}

'mips64el-linux-gnu-gcc test.c' didn't return any errors.

After that I unpacked 'ghc-7.6.3-src.tar.bz2' to 'T'.  And replaced
'$GHC_PACKAGE_DB_FLAG' with 'package-db' in 'configure' because it
failed otherwise.

Then I ran these commands:

T# cp /bin/pwd utils/ghc-pwd/ghc-pwd
T# perl boot
T# ./configure --enable-hc-boot --target=mips64el-linux-gnu

'configure' returned lots of errors:

[...]

/nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/bits/types.h:128:3:
     error: #error 

In file included from /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/bits/byteswap.h:27:0:
    0,
                     from /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/endian.h:60,
                     from /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/bits/waitstatus.h:64,
                     from /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/stdlib.h:42,
                     from /usr/local/lib/ghc-7.6.3/include/Rts.h:190,
                     from /tmp/ghc6782_0/ghc6782_0.c:1:

[...]

/nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/bits/types.h:133:1:
     error: unknown type name '__STD_TYPE'

/nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/bits/types.h:133:25:
     error: expected '=', ',', ';', 'asm' or '__attribute__' before '__dev_t'

[...]

/nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/stdio.h:678:1:
     error: unknown type name '__ssize_t'

/nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/stdio.h:781:12:
     error: unknown type name '__off64_t'

/nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/stdio.h:784:1:
     error: unknown type name '__off64_t'
configure: error: Building ghc-pwd failed

Is anything wrong with environment variables?

[1] https://lists.gnu.org/archive/html/bug-guix/2013-03/msg00048.html
[2] http://hackage.haskell.org/trac/ghc/wiki/Building/Porting

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cross-building GHC
  2013-05-16  8:04       ` Nikita Karetnikov
@ 2013-05-16 18:16         ` Ludovic Courtès
  2013-05-17  4:03           ` Nikita Karetnikov
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2013-05-16 18:16 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> 1. It seems that mips64el is not supported.  So it's necessary to port
>    [2] GHC.

Ouch.  Quite an endeavor, I suppose.

> First I installed the cross-compiler to my profile and ran the following
> commands:
>
> # export CPATH="/root/.guix-profile/include"
> # export LIBRARY_PATH="/root/.guix-profile/lib"
> # export C_INCLUDE_PATH=/nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include
>
> # ln -s /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/lib/crt1.o /nix/store/x4j44am492nnajlwja1c7gs2ikqkdff4-gcc-cross-mips64el-linux-gnu-4.7.3/lib/gcc/mips64el-linux-gnu/4.7.3/crt1.o
> # ln -s /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/lib/crti.o /nix/store/x4j44am492nnajlwja1c7gs2ikqkdff4-gcc-cross-mips64el-linux-gnu-4.7.3/lib/gcc/mips64el-linux-gnu/4.7.3/crti.o
> # ln -s /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/lib/crtn.o /nix/store/x4j44am492nnajlwja1c7gs2ikqkdff4-gcc-cross-mips64el-linux-gnu-4.7.3/lib/gcc/mips64el-linux-gnu/4.7.3/crtn.o
>
> These symlinks are needed because CROSS_LIBRARY_PATH doesn't work.

Oh.  I dropped the ball on this issue, but I hope to get back to it Real
Soon Now.

[...]

> After that I unpacked 'ghc-7.6.3-src.tar.bz2' to 'T'.  And replaced
> '$GHC_PACKAGE_DB_FLAG' with 'package-db' in 'configure' because it
> failed otherwise.
>
> Then I ran these commands:
>
> T# cp /bin/pwd utils/ghc-pwd/ghc-pwd
> T# perl boot
> T# ./configure --enable-hc-boot --target=mips64el-linux-gnu
>
> 'configure' returned lots of errors:
>
> [...]
>
> /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/bits/types.h:128:3:
>      error: #error 
>
> In file included from /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/bits/byteswap.h:27:0:
>     0,
>                      from /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/endian.h:60,
>                      from /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/bits/waitstatus.h:64,
>                      from /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/stdlib.h:42,
>                      from /usr/local/lib/ghc-7.6.3/include/Rts.h:190,
>                      from /tmp/ghc6782_0/ghc6782_0.c:1:
>
> [...]
>
> /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/bits/types.h:133:1:
>      error: unknown type name '__STD_TYPE'
>
> /nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include/bits/types.h:133:25:
>      error: expected '=', ',', ';', 'asm' or '__attribute__' before '__dev_t'

You need to have both glibc-mipsel.../include and
linux-libre-headers-mipsel.../include in CROSS_CPATH.  Can you check
whether this is the case.

Another possibility is that it’s picking native headers instead of
cross-headers for some reason.  To check whether this is the case, you
can look at the output of the mipsel-...-gcc --verbose, or just strace
that and look at the .h files it opens.

TIA,
Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cross-building GHC
  2013-05-16 18:16         ` Ludovic Courtès
@ 2013-05-17  4:03           ` Nikita Karetnikov
  2013-05-17 13:31             ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Nikita Karetnikov @ 2013-05-17  4:03 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

[-- Attachment #1: Type: text/plain, Size: 2485 bytes --]

> You need to have both glibc-mipsel.../include and
> linux-libre-headers-mipsel.../include in CROSS_CPATH.  Can you check
> whether this is the case.

Thanks, './configure' works now, I guess.  Here are the variables that I
use (don't forget about the mentioned symlinks):

LIBRARY_PATH=/root/.guix-profile/lib
CPATH=/root/.guix-profile/include
CROSS_CPATH=/nix/store/xisav2mcispg63ns8w9x5blvd14gyrd7-glibc-cross-mips64el-linux-gnu-2.17/include:/nix/store/2lzg1610m9r6kg37ja7nr5fbk6gccd9h-linux-libre-headers-cross-mips64el-linux-gnu-3.3.8/include
PATH=/nix/store/zp44ibqg7wy7rm6ipffzxx6jd1wm79fd-binutils-cross-mips64el-linux-gnu-2.23.2/bin:/root/.guix-profile/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin

There is a new problem.  'make bootstrapping-files' fails:

make -r --no-print-directory -f ghc.mk bootstrapping-files

[...]

/usr/bin/find: `libraries/haskeline/dist-install/build': No such file or directory
/usr/bin/find: `libraries/haskeline/dist-install/build': No such file or directory
/usr/bin/find: `libraries/integer-gmp/dist-install/build': No such file or directory
mkdir inplace
mkdir inplace/bin
mkdir inplace/lib
"rm" -f inplace/bin/mkdirhier  
echo '#!/bin/sh'  		 >> inplace/bin/mkdirhier
cat utils/mkdirhier/mkdirhier.sh >> inplace/bin/mkdirhier
chmod +x inplace/bin/mkdirhier
Creating includes/ghcautoconf.h...
Done.
"rm" -f includes/ghcplatform.h  
Creating includes/ghcplatform.h...
Done.
"inplace/bin/mkdirhier" includes/dist-derivedconstants/build//.
  CC includes/dist-derivedconstants/build/mkDerivedConstants.o
"inplace/bin/mkdirhier" includes/dist-derivedconstants/build/tmp//.
/bin/sh: Syntax error: Unterminated quoted string
make[1]: *** [includes/dist-derivedconstants/build/tmp/mkDerivedConstants] Error 2
make: *** [bootstrapping-files] Error 2

I don't understand what causes the error.

Just for reference, I invoked the following commands:

T# cp /bin/pwd utils/ghc-pwd/ghc-pwd
T# perl boot

Then replaced '$GHC_PACKAGE_DB_FLAG' with 'package-db' in 'configure'.

T# ./configure --enable-hc-boot --target=mips64el-linux-gnu
T# cd libraries/integer-gmp
T/libraries/integer-gmp# ./configure
T/libraries/integer-gmp# cd ../..
T# cd mk
T/mk# cp build.mk.sample build.mk

After that I uncommented the following in 'build.mk':

# An unregisterised, optimised build of ghc, for porting:
BuildFlavour = unreg

T/mk# cd ..
T# make bootstrapping-files

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cross-building GHC
  2013-05-17  4:03           ` Nikita Karetnikov
@ 2013-05-17 13:31             ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2013-05-17 13:31 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

> There is a new problem.  'make bootstrapping-files' fails:
>
> make -r --no-print-directory -f ghc.mk bootstrapping-files
>
> [...]
>
> /usr/bin/find: `libraries/haskeline/dist-install/build': No such file or directory
> /usr/bin/find: `libraries/haskeline/dist-install/build': No such file or directory
> /usr/bin/find: `libraries/integer-gmp/dist-install/build': No such file or directory

So you’re not building with Guix, right?

> mkdir inplace
> mkdir inplace/bin
> mkdir inplace/lib
> "rm" -f inplace/bin/mkdirhier  
> echo '#!/bin/sh'  		 >> inplace/bin/mkdirhier
> cat utils/mkdirhier/mkdirhier.sh >> inplace/bin/mkdirhier
> chmod +x inplace/bin/mkdirhier
> Creating includes/ghcautoconf.h...
> Done.
> "rm" -f includes/ghcplatform.h  
> Creating includes/ghcplatform.h...
> Done.
> "inplace/bin/mkdirhier" includes/dist-derivedconstants/build//.
>   CC includes/dist-derivedconstants/build/mkDerivedConstants.o
> "inplace/bin/mkdirhier" includes/dist-derivedconstants/build/tmp//.
> /bin/sh: Syntax error: Unterminated quoted string
> make[1]: *** [includes/dist-derivedconstants/build/tmp/mkDerivedConstants] Error 2
> make: *** [bootstrapping-files] Error 2

To start with, you could try to find out why /usr/bin/find reports
non-existent directory (above), possibly by checking previous messages
in the build log.  This could be because our cross-compiler somehow
failed before, and that error was silently ignored by GHC’s build
system, for instance.  Or it could be a GHC issue.

HTH,
Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-05-17 13:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-09 12:23 Cross-building GHC Nikita Karetnikov
2013-03-14 17:32 ` Ludovic Courtès
2013-03-14 19:12   ` Nikita Karetnikov
2013-03-14 23:20     ` Ludovic Courtès
2013-05-16  8:04       ` Nikita Karetnikov
2013-05-16 18:16         ` Ludovic Courtès
2013-05-17  4:03           ` Nikita Karetnikov
2013-05-17 13:31             ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).