Love the language (has best features of akka, python and java it seems!), but I'm on windows 7. Any tips on how to install it there?
P.S.: On an unrelated note I've created a SO tag for ponylang: http://stackoverflow.com/questions/tagged/ponylang
Thanks for the SO tag.
Ponyc runs fine on Windows, but I'm afraid we haven't written an installer yet, so you have to build it yourself. The hardest part of that is installing LLVM, which is rather a pain. But it's all perfectly doable, I'm one of the main Pony devs and Windows is my primary platform.
To install on Windows:
premake5.exe --with-tests --to=vs vs2013
Shout here if you have any problems.
We really should provide a more thorough guide, feel free to write / start one. Also to aid others, can you report any specific problems you have and which version of LLVM you use.
So which one would I download from these?
http://llvm.org/releases/download.html#3.6.2
Clang source code (.sig)
LLVM source code (.sig)
Compiler RT source code (.sig)
Dragonegg source code (.sig)
LibC++ source code (.sig)
LibC++ ABI source code (.sig)
LLDB source code (.sig)
LLD source code (.sig)
Polly source code (.sig)
OpenMP source code (.sig)
Clang Tools Extra (.sig)
LLVM Test Suite (.sig)
@drozzy
LLVM source code
Trying to configure the LLVM with CMake GUI (input source file is C:/Users/drozdyuka/Downloads/llvm-3.6.2.src) I get this error in CMakeError.log:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler:
Build flags:
Id flags:
The output was:
The system cannot find the file specified
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler:
Build flags:
Id flags:
The output was:
The system cannot find the file specified
Any idea what this means?
Hmm, no idea about those errors I'm afraid. The procedure I go through with cmake is:
Configure.Visual Studio 12 2013 Win64. VS2015 Win64 should also work.Generate.Oh, I just managed to scroll up and the actual error was:
CMake Error at CMakeLists.txt:25 (project):
No CMAKE_CXX_COMPILER could be found.
How do I install that?
Fyi, I'm selecting _Visual Studio 14 20145 Win64_ as my "generator".
Do I need to actually install visual studio?
Hmm, I didn't have to install or setup anything to do with CMAKE_CXX_COMPILER, I just installed CMake and that worked.
You will neeed Visual Studio. CMake just generates the config files, you need something else to actually build everything. I'd recommend getting the community edition of VS, it's free and has most of the features of the paid for versions.
@andymcn ok, not having Visual Studio was the problem! Thanks, now I'm cooking with gas.
When you say With the location of your LLVM\bin I don't have a bin directory in my LLVM "build" folder. See attached for how my build directory looks after CMake is done.
Does this mean something didn't "Generate" correctly?

That looks fine for how CMake leaves things. You then need to use Visual Studio to build it and where it puts things is the bin directory.
If you just build most of the projects your binaries will end up in either the Debug or Release directories (depending on whether you do a debug or release build).
However, if you build the CMake/Install (right click on the project in the solution explorer and select build) then it will build everything and install it to something like C:\Program Files\LLVM and your bin directory will be C:\Program Files\LLVM\bin. Note that depending on how your user account is set up you might need to run Visual Studio as administrator to install into program files (right click and select Run as administrator).
Have you had any more success, or problems, with this?
Some more progress:
CMakePredefinedTargets/INSTALL in visual studio project.C:\Program Files\LLVM\bin (added that to path)N.B.: I am running VS in _Admin_ mode
I have Visual Studio 2015, so running premake with vs=2013 makes my VS want to upgrade the libraries:

If I upgrade them and compile I get this:
1>------ Build started: Project: gtest, Configuration: Debug x64 ------
2>------ Build started: Project: libponyc, Configuration: Debug x64 ------
3>------ Build started: Project: libponyrt, Configuration: Debug x64 ------
1> gtest-all.cc
1> gtest_main.cc
2> ast.c
2> bnfprint.c
2> error.c
2> frame.c
2> id.c
2> lexer.c
2> lexint.c
2> parser.c
2> parserapi.c
2> printbuf.c
3> actor.c
3> messageq.c
3> asio.c
2> source.c
3> epoll.c
2> stringtab.c
3> event.c
3> iocp.c
3> kqueue.c
3> fun.c
3> hash.c
3> list.c
3> stack.c
3> actormap.c
3> cycle.c
3> delta.c
3> gc.c
2> symtab.c
2> token.c
2> treecheck.c
2> codegen.c
3> objectmap.c
2> genbox.c
2> gencall.c
2> gencontrol.c
2> gendesc.c
3> trace.c
3> directory.c
3> lsda.c
2> genexe.c
3> paths.c
2> genexpr.c
3> posix_except.c
3> socket.c
2> genfun.c
2> genheader.c
3> ssl.c
3> stat.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\codegen.c)
2> genident.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\gencall.c)
2> genlib.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genbox.c)
2> genmatch.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\gencontrol.c)
2> genname.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\gendesc.c)
2> genobj.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genexe.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genexpr.c)
3> stdfd.c
2> genoperator.c
2> genopt.cc
2> genprim.c
3> time.c
2> genreference.c
3> win_except.c
2> gentrace.c
3> alloc.c
3> heap.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genfun.c)
3> pagemap.c
2> gentype.c
3> pool.c
3> options.c
3> threads.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genlib.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genname.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genident.c)
2> host.cc
2> dwarf.c
2> symbols.cc
2>..\src\libponyc\codegen\host.cc(9): fatal error C1083: Cannot open include file: 'llvm/IR/Function.h': No such file or directory
2> array.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genmatch.c)
2> call.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genheader.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genobj.c)
2> control.c
2> ffi.c
3> cpu.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genprim.c)
2> lambda.c
3> mpmcq.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\gentrace.c)
2> literal.c
3> scheduler.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genoperator.c)
3> start.c
2> match.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genopt.cc)
2> operator.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genreference.c)
2> postfix.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\gentype.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\debug\dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\debug\symbols.cc)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\debug\dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\debug\dwarf.c)
2> reference.c
2> casemethod.c
2> docgen.c
2> expr.c
2> finalisers.c
2> flatten.c
2> import.c
2> names.c
2> pass.c
2> scope.c
2> sugar.c
2> syntax.c
2> traits.c
2> buildflagset.c
2> ifdef.c
2> package.c
2> platformfuns.c
2> program.c
2> use.c
2> paths.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\pass\pass.c)
2> vcvars.c
2> paint.c
2> reach.c
2> alias.c
3> libponyrt.vcxproj -> C:\Users\drozdyuka\Projects\ponyc\vs\..\build\debug\ponyrt.lib
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\pkg\package.c)
2> assemble.c
2> cap.c
2> lookup.c
2> matchtype.c
2> reify.c
2> sanitise.c
2> subtype.c
2> viewpoint.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\reach\reach.c)
4>------ Build started: Project: ponyc, Configuration: Debug x64 ------
4> main.c
1> gtest.vcxproj -> C:\Users\drozdyuka\Projects\ponyc\vs\..\build\debug\gtest.lib
5>------ Build started: Project: testc, Configuration: Debug x64 ------
6>------ Build started: Project: testrt, Configuration: Debug x64 ------
6> fun.cc
6> hash.cc
6> list.cc
6> heap.cc
6> pagemap.cc
6> pool.cc
5> badpony.cc
5> buildflagset.cc
5> ffi.cc
5> flatten.cc
5> id.cc
5> lexer.cc
5> literal_inference.cc
5> literal_limits.cc
5> local_inference.cc
5> matchtype.cc
5> option_parser.cc
5> paint.cc
4>LINK : fatal error LNK1104: cannot open file 'C:\Users\drozdyuka\Projects\ponyc\build\debug\ponyc.lib'
6>..\test\libponyrt\mem\heap.cc(11): error C2220: warning treated as error - no 'object' file generated
6>..\test\libponyrt\mem\heap.cc(11): warning C4312: 'type cast': conversion from 'unsigned int' to 'pony_actor_t *' of greater size
5> parse_entity.cc
5> parse_expr.cc
5> program.cc
5> scope.cc
5> sugar.cc
5> sugar_expr.cc
5> sugar_traits.cc
5> symtab.cc
5> traits.cc
5> type_check_subtype.cc
5> use.cc
5> util.cc
5>LINK : fatal error LNK1104: cannot open file 'C:\Users\drozdyuka\Projects\ponyc\build\debug\ponyc.lib'
========== Build: 2 succeeded, 4 failed, 0 up-to-date, 0 skipped ==========
If I run it with vs=2015 I get an error when compiling ponyc with VS:
1>------ Build started: Project: gtest, Configuration: Debug x64 ------
2>------ Build started: Project: libponyc, Configuration: Debug x64 ------
3>------ Build started: Project: libponyrt, Configuration: Debug x64 ------
1> gtest.vcxproj -> C:\Users\drozdyuka\Projects\ponyc\vs\..\build\debug\gtest.lib
3> libponyrt.vcxproj -> C:\Users\drozdyuka\Projects\ponyc\vs\..\build\debug\ponyrt.lib
4>------ Build started: Project: testrt, Configuration: Debug x64 ------
2> codegen.c
4> heap.cc
2> genbox.c
2> gencall.c
2> gencontrol.c
2> gendesc.c
2> genexe.c
2> genexpr.c
2> genfun.c
2> genheader.c
2> genident.c
2> genlib.c
2> genmatch.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\codegen.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genbox.c)
2> genname.c
2> genobj.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\gencall.c)
2> genoperator.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\gendesc.c)
2> genopt.cc
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genmatch.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genheader.c)
2> genprim.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genexe.c)
2> genreference.c
2> gentrace.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genfun.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\gencontrol.c)
2> gentype.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genident.c)
2> host.cc
2> dwarf.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genexpr.c)
2> symbols.cc
2>..\src\libponyc\codegen\host.cc(9): fatal error C1083: Cannot open include file: 'llvm/IR/Function.h': No such file or directory
2> pass.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genlib.c)
2> package.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genname.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genobj.c)
2> reach.c
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genopt.cc)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\gentype.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\debug\dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\debug\symbols.cc)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genprim.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\debug\dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\debug\dwarf.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\pass\pass.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genoperator.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\genreference.c)
4>..\test\libponyrt\mem\heap.cc(11): error C2220: warning treated as error - no 'object' file generated
4>..\test\libponyrt\mem\heap.cc(11): warning C4312: 'type cast': conversion from 'unsigned int' to 'pony_actor_t *' of greater size
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\codegen\gentrace.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\pkg\package.c)
2>c:\users\drozdyuka\projects\ponyc\src\libponyc\codegen\../debug/dwarf.h(9): fatal error C1083: Cannot open include file: 'llvm-c/Core.h': No such file or directory (compiling source file ..\src\libponyc\reach\reach.c)
5>------ Build started: Project: ponyc, Configuration: Debug x64 ------
6>------ Build started: Project: testc, Configuration: Debug x64 ------
5>LINK : fatal error LNK1104: cannot open file 'C:\Users\drozdyuka\Projects\ponyc\build\debug\ponyc.lib'
6>LINK : fatal error LNK1104: cannot open file 'C:\Users\drozdyuka\Projects\ponyc\build\debug\ponyc.lib'
========== Build: 2 succeeded, 4 failed, 0 up-to-date, 0 skipped ==========
Unfortunately premake5 doesn't have a vs2015 option yet, so you'll have to use vs2013 and let Visual Studio do its update for now. However this shouldn't cause any problems.
Your errors look like LLVM isn't installed properly. Can you check whether you have the files:
C:\Program Files\LLVM\include\llvm-c\Core.h
C:\Program Files\LLVM\include\llvm\IR\Function.h
If you don't have those files, do you have the directories they should be in?
@andymcn yes, I do have those files indeed :-)
I think I'll just try visual studio 2013, because that update didn't work (that's what the second error log is).
@andymcn Argh! Any idea how to actually get a previous 2013 version of VS? It keeps redirecting me to VS2015 download!
They have hidden VS2013 slightly :)
@andymcn Sorry but I don't have time to try it. Anyone else can pick this up?
P.S.: Looking forward to the windows installer, might use pony in my next project.
Is Windows version without installer feasible temporary solution? Something what I just unzip, perhaps update PATH and it works. I do not care about icons and things installer usually do.
If it works with lldb such setup could also include debugger binary.
Pony doesn't really need an installer as such, it's just 1 exe, 2 libs and a bunch of Pony source files for the standard library. There are no registry settings, icons, etc and all the files zip down to about 13MB. I have considered simply zipping up all my files and making them available several times, and if there's a demand I could do this.
The bigger problem is that you also need LLVM installed, which is a huge pain on Windows. There are pre-built LLVM binaries, but they don't include all the tools we need, so they're no good for us. I could similarly zip up my LLVM directory and make it available. Obviously I'd have to check what their licence says about doing that first, but I'd be surprised if it was a problem. The bigger issue is that, even zipped up, my LLVM directory is 250MB. That's far too big to put on github and we really don't want to get into hosting things like that.
As standard we emit debug symbols in Pony executables, so both gdb and lldb work fine with Pony code. Unfortunately we can't currently do that on Windows due to a problem with the current version of LLVM. The LLVM guys are aware of the issue and assure us that this will be fixed "soon".
Despite all of this, once you have everything set up, using Pony on Windows is fine, I do all my Pony development on Windows. It can just be a pain to set up in the first place.
@andymcn I understand. I think having an easy way for windows users to setup a language will increase your share of the market faster. Greater share of windows users doesn't know how to compile stuff.
But this can come later - just something to keep in mind :-)
was finaly able to get it to build on windows(10), but it required fiddling with the options a bit.
what i did:
1) C/C++->Treat Warnings as errors: no
2) C/C++->Code Generation: Multi-Threaded Debug DLL
1) C/C++->Code Generation: Multi-Threaded Debug DLL
2) Linker->Treat Warnings as errors: no
3) Linker->Input->Ignore Specific Default Libraries: MSVCRT;%(IgnoreSpecificDefaultLibraries)
@midraal, great that you got it working and thanks for the information. It's a bit worrying that you had to change all those options though, the defaults should work.
The default "Multi-Threaded DLL" should work. I suspect you need the debug one because you made a debug build of LLVM. Is this the case?
Not being able to treat warnings as errors is very worrying, we're big believers that warnings are very bad. The defaults of "treat warnings as errors" and "warning level 3" should work. If they don't for you please open an issue with some of the warnings you're seeing.
You also shouldn't have to tell the linker to ignore MSVCRT, but again that might be due to using a debug build of LLVM.
Certain revisions of LLVM 3.7.0 do work (I'm using one), but most don't, so I'm not surprised it didn't work for you. Did you try the newly released 3.7.1? We haven't tried it yet, but the LLVM guys claim it should work for us.
i was using a debug build of llvm. i tried building with both llvm 3.7.1, and a git checkout of trunk, but i could not get either to work.
@midraal, from my experiments building using LLVM 3.6.x may look alright, but then virtually nothing will work. This is due to a Windows specific LLVM bug that means exceptions are broken, which Pony uses for raising errors which is quite common. Could you do a test to see if you hit this as well?
The easiest thing to do is to try to run the standard library unit tests. Please run:
ponyc packages\stdlib
and then run the resulting stdlib.exe.
This should run a bunch of tests (currently 78 of them) and print some output saying things like Passed: builtin/U32.string. If it doesn't appear to do anything, or crashes, them there is a problem.
stdlib.exe exits immidiatly without any output. guess i'll try to get llvm 3.7.1 to work again
@midraal mind sharing your binary once you got it successfully running? I sure don't want to go through all these hoops just to test a new lang...
And why is this project already built via https://ci.appveyor.com/project/pony-buildbot/ponyc/build/artifacts but no artifacts are stored? Shouldn't it be free for open-source projects?
@midraal, I was afraid of that. Seems we have quite an LLVM problem on Windows. The state of various versions is:
So if anyone can get 3.7.1 to build that would be great. I'll have another look at getting the version I'm using again.
Incidentally, other than 3.7.0 all versions seem to work fine on other OSes.
@Hades32, I'm putting together a detailed step by step howto to get this working. Unfortunately it won't be much use until we have a version of LLVM we can use.
@Hades32, Pony is in appveyor because we had a brief look at it a while ago. However, none of the Pony devs know anything about appveyor (like what an artifact is) and we haven't got round to putting the time in to work it out.
i tried building llvm 3.7.1 again. it looks like only the install script is broken so i tried copying the files manualy.
when building ponyc with it i get the following errors: https://gist.github.com/midraal/c3a2c7f58932b34006aa
Can you make life simple by having a prebuilt distribution as zip and with an installer for MS Windows?
We could have a prebuilt zip file for everything is this repo that's needed for Windows, we don't need an installer at all. The problem is the need to have LLVM installed, which is far too big for us to distribute. See my comment 9 days ago for more info.
@andymcn LLVM is 50MB. That is not large in my opinion. Scala binaries are 111MB. Typesafe activator (which includes guis of various kind) is 250MB.
The license is permissive: http://llvm.org/releases/3.7.0/LICENSE.TXT so it seems like you can bundle it.
Alternatively, you can make an installer that will pull the download from the llvm.org if you don't have the hosting capacity. (Although I can't imagine hosting static files to be that expensive - have you looked at amazon storage?)
Just my 2c.
@drozzy, the installable for some of LLVM is 50MB. This doesn't include tools like llvm-config that we need, which is why we have to go to all the hassle of building LLVM from source. My installed LLVM directory is over 1GB (compresses to around 250MB), although admittedly I haven't looked into how much of that could be pruned.
However, what I've never looked into is what we need to just run ponyc, rather then actually build it. This may make things more sensible, although various LLVM versions being broken may still be a major problem. I'll investigate when I get some time.
@andymcn Run vs build is a good point. Are we statically linking LLVM on Windows? It's statically linked on *NIX-like platforms. If so, then there's nothing in LLVM that's required to run ponyc.
Oh, I assumed we were dynamically linking LLVM, but it looks like it's static. In which case we shouldn't need anything except ponyc.exe and the standard library! We should probably throw in the examples as well.
I'll do a few more checks and if all is good I'll write a trivial batch script to zip everything up and I'll stick the resulting blob in the repo. It should be well under github's binary file size limit, but I'll check to be sure.
@andymcn: an artifact is simply what is being archived of an (successful) build. As far as I can tell you already got it to built fine (3 months ago). So all you would have to do is tell AppVeyor where the exe/dll's are it should archive. The you'd already have nightlies for Windows users...
@andymcn any update on this?
I think this really should be given a higher priority
@midraal @Hades32 currently @andymcn is away.
we are working on nightlies for everything and hopefully this should be resolved in the not so horribly distant future (but also not so immediate future)
Appveyor for windows works and runs tests now.
Why close this while Appveyor still doesn't produce artifacts?
At least I could not find any under https://ci.appveyor.com/project/sylvanc/ponyc
I'm also having trouble building this under Windows 10 ,VS2015 LLVM 3.8.1. It would be great if we can grab a windows binary somewhere. I feel like the lack of windows binary and complexity of building on windows will really turn people away from PonyC. Just my .02 :)
What is the status of this?
Closed because it's resolved. Please see the README for Windows install instructions
I thought everything needed to compile from Windows 10 a simple hello world, was included with the release linked in Github, from https://dl.cloudsmith.io/public/ponylang/releases/raw/versions/latest/ponyc-x86-64-pc-windows-msvc.zip
However:
C:\prj\pony\helloworld>ponyc
Building builtin -> C:\proglang\pony\packages\builtin
Building . -> C:\prj\pony\helloworld
Generating
Reachability
Selector painting
Data prototypes
Data types
Function prototypes
Functions
Descriptors
Optimising
Writing .\helloworld.obj
Error:
unable to locate a Windows SDK
Error:
unable to link: no vcvars
Please follow the installation instructions at https://github.com/ponylang/ponyc/blob/master/INSTALL.md#windows
I just can't download VS2019 right now, it's too big and internet is way too expensive in my country.
More than 3 GB on VS as a dependency just to be able to compile a hello world, is overkill, IMHO.
Wasn't LLVM statically linked into pony anyway? Why can't ponyc compile using that instead?
Sorry to hear that @HugoFlorentino. VS2019 is needed to do linking. I'm sorry you won't be able to join the community.
We hope to eventually be able to use lld, however, it still isnt where we would need it to be.
I'm locking this issue as it is a very old issue.
Most helpful comment
I think this really should be given a higher priority