[GHC] #9982: cross building integer-gmp is running target program on build host

#9982: cross building integer-gmp is running target program on build host -------------------------------------+------------------------------------- Reporter: newsham | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build | Version: 7.8.4 System | Operating System: Linux Keywords: | Type of failure: Building GHC Architecture: | failed Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- I am trying to build ghc-7.8.4 as a cross compiler. After stage1 finishes and it tries to build libraries it detects that it can link against an existing -gmp and gmp.h (which is what I intended) and starts building the libraries/integer-gmp package against it. During the build it builds the inplace/lib/bin/mkGmpDerivedConstants binary for the target (genode) and then runs it on the build host (ubuntu linux), which leads to failure. The error emitted during the build is: "cp" -p libraries/integer- gmp/mkGmpDerivedConstants/dist/build/tmp/mkGmpDerivedConstants inplace/lib/bin/mkGmpDerivedConstants "rm" -f inplace/lib/mkGmpDerivedConstants echo '#!/bin/bash' >> inplace/lib/mkGmpDerivedConstants echo 'executablename="/u1/home/newsham/src/genode/ghc-7.8.4/inplace/lib/bin/mkGmpDerivedConstants"'
inplace/lib/mkGmpDerivedConstants echo 'datadir="/u1/home/newsham/src/genode/ghc-7.8.4/inplace/lib"' inplace/lib/mkGmpDerivedConstants echo 'bindir="/u1/home/newsham/src/genode/ghc-7.8.4/inplace/bin"' inplace/lib/mkGmpDerivedConstants echo 'topdir="/u1/home/newsham/src/genode/ghc-7.8.4/inplace/lib"' inplace/lib/mkGmpDerivedConstants echo 'pgmgcc="/u1/home/newsham/src/genode/ghc-7.8.4/wrapper-gcc"' inplace/lib/mkGmpDerivedConstants echo 'export LD_LIBRARY_PATH=":$LD_LIBRARY_PATH"' >> inplace/lib/mkGmpDerivedConstants echo 'exec "$executablename" ${1+"$@"}' >> inplace/lib/mkGmpDerivedConstants chmod +x inplace/lib/mkGmpDerivedConstants inplace/lib/mkGmpDerivedConstants > libraries/integer- gmp/mkGmpDerivedConstants/dist/GmpDerivedConstants.h inplace/lib/mkGmpDerivedConstants: line 8: /u1/home/newsham/src/genode/ghc-7.8.4/inplace/lib/bin/mkGmpDerivedConstants: No such file or directory make[1]: *** [libraries/integer- gmp/mkGmpDerivedConstants/dist/GmpDerivedConstants.h] Error 127 make[1]: *** Deleting file `libraries/integer- gmp/mkGmpDerivedConstants/dist/GmpDerivedConstants.h' make: *** [all] Error 2
my build environment is large and complex so I'm not providing all details here, but I will be happy to provide any supporting material needed, on request. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9982 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9982: cross building integer-gmp is running target program on build host -------------------------------------+------------------------------------- Reporter: newsham | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.8.4 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by newsham): by the way, the error says the file does not exist, but it actually does (the error is probably coming from ld.so failing to load link deps?): $ file /u1/home/newsham/src/genode/ghc-7.8.4/inplace/lib/bin/mkGmpDerivedConstants /u1/home/newsham/src/genode/ghc-7.8.4/inplace/lib/bin/mkGmpDerivedConstants: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), not stripped objdump reveals that it is linked against my target (genode) and not the build host (linux): $ objdump -p /u1/home/newsham/src/genode/ghc-7.8.4/inplace/lib/bin/mkGmpDerivedConstants|grep libc.lib NEEDED /u1/home/newsham/src/genode/novaBox/var/libcache/libc/libc.lib.so -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9982#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9982: cross building integer-gmp is running target program on build host -------------------------------------+------------------------------------- Reporter: newsham | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.8.4 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by rwbarton): I really don't understand why we don't use autoconf for these constants. On the bright side, integer-gmp2 doesn't seem to require anything like this (yet?) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9982#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9982: cross building integer-gmp is running target program on build host -------------------------------------+------------------------------------- Reporter: newsham | Owner: Type: bug | Status: new Priority: low | Milestone: 7.12.1 Component: Build System | Version: 7.8.4 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by rwbarton): * priority: normal => low * milestone: => 7.12.1 Comment: Since the new integer-gmp is the default in 7.10 and the old integer-gmp is currently gone in HEAD, I'm marking this ticket as low priority and also setting a milestone so that it will be garbage collected. To the 7.12 branch maintainer, if the 7.10 branch becomes defunct, close this ticket 'wontfix', else please remilestone appropriately. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9982#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9982: cross building integer-gmp is running target program on build host -------------------------------------+------------------------------------- Reporter: newsham | Owner: Type: bug | Status: new Priority: low | Milestone: 7.12.1 Component: Build System | Version: 7.8.4 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by slyfox): Using autoconf for 7.8 is also straightforward changeset:52f554582339d14c28a3cc91385f9cb0343f6779 (I used that to build ia64 ghc+integer-gmp on amd64) but requires not too old version of autoconf, IIRC MacOS users were not happy and it was reverted changeset:916be615048cc844498319f4a21cc62bec162cd8 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9982#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC