agocorona / MFlow

(Haskell) Web application server with stateful, type safe user interactions and widget combinators
http://mflowdemo.herokuapp.com
Other
100 stars 12 forks source link

could not execute: MonadLoc #33

Closed rdesfo closed 10 years ago

rdesfo commented 10 years ago

hello, I get the following message when trying to run the demos-blaze in cabal sandbox.

$ cabal run Preprocessing library MFlow-0.4.5.4... In-place registering MFlow-0.4.5.4... Preprocessing executable 'demos-blaze' for MFlow-0.4.5.4... ghc: could not execute: MonadLoc

agocorona commented 10 years ago

install the package monadloc-pp:

cabal install monadloc-pp

it is a preprocessor executable (MonadLoc) necessary for compiling the examples. However I can not enforce the installation from cabal, because it is not formally a library dependency

2014-05-21 12:20 GMT+02:00, rdesfo notifications@github.com:

hello, I get the following message when trying to run the demos-blaze in cabal sandbox.

$ cabal run Preprocessing library MFlow-0.4.5.4... In-place registering MFlow-0.4.5.4... Preprocessing executable 'demos-blaze' for MFlow-0.4.5.4... ghc: could not execute: MonadLoc


Reply to this email directly or view it on GitHub: https://github.com/agocorona/MFlow/issues/33

Alberto.

agocorona commented 10 years ago

probably you may need to install also cpphs:

cabal install cpphs

2014-05-21 12:24 GMT+02:00, Alberto G. Corona agocorona@gmail.com:

install the package monadloc-pp:

cabal install monadloc-pp

it is a preprocessor executable (MonadLoc) necessary for compiling the examples. However I can not enforce the installation from cabal, because it is not formally a library dependency

2014-05-21 12:20 GMT+02:00, rdesfo notifications@github.com:

hello, I get the following message when trying to run the demos-blaze in cabal sandbox.

$ cabal run Preprocessing library MFlow-0.4.5.4... In-place registering MFlow-0.4.5.4... Preprocessing executable 'demos-blaze' for MFlow-0.4.5.4... ghc: could not execute: MonadLoc


Reply to this email directly or view it on GitHub: https://github.com/agocorona/MFlow/issues/33

Alberto.

Alberto.

rdesfo commented 10 years ago

'cabal install monadloc-pp' seems to have done the trick, however I'm now getting the following message:

Linking dist/build/demos-blaze/demos-blaze ...
using port 80

Using configuration: 
cadmin= "admin"

wait: ready
Running in 4 core(s)
demos-blaze: bind: permission denied (Permission denied)
sync...done
demos-blaze: Signal: thread blocked indefinitely in an MVar operation
agocorona commented 10 years ago

Ok, if you are executing the application. In a linux machine you have to execute with root privileges since it bind to a port. use sudo:

sudo mflowprogram

or

sudo runghc yourprogram.hs

2014-05-21 12:54 GMT+02:00, rdesfo notifications@github.com:

'cabal install monadloc-pp' seems to have done the trick, however I'm now getting the following message:

Linking dist/build/demos-blaze/demos-blaze ...
using port 80

Using configuration:
cadmin= "admin"

wait: ready
Running in 4 core(s)
demos-blaze: bind: permission denied (Permission denied)
sync...done
demos-blaze: Signal: thread blocked indefinitely in an MVar operation

Reply to this email directly or view it on GitHub: https://github.com/agocorona/MFlow/issues/33#issuecomment-43740415

Alberto.

rdesfo commented 10 years ago

is it possible to use mflow without running it under root?

agocorona commented 10 years ago

It depends on the configuration of the Linux box. It is not necessary to be the root user, but it is necessary to have root privileges since the web application uses a tcp-ip port. That seems to be the default for some Linux distributions.

But that apply for any web application in any language. I´m not an expert trough . I use windows normally.

2014-05-21 23:07 GMT+02:00, rdesfo notifications@github.com:

is it possible to use mflow without running it under root?


Reply to this email directly or view it on GitHub: https://github.com/agocorona/MFlow/issues/33#issuecomment-43814234

Alberto.

agocorona commented 10 years ago

By the way, what is your impression about MFlow?

2014-05-22 1:04 GMT+02:00, Alberto G. Corona agocorona@gmail.com:

It depends on the configuration of the Linux box. It is not necessary to be the root user, but it is necessary to have root privileges since the web application uses a tcp-ip port. That seems to be the default for some Linux distributions.

But that apply for any web application in any language. I´m not an expert trough . I use windows normally.

2014-05-21 23:07 GMT+02:00, rdesfo notifications@github.com:

is it possible to use mflow without running it under root?


Reply to this email directly or view it on GitHub: https://github.com/agocorona/MFlow/issues/33#issuecomment-43814234

Alberto.

Alberto.

rdesfo commented 10 years ago

I've played with it some on fpcomplete and your heroku site and it looks really interesting. I like how you build the widgets and piece them together. Your help has been out standing as well. Thank you.

rdesfo commented 10 years ago

I was able to run the demos on linux without using sudo just by running the demo under a different port number ( brief discussion of linux port priviledges)

cabal run 8080

I believe this is a better solution than using root privileges and just wanted to mention it in case some one else runs into the similar situation.

agocorona commented 10 years ago

Fine. Good advice!. Thanks

2014-05-22 18:37 GMT+02:00, rdesfo notifications@github.com:

I was able to run the demos on linux without using sudo just by running the demo under a different port number ( brief discussion of linux port priviledges)

cabal run 8080

I believe this is a better solution than using root privileges and just wanted to mention it in case some one else runs into the similar situation.


Reply to this email directly or view it on GitHub: https://github.com/agocorona/MFlow/issues/33#issuecomment-43912696

Alberto.

tomberek commented 10 years ago

The cpphs and monadloc-pp requirements should be easier to find. Perhaps install section on main page.