[ome-devel] Building OMERO-CPP bindings on Windows

Josh Moore josh at glencoesoftware.com
Wed Sep 7 11:29:31 BST 2011


Hi Donald,

after more discussion with the team in Dundee here are some further ideas/suggestions:

 * Have you tried compiling a simple Ice application like the demos using VS 2010?

 * If that works, could you try a simple OMERO application using the pre-built binaries:

   http://hudson.openmicroscopy.org.uk/job/OMERO-trunk-components/component=cpp,label=x86-windows/

 * If you can't get the Ice application to work with VS 2010, what are the chances of your using VS 2008?

 * If none, would you be up for trying to import the VS 2008 msproj file for OMERO (cd OmeroCpp; ant msproject) into VS 2010?

After the release of 4.3.2 (imminently), we can start to evaluate whether we need to / can upgrade SCons and Ice.

Sorry for the hassle.
~Josh.

On Aug 30, 2011, at 12:48 PM, Donald MacDonald wrote:

> Hi Josh,
> 
> I've modified the vs.py, but I think the scons for which it was written is different from the one I have. I have tried to adjust it to the older settings, but I guess I've missed something as I'm getting:
> C:\Users\DonaldMacDonald\Desktop\ome>python build.py build-cpp
> Buildfile: C:\Users\DonaldMacDonald\Desktop\ome\build.xml
> 
> check-ivy:
> :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/ ::
> :: loading settings :: file = C:\Users\DonaldMacDonald\Desktop\ome\etc\ivysettin
> gs.xml
> 
> build-cpp:
> Entering C:\Users\DonaldMacDonald\Desktop\ome\components\tools\OmeroCpp...
> 
> build:
> Building with ICE_HOME=c:\ice-3.3.1
> Debug setting: True (debug)
> 64-Bit build: False (detect)
> Ice/Ice.h not found
> 
> BUILD FAILED
> C:\Users\DonaldMacDonald\Desktop\ome\build.xml:174: The following error occurred
> while executing this line:
> C:\Users\DonaldMacDonald\Desktop\ome\components\antlib\resources\global.xml:110:
> The following error occurred while executing this line:
> C:\Users\DonaldMacDonald\Desktop\ome\components\tools\OmeroCpp\build.xml:23: The
> following error occurred while executing this line:
> C:\Users\DonaldMacDonald\Desktop\ome\components\antlib\resources\global.xml:234:
> exec returned: 1
> 
> Total time: 7 seconds
> 
> C:\Users\DonaldMacDonald\Desktop\ome>
> 
> I have modified the paths using the property manager setting the paths in the win32 user var.
> 
> The original is unfortunately down for maintenance.
> 
> The modified code I added to the vs.py is:
> 
>    VisualStudio('10.0',
>    sdk_version='6.1',
>    hkey_root=r'Software\Microsoft\​VisualStudio\10.0',
>    batch_file='vcvarsall.bat',
>    vc_product_dir_key=r'Setup\VC\ProductDir',
>    common_tools_var='VS​100COMNTOOLS',
>    batch_file_dir_reg_relpath=None,
>    batch_file_dir_env_relpath=r'..\..\VC',
>    executable_path=r'Co​mmon7\IDE\devenv.c​om',
>    batch_file_path=r'Co​mmon7\Tools\vsvars​32.bat',
>    default_dirname='Microsoft Visual Studio 10',
>    supported_arch=['x86', 'amd64'],
>    ),
> 
> This is based on the VS 9.0:
> 
> VisualStudio('9.0',
>                 hkey_root=r'Software\Microsoft\VisualStudio\9.0',
>                 common_tools_var='VS90COMNTOOLS',
>                 batch_file='vcvarsall.bat',
>                 vc_product_dir_key=r'Setup\VC\ProductDir',
>                 batch_file_dir_reg_relpath=None,
>                 batch_file_dir_env_relpath=r'..\..\VC',
>                 executable_path=r'..\Common7\IDE\devenv.com',
>                 default_dirname='Microsoft Visual Studio 9',
>                 supported_arch=['x86', 'amd64'],
>    ),
> 
> I guess the above settings are incorrect.
> 
> Regards
> 
> D.
> 
> -----Original Message-----
> From: Josh Moore [mailto:josh at glencoesoftware.com]
> Sent: 29 August 2011 19:37
> To: Donald MacDonald
> Cc: ome-devel Development
> Subject: Re: [ome-devel] Building OMERO-CPP bindings on Windows
> 
> 
> On Aug 29, 2011, at 4:36 PM, Donald MacDonald wrote:
> 
>> Hi Josh,
>> 
>> I've update the SCon- vs.py file, there is also an install issue with SCons on windows which requires moving the SCons directory up one level.
> 
> Did you update it in your SCons or the one under OMERO_HOME/target? Only the one under target will be used.
> 
>> I've also added the Ice.h files into the VC environment. But I still seem to get the same error:
>> 
>> c:\Users\DonaldMacDonald\Desktop\ome>"c:\Program Files\Microsoft
>> Visual Studio 1 0.0\VC\vcvarsall.bat"
>> Setting environment for using Microsoft Visual Studio 2010 x86 tools.
>> 
>> c:\Users\DonaldMacDonald\Desktop\ome>python build.py build-cpp
>> Buildfile: c:\Users\DonaldMacDonald\Desktop\ome\build.xml
>> 
>> check-ivy:
>> :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/ ::
>> :: loading settings :: file =
>> c:\Users\DonaldMacDonald\Desktop\ome\etc\ivysettin
>> gs.xml
>> 
>> build-cpp:
>> Entering c:\Users\DonaldMacDonald\Desktop\ome\components\tools\OmeroCpp...
>> 
>> build:
>> Building with ICE_HOME=c:\ice-3.3.1
>> Debug setting: True (debug)
>> 64-Bit build: False (detect)
>> AttributeError: OmeroEnvironment instance has no attribute 'MSVSProject':
>> File
>> "C:\Users\DonaldMacDonald\Desktop\ome\components\tools\OmeroCpp\SConst
>> ruc
>> t", line 147:
>>   msproj = env.MSVSProject(target = 'omero_client' +
>> env['MSVSPROJECTSUFFIX'],
>> 
>> 
>> BUILD FAILED
>> c:\Users\DonaldMacDonald\Desktop\ome\build.xml:174: The following
>> error occurred while executing this line:
>> c:\Users\DonaldMacDonald\Desktop\ome\components\antlib\resources\global.xml:110:
>> The following error occurred while executing this line:
>> c:\Users\DonaldMacDonald\Desktop\ome\components\tools\OmeroCpp\build.x
>> ml:23: The following error occurred while executing this line:
>> c:\Users\DonaldMacDonald\Desktop\ome\components\antlib\resources\global.xml:234:
>> exec returned: 2
>> 
>> Total time: 10 seconds
>> 
>> c:\Users\DonaldMacDonald\Desktop\ome>
>> 
>> Not sure what else I can do, This seems to be still a SCons problem, I
>> cannot seem to find Where the var is to coming from.
> 
> Which var?
> 
>> Also when executing SConstruct on the omero-cpp build I have issues
>> with which/WhichError not Existing. Not sure this is related, I've
>> found a which module but I'm stuggling finding any Ref to whichError.
> 
> WhichError is defined here: http://git.openmicroscopy.org/?p=ome.git;a=blob;f=components/tools/OmeroPy/src/which.py;h=8dd790518ace40b032ebd13320d40efeb1cf84cc;hb=HEAD#l80
> 
> Where are you seeing this error?
> 
> 
> Cheers,
> ~J.
> 
>> Regards
>> D.
>> 
>> 
>> -----Original Message-----
>> From: Donald MacDonald
>> Sent: 29 August 2011 10:13
>> To: 'Josh Moore'
>> Cc: ome-devel Development
>> Subject: RE: [ome-devel] Building OMERO-CPP bindings on Windows
>> 
>> Hi Josh,
>> 
>> Ah, ok, that's great. I can try that. I'm trying to work against the
>> VC 8.0 build of Ice. I, probably mistakenly, am assuming that VS10 is
>> backwards compatible. If it still fails I can try and build ICE against Visual Studio 10.
>> 
>> Thanks
>> 
>> D.
>> 
>> 
>> -----Original Message-----
>> From: Josh Moore [mailto:josh at glencoesoftware.com]
>> Sent: 26 August 2011 18:53
>> To: Donald MacDonald
>> Cc: ome-devel Development
>> Subject: Re: [ome-devel] Building OMERO-CPP bindings on Windows
>> 
>> Hi Donald,
>> 
>> Looking at the changelog (http://www.scons.org/CHANGES-2.1.txt) it looks like VS 2010 support is in the works:
>> 
>> RELEASE 2.1.0.alpha.20101125 - Mon, 25 Nov 2010 13:31:44 -0700  ...
>> From William Deegan:
>> 
>>   - Add initial support for VS/VC 2010 (express and non-express
>> versions)
>> 
>> If you want to try out the change, you could start with SCons 2.0 or 2.1 and apply the changes here:
>> 
>> 
>> http://scons.tigris.org/ds/viewMessage.do?dsForumId=1272&dsMessageId=2
>> 632386
>> 
>> but apparently SCons 1.x and 2.x are sufficiently different that this may be a non-starter. For OMERO 4.4 I'll look into upgrading OMERO's SCons to make this easier:
>> 
>> https://trac.openmicroscopy.org.uk/ome/ticket/6600
>> 
>> At the same time, there's a question of whether the compile would even work. Which Ice version are you using? Did you compile your own with VS 2010?
>> 
>> Cheers,
>> ~Josh.
>> 
>> 
>> On Aug 26, 2011, at 6:09 PM, Donald MacDonald wrote:
>> 
>>> Hi Josh,
>>> 
>>> Ok, I messed up with the last message as I'd forgotten to run the vcvarsall.bat on that run my normal message is:
>> ...
>>> AttributeError: OmeroEnvironment instance has no attribute 'MSVSProject':
>>> File
>>> "C:\Users\DonaldMacDonald\Desktop\ome\components\tools\OmeroCpp\SCons
>>> t
>>> ruc
>>> t", line 147:
>>>  msproj = env.MSVSProject(target = 'omero_client' +
>>> env['MSVSPROJECTSUFFIX'],
>> ....
>>> Which seems to match what your thinking about the scons update, I'm running VS 10.
>> ...
>>> 
>>> Though looking at the scons it seems to only support VS 9.0
>>> 
>>> Regards
>>> 
>>> D.
>>> 
>>> 
>>> 
>>> -----Original Message-----
>>> From: Josh Moore [mailto:josh at glencoesoftware.com]
>>> Sent: 26 August 2011 16:03
>>> To: Donald MacDonald
>>> Cc: ome-devel at lists.openmicroscopy.org.uk
>>> Subject: Re: [ome-devel] Building OMERO-CPP bindings on Windows
>>> 
>>> Hi Donald!
>>> 
>>> Can you look in the config.log file under OmeroCpp? It should show you just went wrong with header detection. If it's still not clear, send config.log along with compiler.log and scons.log so we can try to figure things out. Info on which compiler you're using and how it's installed / initialized would also be helpful. The initialization we do in docs\hudson\OMERO-cpp.bat is:
>>> 
>>> call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
>>> x86  if errorlevel 1 exit /b 1
>>> 
>>> but I don't know how that translates to VS versions on Win7. There's even an outside chance that we'll need to upgrade the SCons versions to have Win7 completely supported.
>>> 
>>> Cheers,
>>> ~Josh.
>>> 
>>> On Aug 26, 2011, at 4:49 PM, Donald MacDonald wrote:
>>> 
>>>> Hi all,
>>>> 
>>>> I'm trying to build the OMERO-CPP bindings on windows 7, I've got
>>>> the rest of the server running but I'm unable to build the C++
>>>> bindings
>>>> 
>>>> C:\Users\DonaldMacDonald\Desktop\ome>python build.py build-cpp
>>>> Buildfile: C:\Users\DonaldMacDonald\Desktop\ome\build.xml
>>>> 
>>>> check-ivy:
>>>> :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/ ::
>>>> :: loading settings :: file =
>>>> C:\Users\DonaldMacDonald\Desktop\ome\etc\ivysettin
>>>> gs.xml
>>>> 
>>>> build-cpp:
>>>> Entering C:\Users\DonaldMacDonald\Desktop\ome\components\tools\OmeroCpp...
>>>> 
>>>> build:
>>>> Building with ICE_HOME=C:\Ice-3.3.1
>>>> Debug setting: True (debug)
>>>> 64-Bit build: False (detect)
>>>> Ice/Ice.h not found
>>>> 
>>>> BUILD FAILED
>>>> C:\Users\DonaldMacDonald\Desktop\ome\build.xml:174: The following
>>>> error occurred while executing this line:
>>>> C:\Users\DonaldMacDonald\Desktop\ome\components\antlib\resources\global.xml:110:
>>>> The following error occurred while executing this line:
>>>> C:\Users\DonaldMacDonald\Desktop\ome\components\tools\OmeroCpp\build.
>>>> x
>>>> ml:23: The following error occurred while executing this line:
>>>> C:\Users\DonaldMacDonald\Desktop\ome\components\antlib\resources\global.xml:234:
>>>> exec returned: 1
>>>> 
>>>> Total time: 5 seconds
>>>> 
>>>> C:\Users\DonaldMacDonald\Desktop\ome>
>>>> 
>>>> I've install scons, I've tried moving the include files around, is there something I've missed?
>>>> 
>>>> Regards
>>>> 
>>>> Donald
>> 
>> This email has been sent from Aridhia Informatics Ltd a company
>> registered in Scotland number SC324508 and having its registered
>> office at 19 Blythswood Square, Glasgow, G2 4BG. The information in
>> this email is confidential and may be legally privileged. It is
>> intended solely for the addressee. Access to this email by anyone else
>> is unauthorised. If you are not the intended recipient, any
>> disclosure, copying, distribution or any action taken or omitted to be
>> taken in reliance on it, is prohibited and may be unlawful. When
>> addressed to our clients any opinions or advice contained in this
>> email are subject to the terms and conditions expressed in any
>> governing Aridhia Informatics Ltd client agreement. Whilst all
>> reasonable care has been taken to avoid the transmission of viruses,
>> it is the responsibility of the recipient to ensure the onward
>> transmission, opening or use of this message and any attachments will
>> not adversely affect its systems or data. No responsibility is accep
>> ted by Aridhia Informatics Ltd in this regard and the recipient should
>> carry out such virus and other checks as it considers appropriate. You
>> can contact us at info at aridhia.com
>> _______________________________________________
>> ome-devel mailing list
>> ome-devel at lists.openmicroscopy.org.uk
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
> 
> This email has been sent from Aridhia Informatics Ltd a company registered in Scotland number SC324508 and having its registered office at 19 Blythswood Square, Glasgow, G2 4BG. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this email are subject to the terms and conditions expressed in any governing Aridhia Informatics Ltd client agreement. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by Aridhia Informatics Ltd in this regard and the recipient should carry out such virus and other checks as it considers appropriate. You can contact us at info at aridhia.com
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel



More information about the ome-devel mailing list