[Haskell-cafe] Re: dynamic loading of code on windows

Mathias Weber mat_weber at t-online.de
Mon Nov 15 17:45:16 EST 2010


Hello Arnaud,
I also faced this problem with the plugins package. This particular
error comes from the backslashes in the ghc library directory not being
escaped. But even after patching this, I had trouble with missing
imports and some other stuff. It seams that this package is not much
used/tested under Windows. At the end I gave up using it and switched to
hint (like Alberto pointed out before).

Mathias

Am 13.11.2010 19:41, schrieb Arnaud Bailly:
> Hello again,
> So I followed Kevin's suggestion and installed MinGW along with gcc
> and autoconf tools needed by hs-plugins. Then it failed with the
> following error:
> 
> $ cabal install --enable-documentation plugins
> Resolving dependencies...
> Configuring plugins-1.5.1.4...
> checking build system type... i686-pc-mingw32
> checking for ghc... ghc
> checking for value of __GLASGOW_HASKELL__... 612
> checking for ghc library directory... D:\Program Files\Haskell Platform\2010.2.0
> .0\lib
> checking for gcc... gcc
> checking for C compiler default output file name... a.exe
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables... .exe
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ANSI C... none needed
> checking for arc4random... no
> checking for a BSD-compatible install... /usr/bin/install -c
> configure: creating ./config.status
> config.status: creating config.mk
> config.status: creating testsuite/makewith/io/TestIO.conf
> config.status: creating testsuite/makewith/unsafeio/Unsafe.conf
> config.status: creating config.h
> Preprocessing library plugins-1.5.1.4...
> Building plugins-1.5.1.4...
> [ 1 of 12] Compiling System.Plugins.Process ( src\System\Plugins\Process.hs, dis
> t\build\System\Plugins\Process.o )
> [ 2 of 12] Compiling System.Plugins.Parser ( src\System\Plugins\Parser.hs, dist\
> build\System\Plugins\Parser.o )
> [ 3 of 12] Compiling System.Plugins.LoadTypes ( src\System\Plugins\LoadTypes.hs,
>  dist\build\System\Plugins\LoadTypes.o )
> [ 4 of 12] Compiling System.Plugins.Consts ( src\System\Plugins\Consts.hs, dist\
> build\System\Plugins\Consts.o )
> 
> src\System\Plugins\Consts.hs:39:22:
>     lexical error in string/character literal at character 'P'
> cabal.exe: Error: some packages failed to install:
> plugins-1.5.1.4 failed during the building phase. The exception was:
> ExitFailure 1
> 
> Any clues? Should I try to use latest source tree? I am really
> interested in the plugins approach, rather than the interpreter
> approach. What I am trying to achieve is a system similar to Yi as
> presented in Don Stewart's paper
> (http://www.cse.unsw.edu.au/~dons/papers/yi.pdf), but much simpler, of
> course. The system would load modules as found in some known location,
> run tests found here before really accepting them, then use them, with
> the possibility of replacing those modules when a newer version is
> found. The idea is  to provide a self-tested and continuously running
> system for development, something that might be reminiscent of
> Smalltalk although I never programmed in Smalltalk.
> 
> Thanks in advance for advises,
> 
> REgards,
> Arnaud
> 
> On Fri, Nov 12, 2010 at 8:49 PM, Alberto G. Corona <agocorona at gmail.com> wrote:
>> I use Hint for the same purpose. It has been tested under windows
>>
>> 2010/11/12 Arnaud Bailly <arnaud.oqube at gmail.com>
>>>
>>> Hello Kevin,
>>> Thanks. I understand that this is a toolchain issue, I just got used
>>> to the nice feeling of having 'cabal install foo' works seamlessly and
>>> flawlessly to get me some magic piece of software :-) I will try to be
>>> more patient and try to setup a proper toolchain for installing
>>> plugins package.
>>>
>>> Arnaud
>>>
>>> On Fri, Nov 12, 2010 at 7:01 PM, Kevin Jardine <kevinjardine at gmail.com>
>>> wrote:
>>>> This isn't about the plugin functionality, it's about compiling code.
>>>>
>>>> As the message says :
>>>>
>>>> This requires a Unix compatibility toolchain such as MinGW+MSYS or
>>>> Cygwin.
>>>>
>>>> You'll find that you need such a toolchain to compile much open source
>>>> software, including many Haskell modules, on Windows.
>>>>
>>>> Personally I use MinGW+MSYS on my Windows machine. It works very well.
>>>>
>>>> Kevin
>>>>
>>>> On Nov 12, 3:20 pm, Arnaud Bailly <arnaud.oq... at gmail.com> wrote:
>>>>> Hello,
>>>>> I recently tried to
>>>>>
>>>>> cabal install plugins
>>>>>
>>>>> on a windows box and it failed with the following error:
>>>>>
>>>>> Resolving dependencies...
>>>>> Downloading plugins-1.5.1.4...
>>>>> Configuring plugins-1.5.1.4...
>>>>> cabal: The package has a './configure' script. This requires a Unix
>>>>> compatibility toolchain such as MinGW+MSYS or Cygwin.
>>>>> cabal: Error: some packages failed to install:
>>>>> plugins-1.5.1.4 failed during the configure step. The exception was:
>>>>> ExitFailure 1
>>>>>
>>>>> What solution can I use to load dynamically code in a cross-platform
>>>>> way ?
>>>>>
>>>>> Thanks in advance
>>>>> Arnaud
>>>>> _______________________________________________
>>>>> Haskell-Cafe mailing list
>>>>>
>>>>> Haskell-C... at haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe
>>>> _______________________________________________
>>>> Haskell-Cafe mailing list
>>>> Haskell-Cafe at haskell.org
>>>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>>>
>>> _______________________________________________
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe at haskell.org
>>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



More information about the Haskell-Cafe mailing list