[Mrtrix-discussion] Fwd: MRtrix mrconvert in windows
Jeurissen Ben
ben.jeurissen at ua.ac.be
Fri Jun 14 01:49:27 PDT 2013
Dear Jesse,
Self compiled versions are probably the best since they are all build with the same compiler! If you managed to get a stable build of gtk+, I would definitely stay with that! The erratic behavior I experienced is when you mix differently compiled binaries (different gcc generations, different exception or threading options) from the dependencies.
If you want to use the executables on another computer, indeed you will have to copy all required dlls (mingw dlls, gtk dlls, gsl dlls, etc). Figuring which ones you need is basically what dependency walker is designed for (although additional trial and error might be needed). You don't need to install a complete mingw + complete dependencies on the other computer, but just the required dlls).
Cheers,
Ben
Ben Jeurissen, Ph.D.
Post-doctoral researcher
Vision Lab, Dept. of Physics
University of Antwerp
Universiteitsplein 1, N.1.18
B-2610 Wilrijk, Belgium
Phone: +32 3 265 24 77
Email: ben.jeurissen at ua.ac.be
Url: http://visielab.ua.ac.be/people/ben-jeurissen
________________________________
From: Jesse Ross-Jones [jesse.rj at gmail.com]
Sent: 14 June 2013 10:27
To: Jeurissen Ben
Cc: mrtrix-discussion at public.nitrc.org
Subject: Re: [Mrtrix-discussion] Fwd: MRtrix mrconvert in windows
Hi Ben,
Thank you for the reply. Indeed compiling gtk+ from source was a nightmare. Good to know about the issues with selfcompiled gtk, I guess I will switch to using the binary gtk+ installer.
I am currently at the point where I can run the python build script and properly compile the module I need. The problem I am having is just running the compiled exe on another computer. I have tried two different methods, one was to copy the exe and all the dlls that it was asking for to the PC, the other was to install the binary release of MRtrix and replace mrconvert with the mrconvert module I compiled. Both methods result in the 0xc0000142 error.
When you say "copy the compiler runtime" do you mean the mingw bin directory? (This would mean installing mingw on the new computer and copying the compiled gtk, gtkglext, GTKMM and GSL into mingw?)
Thank you,
Jesse
On Tue, Jun 11, 2013 at 5:54 PM, Jeurissen Ben <ben.jeurissen at ua.ac.be<mailto:ben.jeurissen at ua.ac.be>> wrote:
Dear Jesse,
(You are aware that there is a windows binary release on the mrtrix page, right?)
Compiling and linking the 32-bit mrtrix command line tools on Windows is quite straightforward. Assuming you are using mingw as a compiler and have python installed, the latest version should compile out of the box using the python build script. That is assuming you have all the dependencies correctly installed (which apparently you have?).
One big issue that I had is that the available windows binaries of the dependencies would not work together nicely. Some of the binaries date back to 2006, while others were built only last year. Some of them were built with very specific build and link flags, making them incompatible with other binaries... For compilation and linking, this usually was not an issue, but at runtime I experienced erratic numerical and multi-threading behavior (i.e. very different numbers coming out on windows as opposed to linux) and many runtime crashes (especially when using mrview). In the end, I used the official gtk binary package (compiling gtk from scratch is a nightmare), compiled gtkmm and gsl myself and compiled an unstable svn version of gtkglext. Only then, the resulting binaries would be stable.
So, be very careful with the windows binaries you create, as being able to compile,link and run them does not guarantee correct operation.
The exact versions I used are:
GCC: 4.7.0 (thread model win32, dwarf2 exceptions)
GTK+: 2.24.10 (from the all-in-one bundle on http://www.gtk.org/download/win32.php)
gtkglext: latest git release (self compiled)
GTKMM: 2.24.2 (self compiled)
GSL: 1.15 (self compiled)
With those binaries correctly installed in a msys environment with python, you can just run "python build" and the entire mrtrix package will be built.
About the 0xc0000142 error, I'm pretty sure this is a dll-related issue. The only difference on another computer running the same operating system are the dlls right? What dlls have you copied over to the other machine? Did you copy the compiler runtime? (In my experience Dependency walker doesn't always show all required dlls).
Cheers,
Ben
Ben Jeurissen, Ph.D.
Post-doctoral researcher
Vision Lab, Dept. of Physics
University of Antwerp
Universiteitsplein 1, N.1.18
B-2610 Wilrijk, Belgium
Phone: +32 3 265 24 77<tel:%2B32%203%20265%2024%2077>
Email: ben.jeurissen at ua.ac.be<mailto:ben.jeurissen at ua.ac.be>
Url: http://visielab.ua.ac.be/people/ben-jeurissen
________________________________
From: mrtrix-discussion-bounces at public.nitrc.org<mailto:mrtrix-discussion-bounces at public.nitrc.org> [mrtrix-discussion-bounces at public.nitrc.org<mailto:mrtrix-discussion-bounces at public.nitrc.org>] on behalf of Jesse Ross-Jones [jesse.rj at gmail.com<mailto:jesse.rj at gmail.com>]
Sent: 11 June 2013 16:08
To: mrtrix-discussion at public.nitrc.org<mailto:mrtrix-discussion at public.nitrc.org>
Subject: [Mrtrix-discussion] Fwd: MRtrix mrconvert in windows
Dear MRtrix community,
I have compiled MRtrix in windows after a lot of work installing the gtk libraries. Now however, when I try to run mrconvert on another computer running the same operating system (Win8 32 bit) I get the error: The application was unable to start correctly (0xc0000142). At first I thought this was an error with DLLs, however using dependancy walker I have found this is not the case. I am wondering now if the error is perhaps there is a flag I must use during the compilation in order to use the exes on another machine. Looking at the build script I see the following option -system=X specify the architecture to build. Could this be used to compile the executable for use on another system?
Once I am able to compile and run MRconvert in windows, I would be happy to contribute the process for others in the future to follow. I have already made a list of all the dependencies and the required versions needed to compile.
thank you,
Jesse
---------- Forwarded message ----------
From: Jesse Ross-Jones <jesse.rj at gmail.com<mailto:jesse.rj at gmail.com>>
Date: Mon, Jun 3, 2013 at 9:21 AM
Subject: Re: MRtrix mrconvert in windows
To: Jeurissen Ben <Ben.Jeurissen at ua.ac.be<mailto:Ben.Jeurissen at ua.ac.be>>
Dear Ben,
After much work I have finally succeed in compiling MRtrix in windows. It is quite a bit of work to find the correct versions of the dependencies. Now however when I try to run the compiled exe on another windows (same OS ) machine I get an error:
The application was unable to start correctly (0xc0000142). And when I dig a bit further I find this is likely related to problems with 64 bit and 32bit libraries. However when I try with another 32 bit machine it also doesnt work.
I was wondering if you would know either how to compile MRtrix such that the executables can be run on other machines, or perhaps there is a way to package the exes with the required libraries?
Thank you very much
Jesse
On Wed, Apr 10, 2013 at 10:56 AM, Jeurissen Ben <Ben.Jeurissen at ua.ac.be<mailto:Ben.Jeurissen at ua.ac.be>> wrote:
Dear Jesse,
I have no experience with building mrtrix using an IDE. Best place to ask is on the mailinglist. If there's no answer, it probably means no-one has tried or succeeded before.
I'm pretty sure it's possible to make a debug build with the mrtrix build environment and then do the debugging of the binary with your debugger/IDE of choice.
If you insist on doing everything in the IDE, then you will have to look into how the IDE handles dependencies and convert the dependency resolving mechanism of mrtrix to something your IDE can handle.
Cheers,
Ben
Ben Jeurissen, Ph.D.
Post-doctoral researcher
Vision Lab, Dept. of Physics
University of Antwerp
Universiteitsplein 1, N.1.18
B-2610 Wilrijk, Belgium
Phone: +32 3 265 24 77<tel:%2B32%203%20265%2024%2077>
Email: ben.jeurissen at ua.ac.be<mailto:ben.jeurissen at ua.ac.be>
Url: http://visielab.ua.ac.be/people/ben-jeurissen
________________________________
From: Jesse Ross-Jones [jesse.rj at gmail.com<mailto:jesse.rj at gmail.com>]
Sent: 08 April 2013 08:37
To: Jeurissen Ben
Subject: Re: MRtrix mrconvert in windows
Hi Ben,
Thank you once again for your previous help.
I was wondering if you might be able to help me get in contact with someone who knows how to compile MRtrix in a debugging environment? I posted a message on the mailing list last week but did not receive a response.
Much appreciated and Best Regards,
Jesse
On Thu, Mar 21, 2013 at 2:54 PM, Jesse Ross-Jones <jesse.rj at gmail.com<mailto:jesse.rj at gmail.com>> wrote:
Hi Ben,
Being unable to run the build in windows, i've started to compile the source in linux and try to extract the necesarry libraries from there, however, i see over a hundred .o libraries .... Do you think you would be able to provide an example of the -l switch you are using to compile? Would having a successful build in linux be of any help when compiling in windows?
Best Regards,
Jesse
On Thu, Mar 21, 2013 at 10:34 AM, Jesse Ross-Jones <jesse.rj at gmail.com<mailto:jesse.rj at gmail.com>> wrote:
Thanks very much!
Following the build procedure i run the build but I run into the following even though gsl is included in my path..
failed with output:
In file included from lib/ptr.h:26:0,
from lib/file/dicom/image.h:33,
from lib\file\dicom\image.cpp:44:
lib/mrtrix.h:69:29: fatal error: gsl/gsl_version.h: No such file or directory
compilation terminated.
Is there another path python is using?
Much appreciated,
Jesse
On Thu, Mar 21, 2013 at 9:25 AM, Jeurissen Ben <Ben.Jeurissen at ua.ac.be<mailto:Ben.Jeurissen at ua.ac.be>> wrote:
This list is generated by the python build script as part of the build procedure. The easiest way would be to run this script and see what libraries it wants to link. Alternatively you can look through the build script and find the relevant libraries yourself. However, they are not in there hardcoded but I think they are obtained through the pkg-config package.
Cheers,
Ben
Ben Jeurissen, Ph.D.
Post-doctoral researcher
Vision Lab, Dept. of Physics
University of Antwerp
Universiteitsplein 1, N.1.18
B-2610 Wilrijk, Belgium
Phone: +32 3 265 24 77<tel:%2B32%203%20265%2024%2077>
Email: ben.jeurissen at ua.ac.be<mailto:ben.jeurissen at ua.ac.be>
Url: http://visielab.ua.ac.be/people/ben-jeurissen
________________________________
From: Jesse Ross-Jones [jesse.rj at gmail.com<mailto:jesse.rj at gmail.com>]
Sent: 21 March 2013 09:10
To: Jeurissen Ben
Subject: Re: MRtrix mrconvert in windows
Hi Ben,
Thank you for the quick reply. I am a little at a loss as to how to identify exactly which libraries i need to link to with -l. Currently none are linked and that would be why I am getting those errors. Is there a way generate some sort of list, or manual searching that needs to be done?
Much appreciated!
Jesse
On Wed, Mar 20, 2013 at 1:11 PM, Jeurissen Ben <Ben.Jeurissen at ua.ac.be<mailto:Ben.Jeurissen at ua.ac.be>> wrote:
Dear Jesse,
I don't have any recent experience with eclipse.
If you encounter linking issues this probably means you are missing library flags in your link commmand.
You need to add the library paths with the -L switch and link the specific libraries with the -l switch.
What link related switches do you currently have?
Cheers,
Ben
Ben Jeurissen, Ph.D.
Post-doctoral researcher
Vision Lab, Dept. of Physics
University of Antwerp
Universiteitsplein 1, N.1.18
B-2610 Wilrijk, Belgium
Phone: +32 3 265 24 77<tel:%2B32%203%20265%2024%2077>
Email: ben.jeurissen at ua.ac.be<mailto:ben.jeurissen at ua.ac.be>
Url: http://visielab.ua.ac.be/people/ben-jeurissen
________________________________
From: Jesse Ross-Jones [jesse.rj at gmail.com<mailto:jesse.rj at gmail.com>]
Sent: 19 March 2013 16:19
To: Jeurissen Ben
Subject: MRtrix mrconvert in windows
Hi Dr. Jeurissen,
First of all, thank you very much for your work on the MRtrix project.
I am sending you this email in hopes that you might be able to help me to compile mrconvert (part of MRtrix) in windows.
Following the instructions: http://www.brain.org.au/software/mrtrix/install/windows.html
I have downloaded the dependencies and source.
I have set up a project in eclipse using the mingw compiler and I have copied the mrconvert.cpp into a new project and added paths to eclipse pointing to all the header files required by mrconvert and its includes. However.... I am running into linking issues.
The errors I am receiving are all "undefined reference" for example:
undefined reference to `Glib::Timer::elapsed() const' mrconvert line 453,
undefined reference to `gsl_isnan' mrconvert line 453
undefined reference to `gsl_matrix_alloc' mrconvert line 153
I would very much appreciate your insight into compiling MRtrix in windows and help to compile mrconvert.
Best Regards,
Jesse
_______________________________________________
Mrtrix-discussion mailing list
Mrtrix-discussion at www.nitrc.org<mailto:Mrtrix-discussion at www.nitrc.org>
http://www.nitrc.org/mailman/listinfo/mrtrix-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.nitrc.org/pipermail/mrtrix-discussion/attachments/20130614/0ace6581/attachment-0001.html
More information about the Mrtrix-discussion
mailing list