{"id":1647,"date":"2016-03-18T19:54:19","date_gmt":"2016-03-19T02:54:19","guid":{"rendered":"http:\/\/balafon.net\/?p=1647"},"modified":"2017-01-13T17:45:54","modified_gmt":"2017-01-14T01:45:54","slug":"building-the-pony-compiler-on-windows","status":"publish","type":"post","link":"https:\/\/balafon.net\/?p=1647","title":{"rendered":"Building the Pony compiler on Windows"},"content":{"rendered":"<p><strong>Update 2017-01<\/strong><\/p>\n<p>I have made a <a href=\"https:\/\/github.com\/ponylang\/ponyc#building-on-windows\">vastly simpler build system<\/a> for Pony on Windows.<\/p>\n<p><strong>Original<\/strong><\/p>\n<p>I have been taking a look at the very interesting <a href=\"http:\/\/www.ponylang.org\/\">Pony programming language<\/a> in my copious free time for a couple of weeks now.  It&#8217;s fairly straightforward to build on Ubuntu.  Here&#8217;s how I built it on Windows 10:<\/p>\n<p>This process uses GnuWin32, which LLVM recommends, to provide unix utils; your mileage may vary with MSYS or Cygwin.<\/p>\n<p>Build LLVM:<\/p>\n<ul>\n<li>Install GnuWin32 via the <a href=\"http:\/\/getgnuwin32.sourceforge.net\/\">GetGnuWin32<\/a> tool; make sure it&#8217;s in your PATH.<\/li>\n<li>Install Python (I used <a href=\"https:\/\/www.python.org\/downloads\/release\/python-351\/\">3.5.1<\/a>; 2.7 is supposed to work as well); make sure it&#8217;s in PATH.<\/li>\n<li>Installed <a href=\"https:\/\/cmake.org\/download\/\">CMake<\/a>; make sure it&#8217;s in PATH.<\/li>\n<li>Get the LLVM source.  I used the tarball of <a href=\"http:\/\/llvm.org\/releases\/3.7.1\/llvm-3.7.1.src.tar.xz\">3.7.1<\/a> (requireds 7-zip to open on Windows).<\/li>\n<li>Make sure you have VS2015 with C++ installed.<\/li>\n<li>Generate LLVM VS2015 configuration with CMake.  I used the GUI to configure and generate the VS projects; make sure you use the 64-bit generator (&#8220;Visual Studio 14 2015 Win64&#8221;), and set the CMAKE_INSTALL_PREFIX to where you want LLVM to live.<\/li>\n<li>Build the INSTALL project in the LLVM solution.<\/li>\n<\/ul>\n<p>Build PonyC:<\/p>\n<ul>\n<li>Get the <a href=\"https:\/\/premake.github.io\/download.html#v5\">PreMake5<\/a> executable, and put it somewhere in your PATH.<\/li>\n<li>Get the <a href=\"https:\/\/github.com\/ponylang\/ponyc\">PonyC<\/a> source.<\/li>\n<li>Run <code>premake5.exe --with-tests --to=..\\vs vs2015<\/code> to generate <code>Ponyc.sln<\/code>.<\/li>\n<li>Changed the <strong>Character Set<\/strong> property of each project in the PonyC solution to <strong>Not Set<\/strong>.<\/li>\n<li>Build <code>Pony.sln<\/code><\/li>\n<\/ul>\n<p>In order to run the pony compiler, you&#8217;ll need a few libraries in your environment.  I have made a utility that will get the libraries and set up your environment:<\/p>\n<ul>\n<li>Install <a href=\"http:\/\/www.7-zip.org\/a\/7z1514-x64.exe\">7-Zip<\/a>, make sure it&#8217;s in PATH.<\/li>\n<li>\nOpen a <strong>VS2015 x64 Native Tools Command Prompt<\/strong> (things will not work correctly otherwise!) and run:<\/p>\n<p><code><br \/>\n> git clone git@github.com:kulibali\/ponyc-windows-libs.git<br \/>\n> cd ponyc-windows-libs<br \/>\n> .\\getlibs.bat<br \/>\n> .\\setenv.bat<br \/>\n<\/code>\n<\/li>\n<li>\nNow you can run the pony compiler and tests:<\/p>\n<p><code><br \/>\n> cd path_to_pony_source<br \/>\n> build\\release\\testc.exe<br \/>\n> build\\release\\testrt.exe<br \/>\n> build\\release\\ponyc.exe -d -s packages\\stdlib<br \/>\n> .\\stdlib<br \/>\n<\/code>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Update 2017-01 I have made a vastly simpler build system for Pony on Windows. Original I have been taking a look at the very interesting Pony programming language in my copious free time for a couple of weeks now. It&#8217;s fairly straightforward to build on Ubuntu. Here&#8217;s how I built it on Windows 10: This &hellip; <a href=\"https:\/\/balafon.net\/?p=1647\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Building the Pony compiler on Windows&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,3],"tags":[195],"class_list":["post-1647","post","type-post","status-publish","format-standard","hentry","category-computing","category-journal","tag-pony"],"_links":{"self":[{"href":"https:\/\/balafon.net\/index.php?rest_route=\/wp\/v2\/posts\/1647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/balafon.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/balafon.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/balafon.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/balafon.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1647"}],"version-history":[{"count":8,"href":"https:\/\/balafon.net\/index.php?rest_route=\/wp\/v2\/posts\/1647\/revisions"}],"predecessor-version":[{"id":1674,"href":"https:\/\/balafon.net\/index.php?rest_route=\/wp\/v2\/posts\/1647\/revisions\/1674"}],"wp:attachment":[{"href":"https:\/\/balafon.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/balafon.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/balafon.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}