Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recipe to rebuild F# + Mono bundle #1

Open
dsyme opened this issue Mar 21, 2015 · 8 comments
Open

Recipe to rebuild F# + Mono bundle #1

dsyme opened this issue Mar 21, 2015 · 8 comments

Comments

@dsyme
Copy link

dsyme commented Mar 21, 2015

Hi @aktowns,

Do you have the recipe you used to build http://s3.amazonaws.com/mono3-buildpack/nuget.tar.bz2 used by this buildpack?

See SuaveIO/suave#219 (comment) for context and discussion.

Thanks
Don

dsyme referenced this issue in SuaveIO/mono-script-buildpack Mar 21, 2015
@aktowns
Copy link
Owner

aktowns commented Mar 21, 2015

Heya @dsyme,

Been quite a while since i've touched it, from what i recall the nuget tar ball itself is just a vanilla NuGet.exe with a simple shell wrapper around it

#!/bin/sh

/app/vendor/mono3/bin/mono /app/vendor/mono3/bin/NuGet.exe "$@"

for the building of the actual buildpack, sorry I don't remember much, i had to log into a running heroku instance and hack together a build on that and tar it up

@tpetricek
Copy link

I guess that the NuGet part is not that interesting - it just needs to package the EXE. The tricky part is the file with all the mono files: http://s3.amazonaws.com/mono3-buildpack/mono-fsharp-nuget3.0.tar.bz2

How is that one produced? (I'm a complete noob when it comes to Linux deployment...) What needs to be done to update it to the latest version of mono? (The 3.0.7 version packaged there does not contain many of the nice things that F# needs to run smoothly...)

@aktowns
Copy link
Owner

aktowns commented Apr 23, 2015

From what i can recall, and what I blogged (http://blog.ashleytowns.id.au/posts/2013-04/2013-04-01-running-csharp-fsharp-xbuild-nuget-on-heroku.html)

I tried to use vulcan to create a buildpack but kept hitting issues so ended up heroku run bash'ing, building Mono 3 and netcat'ing it over, its available here. I ended up throwing Nuget in there too. Heroku have some pretty good documentation on the process here. My compile script is pretty hacked together but seems to be holding up fine.

I can play around with it this weekend and see if i can get something up and working it should be as simple as the linux compile steps inside a heroku shell, adding the heroku shell scripts to detect and tar'ing it up

@tpetricek
Copy link

Thanks @aktowns!

Compiling the latest mono via Heroku command line & getting the tar sounds like a neat trick :-)

@tpetricek
Copy link

I was playing with this a bit more and I tried running the following on Heroku (produced using the current buildpack):

heroku run git clone https://github.com/mono/mono.git

As far as I can see, this runs fine and it does something - but I can't find the mono directory on the target machine (running heroku run ls). Looks like I have some fundamental misunderstanding... :-)

@aktowns
Copy link
Owner

aktowns commented Apr 24, 2015

ahh i'd do heroku run bash then git clone ..., and so on so you have the one instance
at the end with a complete build, tar it up and pull it down

@tpetricek
Copy link

Aaah, I didn't know you can do that. That works much better :-).

So, I got a bit further with this, but building mono still does not work, because mono requires gettext. The compiling guide says to run apt-get install gettext, but that fails on Heroku (?). I tried compiling gettext from source, which works but make install fails - either it cannot install it to the default location, or (when I gave it --prefix=/app/mystuff) it says:

error: cannot install 'libgettextsrc.la' to a directory not ending in /usr/local/lib

Thanks for all the help! I think I'm getting closer with this, but still, I'm *nix noob!

@tpetricek
Copy link

FYI, looks like the @ademar sorted this out: https://github.com/SuaveIO/mono-builder & https://github.com/SuaveIO/mono-script-buildpack! Woohoo :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants