Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build against Ice 3.7.0 fails #5741

Open
krf opened this issue Apr 23, 2018 · 1 comment
Open

Build against Ice 3.7.0 fails #5741

krf opened this issue Apr 23, 2018 · 1 comment

Comments

@krf
Copy link

krf commented Apr 23, 2018

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()
@rleigh-codelibre
Copy link
Contributor

rleigh-codelibre commented Apr 24, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants