-
Notifications
You must be signed in to change notification settings - Fork 163
Pretzel on Mono #215
Comments
Its actually |
Trying to find the root cause, but mono doesn't seem to be picking up This means instead of
It gets
|
Changing it from |
There is/will be issues with various file system access where slashes are involve. ie It should be something like |
Build issues on linux:
|
As of fb35bac it compiles and embeds on Ubuntu, but it does not work as it cannot find NDesk ( |
Nice work and writeup @vikingcode! |
Alright, there is an issue with embedding via IL-Repack, which I'm trying to figure out. It has nothing to do with NDesk - if I drop NDesks file in, it'll then move onto another DLL, and so on and so forth until they're all present. Based on the filesize alone, Pretzel.exe does contain everything, but it's not finding it properly. |
Without VS for Linux, it's much harder to debug this, but paths are wonky which in turn is causing most of the issues once its actually running (if I disable the embedding/use the MEF work around). Pretzel looks fairly different from when I last contributed to it in any sort of significant way so it's taking me awhile to figure out where this could be coming from. I suspect most, if not all, file operations will need to be rejiggered because of paths. However, I should point out that its _rendering HTML fine out of the box_. |
That wouldn't surprise me either 😢 |
Excellent work! 😃 |
So this is where my branch is up to: It works on mono/ubuntu, including taste (web server) given the following constraints
The last point is probably the one main issue with getting it merged in/before I send a pull request. Alternatively we could possibly do some shenanigans where it tests whether its a single exe (Windows) or multiple (Linux) yet still works. While a single exe is preferable, working at all on Linux is kinda better than nothing. |
The changes to nuget (ie, dropping Targets) made this much easier. The problem I have now is basically mono itself, be it on Windows or Linux. I can embed all the assemblies into Pretzel.exe like we are now using xbuild or msbuild, and on .NET it'll run fine (no matter what compiles it), but on the mono runtime it can't "unpack" the assemblies for lack of a better word. It simply can't find the other assemblies. I get errors like
MonoDevelop crashes when I attach a debugger on Ubuntu, and Xamarin Studio can't even clean the directory, let alone compile (!), so I'm not able to get any further with debugging it. Building via CLI is the only way to go. Any suggestions? |
Taking a quick look with dotPeek to the assemly compiled from your branch and the official branch it can be confirmed, that mono may indeed be right: the assemby is not merged properly, or at least not the same way as in the official one. Also note: commenting a reference to LockFile in the Pretzel.Tests csproj file was needed to be able to build your branch. Please confirm by trying to build a clean checkout. Also note: imho you misused Path.AltDirectorySeparatorChar in your changes, if mono honours the msdn docs. I have commented it on the changeset in your branch. Please consider reviewing those parts. edit: |
Thats pretty much what I've been saying for the last few posts. The same code compiles on xbuild and msbuild, but on xbuild it doesn't embed or extract the other assemblies properly. Doesn't matter if its Windows or Linux, xbuild (mono) is the one causing problems, so I largely gave up on it as I don't know enough about IL merging on mono to figure it out.
Given LockFiles an exe, I have pretty much no confidence of getting that to work on linux. Tests are irrelevant until the above point is addressed - one issue at a time. |
LockFiles doesn't work on Linux but have been ditched so it's not a problem. |
While a Windows dev myself, I'm a cheap bastard and having a Linux host is the way to go for me. I currently use DigitalOcean, with Jekyll building on git commit/push.
I thought I'd start a bit of a discussion and discovery to whats needed to get Pretzel working on mono.
So far, to get it building
Mono doesn't have nuget support? Or nuget is built to a not nuget profile, I'm not sure, removing the nuget task from the csproj makes it build as all the references were there as I'd previously built on .NET. Apparently nuget does have mono support, so perhaps the nuget.exe in the repo is out of date?
It doesn't have to be removed, but the ILMerging does not work. This can be left to 'error' out or removed from the csproj. IL-Repack
or Fody.Costuramight be options.Because the ILMerging doesn't work, the MEF stuff doesn't work.Specifically,
var first = new AssemblyCatalog(Assembly.GetExecutingAssembly());
would need to be changed toIdeally some sort of ILMerging that works with mono would be bestFixed
Todo
baking
(and thus serving up viataste
) fail pretty epicallyThe text was updated successfully, but these errors were encountered: