[jhc] targets.ini ignored

Paulo Tanimoto tanimoto at arizona.edu
Tue Aug 25 01:15:00 EDT 2009


Hello,

I just installed jhc 0.7.1 and wanted to try cross-compilation (it
works!).  The manual tells me about some places I can put a
targets.ini file.  Unfortunately, it seems that no matter where I put
it, it's ignored.  This is what I have:

---- 8< ----
[win32]
gcc=i586-mingw32msvc-gcc
cflags+=-mwindows -mno-cygwin
executable_extension=.exe
merge=i686
---- 8< ----

Basically, I just copied the example from the manual, but changed gcc
to "i586-mingw32msvc-gcc" because that's what comes with Ubuntu Jaunty
64bit.

See the error message below (sorry it's long).  Is there something I
can do to investigate what's failing?  Creating a symlink as
"i386-mingw32-gcc" works, by the way.

Thanks,

Paulo

$ cat > hello.hs
module Main where

main = putStrLn "hello world"

$ cat ~/.jhc/targets.ini  # or ~/etc/jhc/targets.ini
[win32]
gcc=i586-mingw32msvc-gcc
cflags+=-mwindows -mno-cygwin
executable_extension=.exe
merge=i686

{- Also tried putting it in /usr/local/etc/jhc-0.7/, even replacing
the existing targets.ini -}

$ jhc --cross -mwin32 -v hello.hs
reading /usr/local/etc/jhc-0.7/targets.ini
reading /usr/local/etc/jhc-0.7/targets-local.ini
reading /home/[username]/etc/jhc/targets.ini
reading /usr/local/etc/jhc-0.7/targets.ini
reading /usr/local/etc/jhc-0.7/targets-local.ini
reading /home/[username]/etc/jhc/targets.ini
jhc --cross -mwin32 -v hello.hs
jhc 0.7.1 (0.7.0-13)
Finding Dependencies...
Using Ho Cache: '/home/[username]/.jhc/cache'
-- Base: base Exported: True Hash: 8c94a7b43fd3d66558ab3d1f2182abae
Name: base-1.0
-- Base: haskell98 Exported: True Hash:
ee7ca5091f963b5420ca56a56a176264 Name: haskell98-1.0
-- Base: jhc Exported: False Hash: fb645af1aa0971f3be17c34f7c0a032f
Name: jhc-1.0
Main                    [hello.hs]
<~/.jhc/cache/a61a65a6addfa4a2aa3c57618613f47a.ho>
Fresh: <~/.jhc/cache/a61a65a6addfa4a2aa3c57618613f47a.ho>
Typechecking...
Compiling...
Collected Compilation...
PassStats
-- typeAnalyzeMethods
Type analyzed methods
Jhc.Basics.concatMap \({})({})
Jhc.Monad.mapM_ \({Jhc.Prim.IO})({Jhc.Prim.Char})({Jhc.Basics.()})
Jhc.Basics.++ \({})
Jhc.Monad.>> \({Jhc.Prim.IO})({Jhc.Basics.()})({Jhc.Basics.()})
Jhc.Monad.>>= \({})({})({})
Jhc.Monad.return \({Jhc.Prim.IO})({Jhc.Basics.()})
Jhc.IO.runMain \({Jhc.Basics.()})
Instance at .iJhc.Monad.>>.Jhc.Prim.IO \({Jhc.Basics.()})({Jhc.Basics.()})
Instance at .iJhc.Monad.>>.default \({})({})({})
Instance at .iJhc.Monad.>>=.Jhc.Prim.IO \({})({})
Instance at .iJhc.Monad.>>=.Jhc.Prim.[] \({})({})
Instance at .iJhc.Monad.return.Jhc.Prim.IO \({Jhc.Basics.()})
Instance at .iJhc.Monad.return.Jhc.Prim.[] \({})
Instance at .iJhc.Monad.>>=.Jhc.Maybe.Maybe \({})({})
Instance at .iJhc.Monad.return.Jhc.Maybe.Maybe \({})
-- typeAnalyze-Main-AfterMethod
-- Simplify-Main-One
-- Simplify-Main-One
-- Simplify-Main-One
-- Simplify-Main-One
-- Simplify-Main-One
-- Simplify-Main-One
-- Simplify-Main-One
Total: Main-One

{- Simplifications -}

Writing "hs.out.exe_code.c"
Running: i386-mingw32-gcc '-std=gnu99' -D_GNU_SOURCE
'-falign-functions=4' -ffast-math -Wshadow -Wextra -Wall
-Wno-unused-parameter -m32 -m32 -m32 -m32 -m32 -m32 -m32 -m32 -m32
-m32 -m32 -m32 -m32 -m32 -m32 -m32 -mwindows -mno-cygwin -m32 -m32
-m32 -m32 -m32 -m32 -m32 -m32 -mwindows -mno-cygwin -m32 -m32 -m32
-m32 -m32 -m32 -m32 -m32 -o hs.out.exe hs.out.exe_code.c -DNDEBUG -O3
-fomit-frame-pointer -fomit-frame-pointer -fomit-frame-pointer
-fomit-frame-pointer -fomit-frame-pointer -fomit-frame-pointer
-fomit-frame-pointer -fomit-frame-pointer
/bin/sh: i386-mingw32-gcc: not found
user error (C code did not compile.)


More information about the jhc mailing list