ome / ome/openmicroscopy

Build against Ice 3.7.0 fails

Open
#5,741 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
222
Forks
105
Avg merge
2h 21m
Merged PRs (30d)
1

Description

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()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the root CMakeLists.txt entry at line 71 and read components/tools/OmeroCpp/cmake/FindIce.cmake around the reported failure. Configure the project with Ice 3.7.0 and an older Ice release to verify both dependency cases. Done means the CMake configuration succeeds with the supported Ice versions and the required libraries are found.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.