HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

Alistair Bayley
Does anyone have hs-plugins working on WinXP with ghc-6.6? When I run
the simple test below I get this error:

Main:
c:/ghc/ghc-6.6/HSbase.o: unknown symbol `_free'
Main: user error (Dynamic loader returned: user error (resolvedObjs failed.))

Am I doing something obviously dumb?

Alistair


module Test1 where
test1 = putStrLn "test1"


module Main where
import Prelude hiding (catch)
import Control.Exception
import Data.List
import System.Environment
import System.Plugins

instance Show (LoadStatus a) where
  show (LoadFailure errors) = "LoadFailure - " ++ (concat (intersperse
"\n" errors))
  show (LoadSuccess m p) = "LoadSuccess"

main = do
  a <- getArgs
  let
    modName = case a of
      (n:_) -> n
      _ -> "Test1"
  let modPath = "./" ++ modName ++ ".o"
  let method = "test1"
  fc <- catch (load modPath [""] [] method)
    (\e -> return (LoadFailure
      ["Dynamic loader returned: " ++ show e]))
  case fc of
    LoadFailure errors -> do
      fail (concat (intersperse "\n" errors))
    LoadSuccess modul proc -> do
      let p :: IO (); p = proc
      proc
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

Donald Bruce Stewart
Is this using the darcs repository version of hs-plugins?
That's the only versions that works with 6.6

alistair:

> Does anyone have hs-plugins working on WinXP with ghc-6.6? When I run
> the simple test below I get this error:
>
> Main:
> c:/ghc/ghc-6.6/HSbase.o: unknown symbol `_free'
> Main: user error (Dynamic loader returned: user error (resolvedObjs
> failed.))
>
> Am I doing something obviously dumb?
>
> Alistair
>
>
> module Test1 where
> test1 = putStrLn "test1"
>
>
> module Main where
> import Prelude hiding (catch)
> import Control.Exception
> import Data.List
> import System.Environment
> import System.Plugins
>
> instance Show (LoadStatus a) where
>  show (LoadFailure errors) = "LoadFailure - " ++ (concat (intersperse
> "\n" errors))
>  show (LoadSuccess m p) = "LoadSuccess"
>
> main = do
>  a <- getArgs
>  let
>    modName = case a of
>      (n:_) -> n
>      _ -> "Test1"
>  let modPath = "./" ++ modName ++ ".o"
>  let method = "test1"
>  fc <- catch (load modPath [""] [] method)
>    (\e -> return (LoadFailure
>      ["Dynamic loader returned: " ++ show e]))
>  case fc of
>    LoadFailure errors -> do
>      fail (concat (intersperse "\n" errors))
>    LoadSuccess modul proc -> do
>      let p :: IO (); p = proc
>      proc
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

Alistair Bayley
> Is this using the darcs repository version of hs-plugins?
> That's the only versions that works with 6.6

Just got, built, and installed the repo version, and it has the same problem.

Alistair
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

Rene de Visser
 Alistair Bayley" <[hidden email]> schrieb im Newsbeitrag
news:[hidden email]...
>> Is this using the darcs repository version of hs-plugins?
>> That's the only versions that works with 6.6
>
> Just got, built, and installed the repo version, and it has the same
> problem.
>
> Alistair

You managed to build the darcs version under ghc 6.6?

For me runghc setup.hs configure fails
with lots of strange error messages... (below)
other packages build ok.

Rene.

C:\repos\hs-plugins>darcs pull
plink: unknown option "-O"
Pulling from "http://www.cse.unsw.edu.au/~dons/code/hs-plugins"...
No remote changes to pull in!

C:\repos\hs-plugins>runghc Setup.lhs configure
Setup.lhs: Warning: The field "hs-source-dir" is deprecated, please use
hs-sourc
e-dirs.
Configuring plugins-1.0...
configure: c:\ghc\ghc-6.6\bin\ghc-pkg.exe
configure: Dependency base-any: using base-2.0
configure: Dependency Cabal-any: using Cabal-1.1.6
configure: Dependency haskell-src-any: using haskell-src-1.0
configure: Using install prefix: C:\Programme
configure: Binaries installed in: C:\Programme\Haskell\bin
configure: Libraries installed in: C:\Programme\Haskell\plugins-1.0\ghc-6.6
configure: Private binaries installed in: C:\Programme\plugins-1.0
configure: Data files installed in: C:\Programme\Gemeinsame
Dateien\plugins-1.0
configure: Using compiler: c:\ghc\ghc-6.6\bin\ghc.exe
configure: Compiler flavor: GHC
configure: Compiler version: 6.6
configure: Using package tool: c:\ghc\ghc-6.6\bin\ghc-pkg.exe
configure: Using ar found on system at: c:\ghc\ghc-6.6\bin\ar.exe
configure: Using haddock found on system at: c:\other\bin\haddock.exe
configure: No pfesetup found
configure: Using ranlib found on system at: C:\other\MinGW\bin\ranlib.exe
configure: Using runghc found on system at: c:\ghc\ghc-6.6\bin\runghc.exe
configure: No runhugs found
configure: Using happy: c:\other\bin\happy.exe
configure: Using alex: c:\other\bin\alex.exe
configure: Using hsc2hs: c:\ghc\ghc-6.6\bin\hsc2hs.exe
configure: No c2hs found
configure: No cpphs found
configure: No greencard found
Can't delete: '-f conf5164.sh' (error: -1)
Can't delete: '-f conf5164 conf5164.exe conf5164.file' (error: -1)
Can't delete: '-f conf5164 conf5164.exe conf5164.file' (error: -1)
Can't open:
Can't open:
Can't open:
Can't delete: '-rf conftest* confdefs.h' (error: -1)
Can't open:
Can't open:
Can't open:
Can't open:
Can't open:
checking build system type... i686-pc-mingw32
Can't open:
Can't open:
Can't open:
checking for ghc... ghc
Can't open:
checking for value of __GLASGOW_HASKELL__... 606
checking for ghc library directory... c:/ghc/ghc-6.6
Can't open:
checking for tex... no
configure: WARNING: tex is needed to build some of the documentation
checking for tex2page... no
configure: WARNING: tex2page is needed to build some of the documentation
                    http://www.ccs.neu.edu/home/dorai/tex2page/tex2page-doc.html

checking for gcc... gcc
Can't open:
Can't open:
checking for C compiler default output file name... configure: error: C
compiler
 cannot create executables
See `config.log' for more details.
Can't open:
Can't open:
Can't open:
Can't delete: '-f core *.core' (error: -1)

C:\repos\hs-plugins>



_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

Alistair Bayley
> You managed to build the darcs version under ghc 6.6?
>
> For me runghc setup.hs configure fails
> with lots of strange error messages... (below)
> other packages build ok.
>
> Rene.
>
> C:\repos\hs-plugins>darcs pull
> plink: unknown option "-O"
> Pulling from "http://www.cse.unsw.edu.au/~dons/code/hs-plugins"...
> No remote changes to pull in!
>
> C:\repos\hs-plugins>runghc Setup.lhs configure

I used an MSYS shell on Windows. It doesn't build with ghc/cabal on a
basic windows box - you need some sort of Unix clone. Looks like
you're using cygwin, I think ('cause you still have paths starting
with C:\).

Alistair
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

Conal Elliott
I'm running cygwin on WinXP and got a different failure (below) from the latest darcs hs-plugins.  Line 11 is right after the TOP definition.  Does anyone have a theory about what's going on here? - Conal

configure:1954: gcc    conftest.c  >&5
conftest.c:11: error: missing terminating " character
conftest.c:14: error: missing terminating " character
configure:1957: $? = 1
configure: failed program was:
| /* confdefs.h .  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define CYGWIN 1
| #define LEADING_UNDERSCORE 1
| #define TOP "c:\\Haskell\\hs-plugins
"
| #define WITH_GHC "ghc"
| #define GHC_LIB_PATH "c:/ghc/ghc-6.6
"
| /* end confdefs.h .  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:1996: error: C compiler cannot create executables


On 3/9/07, Alistair Bayley <[hidden email]> wrote:
> You managed to build the darcs version under ghc 6.6?

>
> For me runghc setup.hs configure fails
> with lots of strange error messages... (below)
> other packages build ok.
>
> Rene.
>
> C:\repos\hs-plugins>darcs pull
> plink: unknown option "-O"
> Pulling from "http://www.cse.unsw.edu.au/~dons/code/hs-plugins "...
> No remote changes to pull in!
>
> C:\repos\hs-plugins>runghc Setup.lhs configure

I used an MSYS shell on Windows. It doesn't build with ghc/cabal on a
basic windows box - you need some sort of Unix clone. Looks like
you're using cygwin, I think ('cause you still have paths starting
with C:\).

Alistair
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

Claus Reinke
> I'm running cygwin on WinXP and got a different failure (below) from the
> latest darcs hs-plugins.  Line 11 is right after the TOP definition.  Does
> anyone have a theory about what's going on here? - Conal

looks like the TOP and GHC_LIB_PATH values are the output of external
commands, such as ghc --print-libdir, and someone forgot to remove the
linefeeds from the output before inserting it in the script?

claus
 

> configure:1954: gcc    conftest.c  >&5
> conftest.c:11: error: missing terminating " character
> conftest.c:14: error: missing terminating " character
> configure:1957: $? = 1
> configure: failed program was:
> | /* confdefs.h.  */
> |
> | #define PACKAGE_NAME ""
> | #define PACKAGE_TARNAME ""
> | #define PACKAGE_VERSION ""
> | #define PACKAGE_STRING ""
> | #define PACKAGE_BUGREPORT ""
> | #define CYGWIN 1
> | #define LEADING_UNDERSCORE 1
> | #define TOP "c:\\Haskell\\hs-plugins
> "
> | #define WITH_GHC "ghc"
> | #define GHC_LIB_PATH "c:/ghc/ghc-6.6
> "
> | /* end confdefs.h.  */
> |
> | int
> | main ()
> | {
> |
> |   ;
> |   return 0;
> | }
> configure:1996: error: C compiler cannot create executables
>
>
> On 3/9/07, Alistair Bayley <[hidden email]> wrote:
>>
>> > You managed to build the darcs version under ghc 6.6?
>> >
>> > For me runghc setup.hs configure fails
>> > with lots of strange error messages... (below)
>> > other packages build ok.
>> >
>> > Rene.
>> >
>> > C:\repos\hs-plugins>darcs pull
>> > plink: unknown option "-O"
>> > Pulling from "http://www.cse.unsw.edu.au/~dons/code/hs-plugins"...
>> > No remote changes to pull in!
>> >
>> > C:\repos\hs-plugins>runghc Setup.lhs configure
>>
>> I used an MSYS shell on Windows. It doesn't build with ghc/cabal on a
>> basic windows box - you need some sort of Unix clone. Looks like
>> you're using cygwin, I think ('cause you still have paths starting
>> with C:\).
>>
>> Alistair
>> _______________________________________________
>> Haskell-Cafe mailing list
>> [hidden email]
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>


--------------------------------------------------------------------------------


> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

Iain Alexander
> > I'm running cygwin on WinXP and got a different failure (below) from
> the
> > latest darcs hs-plugins.  Line 11 is right after the TOP definition.
> Does
> > anyone have a theory about what's going on here? - Conal
>
> looks like the TOP and GHC_LIB_PATH values are the output of external
> commands, such as ghc --print-libdir, and someone forgot to remove the
> linefeeds from the output before inserting it in the script?
>

Recent versions of cygwin bash do not by default handle DOS/Windows-style line
endings well.  See any recent bash release notice on cygwin-announce for
details, but here are the juicy bits.

According to Eric Blake
volunteer cygwin bash maintainer

<quote>
4. This version of bash has a cygwin-specific shell option, named "igncr" to
force bash to ignore \r, independently of cygwin's mount style.  As of bash-
3.2.3-5, it controls regular scripts, command substitution, and sourced files.  
I hope to convince the upstream bash maintainer to accept this patch into the
future bash 4.0 even on Linux, rather than keeping it a cygwin-specific patch,
but only time will tell.  There are several ways to activate this option:  

4a. For a single affected script, add this line just after the she-bang:
 (set -o igncr) 2>/dev/null && set -o igncr; # comment is needed

4b. For a single script, invoke bash explicitly with the shopt, as in
'bash -o igncr ./myscript' rather than the simpler './myscript'.

4c. To affect all scripts, export the environment variable BASH_ENV,
pointing to a file that sets the shell option as desired.  Bash will
source this file on startup for every script.

4d. Added in the bash-3.2-2 release: export the environment variable SHELLOPTS
with igncr included in it.  It is read-only from within bash, but you can set
it before invoking bash; once in bash, it auto-tracks the current state of 'set
-o igncr'.  If exported, then all bash child processes inherit the same option
settings; with the exception added in 3.2.9-11 that certain interactive options
are not inherited in non-interactive use.  

5. You can also experiment with the IFS variable for controlling how bash will
treat \r during variable expansion.  
</quote>
--
Iain Alexander      [hidden email]


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

Conal Elliott
In reply to this post by Conal Elliott
I got hs-plugins to compile fine on  winxp, but now when I run it I get a crash with this message:

c:/ghc/ghc-6.6/HSbase.o: unknown symbol `_free'

Don mentioned this is a known problem.  Is it on anyone's todo list?

Cheers, - Conal

On 3/9/07, Conal Elliott <[hidden email]> wrote:
I'm running cygwin on WinXP and got a different failure (below) from the latest darcs hs-plugins.  Line 11 is right after the TOP definition.  Does anyone have a theory about what's going on here? - Conal

configure:1954: gcc    conftest.c  >&5
conftest.c:11: error: missing terminating " character
conftest.c:14: error: missing terminating " character
configure:1957: $? = 1
configure: failed program was:
| /* confdefs.h .  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define CYGWIN 1
| #define LEADING_UNDERSCORE 1
| #define TOP "c:\\Haskell\\hs-plugins
"
| #define WITH_GHC "ghc"
| #define GHC_LIB_PATH "c:/ghc/ghc-6.6
"
| /* end confdefs.h .  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:1996: error: C compiler cannot create executables



On 3/9/07, Alistair Bayley <[hidden email]> wrote:
> You managed to build the darcs version under ghc 6.6?

>
> For me runghc setup.hs configure fails
> with lots of strange error messages... (below)
> other packages build ok.
>
> Rene.
>
> C:\repos\hs-plugins>darcs pull
> plink: unknown option "-O"
> Pulling from "<a href="http://www.cse.unsw.edu.au/%7Edons/code/hs-plugins" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://www.cse.unsw.edu.au/~dons/code/hs-plugins "...
> No remote changes to pull in!
>
> C:\repos\hs-plugins>runghc Setup.lhs configure

I used an MSYS shell on Windows. It doesn't build with ghc/cabal on a
basic windows box - you need some sort of Unix clone. Looks like
you're using cygwin, I think ('cause you still have paths starting
with C:\).

Alistair
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.haskell.org/mailman/listinfo/haskell-cafe



_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

Conal Elliott
BTW, to get hs-plugins to build, I changed two lines in hs-plugins/configure.

First, in the line

TOP=`echo "Directory.getCurrentDirectory >>= putStrLn.init.tail.show " | ghc --interactive -ignore-dot-ghci -v0`

I changed "putStrLn" to "putStr".  Second, I changed the line

GHC_LIB_PATH=`$GHC --print-libdir`

to

GHC_LIB_PATH=`$GHC --print-libdir | tr -d [:space:]`

First I tried tr -d '\n', but it didn't work, and I don't know why.

  - Conal


On 3/16/07, Conal Elliott <[hidden email]> wrote:
I got hs-plugins to compile fine on  winxp, but now when I run it I get a crash with this message:

c:/ghc/ghc-6.6/HSbase.o: unknown symbol `_free'

Don mentioned this is a known problem.  Is it on anyone's todo list?

Cheers, - Conal


On 3/9/07, Conal Elliott <[hidden email]> wrote:
I'm running cygwin on WinXP and got a different failure (below) from the latest darcs hs-plugins.  Line 11 is right after the TOP definition.  Does anyone have a theory about what's going on here? - Conal

configure:1954: gcc    conftest.c  >&5
conftest.c:11: error: missing terminating " character
conftest.c:14: error: missing terminating " character
configure:1957: $? = 1
configure: failed program was:
| /* confdefs.h .  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define CYGWIN 1
| #define LEADING_UNDERSCORE 1
| #define TOP "c:\\Haskell\\hs-plugins
"
| #define WITH_GHC "ghc"
| #define GHC_LIB_PATH "c:/ghc/ghc-6.6
"
| /* end confdefs.h .  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:1996: error: C compiler cannot create executables



On 3/9/07, Alistair Bayley <[hidden email]> wrote:
> You managed to build the darcs version under ghc 6.6?

>
> For me runghc setup.hs configure fails
> with lots of strange error messages... (below)
> other packages build ok.
>
> Rene.
>
> C:\repos\hs-plugins>darcs pull
> plink: unknown option "-O"
> Pulling from "<a href="http://www.cse.unsw.edu.au/%7Edons/code/hs-plugins" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://www.cse.unsw.edu.au/~dons/code/hs-plugins "...
> No remote changes to pull in!
>
> C:\repos\hs-plugins>runghc Setup.lhs configure

I used an MSYS shell on Windows. It doesn't build with ghc/cabal on a
basic windows box - you need some sort of Unix clone. Looks like
you're using cygwin, I think ('cause you still have paths starting
with C:\).

Alistair
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.haskell.org/mailman/listinfo/haskell-cafe




_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

Ian Lynagh
On Fri, Mar 16, 2007 at 09:52:10PM -0700, Conal Elliott wrote:
> BTW, to get hs-plugins to build, I changed two lines in
> hs-plugins/configure.

As it happens, I sent Don a similar patch last night, so hopefully it'll
be fixed in darcs soon.

> First I tried tr -d '\n', but it didn't work, and I don't know why.

Because it's a \r you're trying to delete.

> On 3/16/07, Conal Elliott <[hidden email]> wrote:
> >
> >I got hs-plugins to compile fine on  winxp, but now when I run it I get a
> >crash with this message:
> >
> >c:/ghc/ghc-6.6/HSbase.o: unknown symbol `_free'
> >
> >Don mentioned this is a known problem.  Is it on anyone's todo list?

Not mine.


Thanks
Ian

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

Conal Elliott
Glad to know, Ian.  Thanks.

I'd sure love to have a working hs-plugins again, especially in time to help with my ICFP submission.  I wouldn't begin to know how to crack something like this bug.  Does anyone have any ideas?

Cheers,  - Conal
 

On 3/17/07, Ian Lynagh <[hidden email]> wrote:
> >c:/ghc/ghc-6.6/HSbase.o: unknown symbol `_free'
> >
> >Don mentioned this is a known problem.  Is it on anyone's todo list?

Not mine.


 


On 3/17/07, Ian Lynagh <[hidden email]> wrote:
On Fri, Mar 16, 2007 at 09:52:10PM -0700, Conal Elliott wrote:
> BTW, to get hs-plugins to build, I changed two lines in
> hs-plugins/configure.

As it happens, I sent Don a similar patch last night, so hopefully it'll
be fixed in darcs soon.

> First I tried tr -d '\n', but it didn't work, and I don't know why.

Because it's a \r you're trying to delete.

> On 3/16/07, Conal Elliott < [hidden email]> wrote:
> >
> >I got hs-plugins to compile fine on  winxp, but now when I run it I get a
> >crash with this message:
> >
> >c:/ghc/ghc- 6.6/HSbase.o: unknown symbol `_free'
> >
> >Don mentioned this is a known problem.  Is it on anyone's todo list?

Not mine.


Thanks
Ian



_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe