A non harmful warning while compiling on Linux
I get this warning while compiling on Ubuntu 14.04 , clang and llvm 3.5 . I started compiling with ./build.sh and i get this warning repeatedly unknown warning option '-Wno-incompatible-ms-struct'; did you mean '-Wno-incompatible-pointer-types'? [-Wunknown-warning-option]
Although this does not seem to do any harm, but i think should be fixed.
Thanks @shahid-pk. I have noticed these warnings earlier today too. This is a recent regression and we should definitely fix them. The product code should build without warnings.
@sergiy-k I know the repository is not ready yet for linux but i want to play. I got into a problem after compiling this when try to run a trivial .exe with it compiled using mono compiler i get this error. ExecuteAssembly failed - status: 0x80004005 can you point me where the problem may be.?
@shahid-pk You'll need do a bunch of legwork in order to get this to work (and unfortunately I'm not certain that someone outside of Microsoft can put all the pieces together right now, since I haven't tried to chase down all the dependencies to make sure we have build able projects in GitHub for them).
At a very high level, you need to do the following:
- Copy corerun and libcoreclr.so into a folder
- Add a version of mscorlib.dll compiled for Unix (this has to be generated on windows, take a look at build.cmd which has a flag you can use to get this building. Note that you'll want to remove all the exiting built binaries manually before running this).
- ./corerun [path-to-managed-exe]
You should also understand that the runtime on Linux is super limited right now. Stack walking doesn't work. Trying to throw an exception won't work. The version of Console.WriteLine in mscorlib.dll doesn't work on Linux (the version on CoreFX will work, but it depends on some other assemblies which we I don't believe that we produce publicly yet).
Given what we have up here today, I would be very surprised if you can do anything much more interesting than more than return an int from main.
Note that managed debugging on Linux is completely nonexistent right now. The best we have is you can set COMPlus_DumpJittedMethods=1 and the JIT will print each method it compiles.
I very much want to get some stuff on our wiki that shows to build the Runtime on Linux and get enough managed components so you can run Hello World, but it's going to take us a little bit to actually document the whole process and make sure it's something folks outside of Microsoft can do, so while I encourage you to look around I just want to set expectations that everything is very very rough right now and we might not be super responsive to questions, until we officially published a workflow and blessed it.
@ellismg Thanks a lot you gave me plenty to play with. It was very helpful. I wanted this just for playing around as i know this repo is not near ready for unix yet.Take your time we can wait.
Fixed in dotnet/coreclr#107
@shahid-pk FWIW, I have published a walk through on how to build and run Hello World
@ellismg great thanks.trying now.