andrep / hoc

Automatically exported from code.google.com/p/hoc
8 stars 1 forks source link

HoC does not build #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Check out source from svn
2. cd hoc-read-only/hoc
3. ./autogen.sh
4. ./configure
5. make

What is the expected output? What do you see instead?
Expected: make to work
Actual:
...
ghc --make AppKit.hs    \
        -O -fasm \
        -package-name AppKit    \
        -odir build/objects \
        -hidir build/imports    \
        -package-conf ../inplace.conf \
        -fglasgow-exts -fth \
        -package unix \

on the commandline:
    Warning: -fth is deprecated: use -XTemplateHaskell or pragma {-# LANGUAGE 
TemplateHaskell#-} instead
../inplace.conf: openBinaryFile: does not exist (No such file or directory)
make[1]: *** [ghcmake.build-stamp] Error 1
In directory Tools
mkdir -p build/hocwrap
ghc --make HOCWrap.hs   \
        -fglasgow-exts  \
        -o hocwrap  \
        -odir build/hocwrap -hidir build/hocwrap    \
        -package-conf ../inplace.conf
../inplace.conf: openBinaryFile: does not exist (No such file or directory)
make[1]: *** [hocwrap] Error 1
In directory docs
pod2html \
      --index \
      --header \
      --title="HOC: a Haskell to Objective-C bridge" \
      --outfile "HOC.html" \
      Introduction.pod Quick_Start.pod Mapping_Types.pod Accessing_Other_Frameworks.pod 
Creating_an_Objective-C_Class_in_Haskell.pod Tools.pod Appendices.pod

What version of the product are you using? On what operating system?
hoc: latest svn
ghc: 6.10.1
OS X: 10.5.6

Original issue reported on code.google.com by tom.da...@gmail.com on 31 Jan 2009 at 8:08

GoogleCodeExporter commented 9 years ago
Oops sorry, didn't see there was a cabal file there now, perhaps BUILDING.CVS 
needs updated ;)

Still no success building with cabal:
...
[30 of 31] Compiling HOC.CStruct      ( HOC/HOC/CStruct.hs, 
dist/build/HOC/CStruct.o )
[31 of 31] Compiling HOC              ( HOC/HOC.hs, dist/build/HOC.o )
Warning: the following files would be used as linker inputs, but linking is not 
being done: HOC_cbits.o
ghc: no input files
Usage: For basic information, try the `--help' option.

Original comment by tom.da...@gmail.com on 31 Jan 2009 at 8:13

GoogleCodeExporter commented 9 years ago
I have this same problem. I have tried installing using both 
configure/make/make 
install, and using the cabal installation and neither of these work.

Is there any estimation on when this will be sorted? Or, is there any work 
around 
that will get me up and running?

Thanks.

Original comment by andrew.w...@gmail.com on 25 Mar 2009 at 9:53

GoogleCodeExporter commented 9 years ago
See also Issue 12.

Original comment by kaz...@gmail.com on 27 Mar 2009 at 6:16

GoogleCodeExporter commented 9 years ago
Success...
$ cat > my_ghc
if [ "$*" = "-I/usr/include/ffi -package HUnit-1.2.0.3 -package base-4.0.0.0 
-package bytestring-0.9.1.4 -
package containers-0.2.0.0 -package directory-1.0.0.2 -package fgl-5.4.2.2 
-package filepath-1.1.0.1 -
package mtl-1.1.0.2 -package old-time-1.0.0.1 -package parsec-3.0.0 -package 
pretty-1.0.1.0 -package 
syb-0.1.0.0 -package template-haskell-2.3.0.0 -package unix-2.3.1.0 -optc-O2 
-odir dist/build -c 
HOC_cbits.o" ]; then
exit 0
else
ghc $*
fi
$ runhaskell Setup.hs configure -fbase4 -fObjC2 
--with-ghc=<build-dir>/trunk/hoc/my_ghc --with-ghc-
pkg=`which ghc-pkg`
$ runhaskell Setup.hs build
$ sudo runhaskell Setup.hs install
$ cd Bindings
$ sudo sh make-bindings-macos.sh -fbase4

Many many thanks to ehird for getting this working

Original comment by tom.da...@gmail.com on 29 Mar 2009 at 9:55

GoogleCodeExporter commented 9 years ago
Here's everything I needed to build HOC and (most of) the examples.  ghc 
6.10.1, OS X 10.5.7.

cabal install parsec-3.0.0
cabal install fgl

svn checkout http://hoc.googlecode.com/svn/trunk/ hoc-read-only
cd hoc-read-only/hoc

sed -i.orig -e "/c-sources/d" HOC.cabal
sed -i.orig -e "s/Flag base/Flag base4/" InterfaceGenerator2/Output.hs

cabal configure
cabal build -v2 | grep '\(ar\|ld\) ' | grep -v 'build ' | sed 's,$, 
dist/build/HOC_cbits.o,;s,\.o\.tmp,.o,' | sh
cabal copy
cabal register

cd Bindings
sh ./make-bindings-macos.sh --user

cd ../Tools
cabal configure
cabal build
cabal copy
cd ..

# To get the samples to work:

./autogen.sh
./configure

cd Samples/UniqSort
sed -i.orig -e "s/import Foundation$/import Foundation hiding \(main\)/" 
UniqSort.hs
make
# To run: ./uniqsort foo bar blatz

cd ../Editor
sed -i.orig -e $'6a\\\nimport Foundation' HaskellDocument.hs
sed -i.orig -e "s/hocwrap/hoc-wrap/" Makefile
make
# To run: open ./Editor.app

cd ../ExpressionParser
sed -i.orig -e "s/hocwrap/hoc-wrap/" Makefile
make
# To run: open ./ExpressionParser.app

cd ../Browser
sed -i.orig -e "s/hocwrap/hoc-wrap/" Makefile
make
# Results in error.  Don't know how to fix this.
# TVUtilities.hs:64:2:
#    Couldn't match expected type `NewlyAllocated
#                                    (SimpleTVDataSource ())'
#           against inferred type `ID (NSObject_ (SimpleTVDataSource_ ()))'
#      Expected type: NewlyAllocated (SimpleTVDataSource ())
#      Inferred type: SimpleTVDataSource ()
# make: *** [Browser] Error 1

Original comment by kurtre...@gmail.com on 6 Jun 2009 at 8:58

GoogleCodeExporter commented 9 years ago
The original issue described here, being unable to build via configure/make, 
won't be 
fixed any more because the make-based build system has been removed.

Original comment by aut...@gmail.com on 12 Aug 2009 at 1:35