openmicroscopy icon indicating copy to clipboard operation
openmicroscopy copied to clipboard

Build against Ice 3.7.0 fails

Open krf opened this issue 6 years ago • 1 comments

You have this in your root CMakeLists.txt:

# Find Ice programs, includes, slice definitions and libraries
find_package(Ice 3.5.0 REQUIRED COMPONENTS Ice IceUtil Glacier2)

Building openmicroscopy against Ice 3.7.0:

cd /hidden/build/OmeroCppProject-prefix/src/OmeroCppProject-build && /usr/local/Cellar/cmake/3.11.1/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/hidden/build/omerocpp-install -DCMAKE_CXX_STANDARD=14 -DCMAKE_POSITION_INDEPENDENT_CODE=on -DCMAKE_OSX_DEPLOYMENT_TARGET=10.10 -DCMAKE_EXE_LINKER_FLAGS= -Dtest=OFF -GNinja /hidden/build/OmeroCppProject-prefix/src/OmeroCppProject && /usr/local/Cellar/cmake/3.11.1/bin/cmake -E touch /hidden/build/OmeroCppProject-prefix/src/OmeroCppProject-stamp/OmeroCppProject-configure
-- Obtaining release version from source
-- Configuring openmicroscopy version 5.4.5
-- Using git commit 2937466 on 2018-03-27 09:33:15 +0100
-- Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) 
-- Using embedded GTest
-- Ice version: 3.7.0
-- Found the following Ice libraries:
--   Ice (required)
--   Glacier2 (required)
-- The following Ice libraries were not found:
--   IceUtil (required)
CMake Error at /usr/local/Cellar/cmake/3.11.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Failed to find all Ice components (missing: Ice_SLICE_DIR
  _Ice_REQUIRED_LIBS_FOUND) (found suitable version "3.7.0", minimum required
  is "3.5.0")
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.11.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  components/tools/OmeroCpp/cmake/FindIce.cmake:423 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:71 (find_package)

Problem: IceUtil was merged into Ice in 3.7.0 release, cf. https://doc.zeroc.com/display/Ice37/Upgrading+your+Application+from+Ice+3.6#UpgradingyourApplicationfromIce3.6-IceUtilLibraryRemoved

I'd suggest adding code like this to your root CMakeLists.txt:

find_package(Ice REQUIRED COMPONENTS Ice Glacier2)
# Starting with Ice 3.7.0, IceUtil got merged into Ice. For older versions, check if IceUtil is there (we need it)
# cf. https://doc.zeroc.com/display/Ice37/Upgrading+your+Application+from+Ice+3.6
if (Ice_FOUND AND Ice_VERSION VERSION_LESS 3.7.0)
    find_package(Ice REQUIRED COMPONENTS IceUtil)good!
endif()

krf avatar Apr 23 '18 19:04 krf

Hi Kevin, thanks for reporting this.

At the present time, this project hasn't yet been updated to work with Ice 3.7 at all, so even with the fix it's rather unlikely that it would build and/or run correctly. Updating the CMake logic would be part of that work. I will leave this ticket open so that it doesn't get forgotten when doing the Ice 3.7 upgrade.

rleigh-codelibre avatar Apr 24 '18 08:04 rleigh-codelibre