MicroManager build - Dependencies in Github version, and build instructions

Probably a question for Nico…

I’ve just noticed on here that the MM source has now moved to Github. Probably I should have spotted it sooner - never mind. This does mean your build instructions on the MM website are now obsolete though.

More of a problem though is actually getting it to build at all. The MM core is dependent on Boost, 3rd-party public (and private) dependencies, and various other bits and pieces according to the core readme.

What version of Boost and everything else do we need? And where do we get the 3rd-party dependencies from now? For 3rd-party libraries which MM tracks, shouldn’t they be another Git repo, and they can be pulled in as a submodule?

It’d help to have a few lines in the MM core readme to cover this, at least until the website gets updated for the new build setup.

Hi Graham,

The instructions here should be accurate, though it’s possible that some things are unclear.

I’m currently working on many updates to the build system used for the C++ components of Micro-Manager and once completed that will include getting the 3rdParty dependencies as Git submodules. However, there is still a lot of work to be done. For the time being please continue to use the SVN 3rdPartyPublic repository in exactly the same way they were used for MM1.4 to get things like Boost, Swig, etc.

–Nick

1 Like

Hi Nick,

I think I’ve solved most of it on my own. I’m afraid the build instructions aren’t correct though. (And those build instructions are not the same as the ones at Micro-Manager Programming Guide - Micro-Manager, Building MM on Windows - Micro-Manager, or some other mutually-contradictory Wiki pages about building the code.)

What I found getting things to build…

  1. We need to pull the Git repo GitHub - micro-manager/MM3rdpartyPublic: Repository of 3rd party source and binaries used to build micromanager. as an entirely separate step, instead of it being a submodule pulled in automatically. This isn’t listed anywhere in the build instructions. I’m not sure whether this is 100% needed for building, but there’s no details about it. I figured this out by knowing the previous build process, finding the environment variable in MMCommon.props, and then going hunting for the Git repo for it.

  2. Paths need fixing in MMCommon.props. If you’re pulling a Git repo called “MM3rdpartyPublic.git” then by default you’ll get a directory called “MM3rdpartyPublic” and not “3rdpartypublic”. The hardcoding of relative paths (multiple levels of “…”) also assumes an extra layer in the directory structure somewhere.

  3. The “MM_BOOST_INCLUDEDIR” and “MM_BOOST_LIBDIR” directories don’t match what’s in the 3rd-party repo. They’re assuming a directory structure for the released version of Boost, whereas the Boost directory you’ve got in 3rd-party is the source code which has a different directory structure.

  4. Because the 3rd-party repo contains the Boost source, not the built library, it also doesn’t have the library directories. The MM solution doesn’t build this either. So in fact we need to download and install Boost entirely separately, and change the “MM_BOOST_INCLUDEDIR” and “MM_BOOST_LIBDIR” directories to somewhere which isn’t under the 3rd-party repo at all. I’ve downloaded the latest (1.76.0) and it seems to build. Still need to try to get things running though.

  5. Because these directories have changed, this trips up anything which hardcodes its paths instead of using the new environment variables for the directories. This affects “PVCAMIncludes.h” which pulls in hardcoded paths which don’t exist. It also affects the “XIMEACamera” project, which tries to pull in the file “pugixml.cpp” with a hardcoded path which doesn’t exist. They don’t affect me, but you might want to update them to do the right thing going forwards.

I haven’t actually got this build running yet. I’ll let you know if there’s anything else comes up.

Graham.

Oh, OK - use the SVN version of 3rd-party? That would be the difference then. I’ll pick that up instead of the Git version.

Yes, the idea is to continue using svn 3rdPartyPublic as before. MM3rdpartypublic is the ongoing work to a future build but is not yet used yet.

Hi Graham,

That MM3rdPartyPublic repository that you mention is a work in progress and shouldn’t currently be used. I’ve just updated the Readme to make that more clear. Sorry for the confusion. @nicost can we sett that repository to be private or hidden for now to further avoid confusion?

Please, stick with using the SVN repository. and placing it in the same folder as your micro-manager source folder. This is something that should definitely be explained more clearly in the instructions.

Looking briefly through the Wiki page that you linked to I’m not seeing anything that isn’t correct, though I don’t doubt that there are many pages that need an update. I also notice that there are many pages that are so old they should probably be removed altogether.

At some point soon it might make sense for us to completely split the instructions for Micro-Manager 2 from the instructions for Micro-Manager 1.

–Nick

Github apparently does not allow changing visibility of a public repository.

Hi Nick,

I guess they’re correct for Micro-Manager 1 but not 2? That’s probably where I’m getting confused.

Graham.

BTW Nick, Boost 1.55 seems to have an issue building for Visual Studio 2013, which is giving me an error when building MMCore. It’s described in this StackOverflow post.

Did you say you’re moving to Boost 1.60? I guess that’ll solve the problem.

Graham.

The instructions at Building MM on Windows - Micro-Manager pertain to both 1.4 and 2.0 builds. Can you let us know what is confusing, or does not work? It is difficult to keep these up to date, since we are not setting up build environments daily (I try to avoid it when I can;). B.t.w., last time I tried it was not very difficult to install VS2010.

BTW Nick, Boost 1.55 seems to have an issue building for Visual Studio 2013

I am recreating my old Visual Studio 2013 setup from my previous job right now for building MM devices. My device libraries used a lot of C++11 templates.

Luckily, I took notes on the toolchain! Here’s what worked for me with VS 2013 just now.

BUILD_NOTES (updated)

Unfortunately, the version of boost-1.55.0 in MM’s repository does not work with Visual Studio 2013 and above. You need to download at least boost-1.58.0. See the BUILD_NOTES linked above

Thanks Nico and Jeffrey, and sorry for the delayed reply. It’s possible ( highly likely :wink: that much of this has come down to me trying to soldier on with a non-standard setup. VS2010 is not at all easy to get hold of these days! With a bit of work and some google-fu, I’ve got a setup based on VS2010 and Java 8 which works. I doubt it’ll be the last dumb question I ask, but at least these particular dumb questions are sorted. :slight_smile:

For reference, here’s my install process (which I’ve written down for the benefit of whoever in my team needs to follow me). It might prove useful for anyone else wanting a leg-up.

For Windows SDK 7.1:

For VS2010 Express:

  • Go to https://my.visualstudio.com/Downloads (you’ll need to set up a user profile) and search for “express 2010”.
    • Note that this cannot be found from the main Visual Studio page, nor by searching the normal downloads available from the main Visual Studio site.
  • Download “Visual Studio 2010 Express”, x86 DVD version. This gives you an ISO file.
    • Note that we cannot use the EXE version which is a web installer. MS have deactivated the server for the web installer.
  • In this ISO, go to the “VCExpress” directory and run “setup.exe”.
  • Uncheck installation of Silverlight and SQL Server, then install as normal.
  • Go to https://my.visualstudio.com/Downloads again and search for “Visual Studio 2010 Service Pack 1”.
  • Download “Visual Studio 2010 Service Pack 1”, x86 DVD version.
    • Again we need the DVD version, because the EXE version is a web installer which does not work.
  • In this ISO, run “setup.exe”. Allow this to install all required updates.
  • For some reason the SDK release 7.1 with SP1 has lost the x64 compilers. Download and install this update to fix it. Download Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1 from Official Microsoft Download Center
  • Run VS2010 Express and go to to “Help – Register Product”.
  • Microsoft have taken down their online registration site for VS2010 Express. VS2010 still expects to be registered though.
    • The only option I’ve found is to use a code from the internet. Enter the code:
      • 6VPJ7-H3CXH-HBTPT-X4T74-3YVY7
    • Since Express versions are free to use, there should be no licensing issues with this. We accept licensing when we install the software, not when we register.
    • Since the online registration site has been taken down, VS2010 also cannot call home to cross-check usage of any code. I don’t believe VS2010 was capable of this anyway.

To install Java 8 (the build instructions say that the latest Java should work, but it gave me errors):

To be able to build MMCoreJ_wrap:

  • In VS2010, go to project MMCoreJ_wrap and select “Properties”.
  • Go to “Configuration Properties – VC++ Directories”.
  • Set “Configuration” to “All Configurations” and “Platform” to “All Platforms”.
  • Edit “Include directories” and add the following include directories (assuming standard location for OpenJDK installation). Change the version number as required if you have a different version, of course.
    • C:\Program Files\AdoptOpenJDK\jdk-8.0.292.10-hotspot\include
    • C:\Program Files\AdoptOpenJDK\jdk-8.0.292.10-hotspot\include\win32
1 Like