[Haskell-cafe] Unable to build a mingw cross compiler.
Sven Bartscher
sven.bartscher at weltraumschlangen.de
Fri Aug 22 22:38:14 UTC 2014
Greetings,
I'm trying to build GHC to cross compile to windows.
GCC and friends are in /usr/bin/x86_64-w64-mingw32-*, libraries and
headers are in /usr/x86_64-w64-mingw32/{include,lib}.
I configured with:
./configure --target=x86_64-w64-mingw32 \
--with-gcc=/usr/bin/x86_64-w64-mingw32-gcc # Needed because
# otherwise /usr/bin/gcc
# would be used
Building fails with the following error:
utils/hsc2hs/dist/build/Main.o: In function `s2nI_info':
(.text+0x5c5): undefined reference to `GetModuleFileNameW'
collect2: error: ld returned 1 exit status
(The GHC invocation line is included in the attached file)
So it seems that GHC either uses the wrong linker or invokes it with
the wrong search path.
However, the configure script detects the right linker
(/usr/bin/x86_64-w64-mingw32).
Is this a bug, or a feature?
System data:
OS: Debian jessie Linux/GNU i386
Installed GHC (for bootstrapping): version 7.6.3
GHC I'm trying to build: version 7.8.3
Regards
Sven
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: error.txt
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140823/52d98cd1/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140823/52d98cd1/attachment.sig>
More information about the Haskell-Cafe
mailing list