Task #12141 (closed)
Opened 10 years ago
Closed 10 years ago
Bug: OmeroCpp examples in examples/ are not generally buildable
Reported by: | rleigh | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | Unscheduled |
Component: | OmeroCpp | Version: | 5.0.0 |
Keywords: | n.a. | Cc: | |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | n.a. |
Description
Similarly to components/tools/OmeroCpp before it was fixed, the examples are not buildable due to hardcoded assumptions about the environment.
https://www.openmicroscopy.org/community/viewtopic.php?f=6&t=7454&start=10
The above is an example of a Windows build failure, the cause of which I'm not entirely certain of, but it's also not working for me on Linux/MacOS for other reasons.
I've spotted at least two issues immediately:
1) ICE_HOME support is broken.
-# Support for ICE_HOME
-if os.environ.has_key("ICE_HOME"):
- ice_home = os.environICE_HOME?
- env.AppendUnique?( CPPPATH = [os.path.join(ice_home, "include")] )
- env.AppendUnique?( LIBPATH = [os.path.join(ice_home, "lib" )] )
-
Remove entirely. This is being set unconditionally, and the compiler can abort if these locations don't exist. We already did these checks in blitz_tools (though even here we don't do it entirely correctly--we need to check for existence of the full path here as well). These should only ever be set if the path exists.
2) The library search path doesn't include the path containing libomero_client.
It's not looking in components/tools/OmeroCpp; and while it searches in places under dist, it hasn't been copied here.
These are not built by the CI system either, so aren't being built daily like the rest of the OmeroCpp code.
My cmake branch is still available, and can be trivially extended to include the examples, and this will fix all the issues here.
Change History (1)
comment:1 Changed 10 years ago by rleigh
- Resolution set to fixed
- Status changed from new to closed
Fixed by cmake, which builds all examples.