Giter VIP home page Giter VIP logo

Comments (9)

kwabenantim avatar kwabenantim commented on September 24, 2024
CMake Error at cmake/Modules/ChasteMacros.cmake:321 (add_library):
  Target "chaste_project_PyChaste" links to target "Freetype::Freetype" but
  the target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  cmake/Modules/ChasteMacros.cmake:411 (Chaste_DO_COMMON)
  projects/PyChaste/CMakeLists.txt:65 (chaste_do_project)


CMake Error at cmake/Modules/ChasteMacros.cmake:321 (add_library):
  Target "chaste_project_PyChaste" links to target "X11::X11" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  cmake/Modules/ChasteMacros.cmake:411 (Chaste_DO_COMMON)
  projects/PyChaste/CMakeLists.txt:65 (chaste_do_project)


CMake Error at cmake/Modules/ChasteMacros.cmake:321 (add_library):
  Target "chaste_project_PyChaste" links to target "GLEW::GLEW" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  cmake/Modules/ChasteMacros.cmake:411 (Chaste_DO_COMMON)
  projects/PyChaste/CMakeLists.txt:65 (chaste_do_project)


CMake Error at cmake/Modules/ChasteMacros.cmake:321 (add_library):
  Target "chaste_project_PyChaste" links to target "X11::X11" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  cmake/Modules/ChasteMacros.cmake:411 (Chaste_DO_COMMON)
  projects/PyChaste/CMakeLists.txt:65 (chaste_do_project)


CMake Error at cmake/Modules/ChasteMacros.cmake:321 (add_library):
  Target "chaste_project_PyChaste" links to target "Python3::Module" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  cmake/Modules/ChasteMacros.cmake:411 (Chaste_DO_COMMON)
  projects/PyChaste/CMakeLists.txt:65 (chaste_do_project)

from pychaste.

kwabenantim avatar kwabenantim commented on September 24, 2024

Steps to reproduce the CMake configuration errors:

git clone https://github.com/Chaste/Chaste.git

cd Chaste/projects
git clone --recursive https://github.com/PyChaste/PyChaste.git
cd ..

conda create -n vtk9-env
conda activate vtk9-env
mamba install -c conda-forge -c pychaste boost-cpp hdf5="*=*mpi_mpich*" metis mpich parmetis petsc petsc4py sundials vtk=9 tbb-devel xerces-c xsd xvfbwrapper xorg-libxext six notebook

mkdir build
cd build
export PETSC_DIR=$CONDA_PREFIX
export HDF5_ROOT=$CONDA_PREFIX

cmake \
  -DCMAKE_BUILD_TYPE=Release \
  -DPython3_EXECUTABLE=$(which python) \
  -DCMAKE_LIBRARY_PATH="${CONDA_PREFIX}/lib" \
  -DCMAKE_PREFIX_PATH="${CONDA_PREFIX}" \
  -DCMAKE_INSTALL_PREFIX="${CONDA_PREFIX}" \
  -DBUILD_SHARED_LIBS=ON \
  -DBOOST_ROOT="${CONDA_PREFIX}" \
  -DHDF5_C_COMPILER_EXECUTABLE="${CONDA_PREFIX}/bin/h5pcc" \
  -DVTK_DIR=${CONDA_PREFIX} \
  -DXERCESC_INCLUDE="${CONDA_PREFIX}/include" \
  -DXERCESC_LIBRARY="${CONDA_PREFIX}/lib/libxerces-c.so" \
  -DXSD_EXECUTABLE="${CONDA_PREFIX}/bin/xsd" \
  ..

from pychaste.

kwabenantim avatar kwabenantim commented on September 24, 2024

@fcooper8472 suggests investigating fixes like those done in https://github.com/Chaste/Chaste/pull/152/files

from pychaste.

kwabenantim avatar kwabenantim commented on September 24, 2024

There's now a github action testing this: https://github.com/Chaste/PyChaste/actions/runs/9082771049/job/24959931938

from pychaste.

kwabenantim avatar kwabenantim commented on September 24, 2024

CMake errors are from additional VTK components:

RenderingFreeType # needs Freetype::Freetype
RenderingOpenGL2 # needs X11::X11 and GLEW::GLEW
WrappingPythonCore # needs Python3::Module

from pychaste.

kwabenantim avatar kwabenantim commented on September 24, 2024

The errors seem to go away when the extra package modules are searched for directly in Chaste. Possibly subsequent calls to find_package() don't (can't?) add the extra targets correctly?

---find_package(Python3 3.5 )
+++find_package(Python3 3.5 REQUIRED COMPONENTS Interpreter Development)
find_package(
    VTK COMPONENTS CommonCore CommonDataModel FiltersCore FiltersGeneral FiltersGeneric FiltersGeometry
---    FiltersModeling FiltersSources IOCore IOGeometry IOLegacy IOParallelXML IOXML REQUIRED
+++    FiltersModeling FiltersSources IOCore IOGeometry IOLegacy IOParallelXML IOXML
+++    FiltersProgrammable FiltersVerdict InteractionStyle IOImage IOMovie RenderingAnnotation RenderingCore
+++    RenderingFreeType RenderingOpenGL2 WrappingPythonCore  REQUIRED
        )

from pychaste.

kwabenantim avatar kwabenantim commented on September 24, 2024

It still works when find_package() is called twice from Chaste to add extra components. Possibly a scope issue? The targets from the first find_package() call seem to disappear after the second call, however.

from pychaste.

kwabenantim avatar kwabenantim commented on September 24, 2024

PyChaste works with VTK9 but needs the cmake find package call to be done above the project scope. This will be done directly in the PyChaste merge into Chaste trunk: Chaste/Chaste#273

from pychaste.

kwabenantim avatar kwabenantim commented on September 24, 2024

This is now fixed as of Chaste/Chaste@a51678b

from pychaste.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.