Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

test-external-module

Minimal out-of-tree EVerest module project used to demonstrate a regression in EVerest PR #2678 (feat/increase_compile_cache_perf): the new everest::project_info static library that every generated C++ module links against (and whose header the ev-cli ≥ 0.8.1 ld-ev.cpp template includes) is neither exported nor installed, so out-of-tree modules built against an installed everest-core (non-EDM mode, as used by yocto) no longer build.

The project contains a single, mostly empty module TestExternalModule (provides the empty interface), generated with ev-cli module create.

Branches

  • everest-main — build against an everest-core dist installed from main with ev-cli 0.8.0: works.

  • everest-pr-2678 — build against a dist installed from the PR branch with ev-cli 0.8.1 (the version the PR's bootstrap requires): fails:

    CMake Error at .../lib64/cmake/everest-core/everest-generate.cmake:685 (target_link_libraries):
      Target "TestExternalModule" links to:
    
        everest::project_info
    
      but the target was not found.
    

    Even with a stub target the build would still fail, because the generated ld-ev.cpp includes <everest/project_info.hpp>, which is not installed either.

Reproduction

1. Build and install everest-core (non-EDM / yocto-style)

From the everest-core checkout (once for main, once for the PR branch):

cmake -S . -B build -G Ninja \
    -DCMAKE_BUILD_TYPE=Debug \
    -DCMAKE_CXX_STANDARD=17 \
    -DCMAKE_INSTALL_PREFIX=<dist> \
    -DCMAKE_PREFIX_PATH=<sysdeps> \
    -DDISABLE_EDM=ON \
    -DEVEREST_INCLUDE_MODULES=NoSuchModule \
    -DEVEREST_ENABLE_PY_SUPPORT=OFF \
    -DISO15118_2_GENERATE_AND_INSTALL_CERTIFICATES=OFF \
    -DEVEREST_DEPENDENCY_ENABLED_LIBOCPP=ON \
    -DEVEREST_DEPENDENCY_ENABLED_LIBEVSE_SECURITY=ON \
    -DFRAMEWORK_INSTALL=ON -DLOG_INSTALL=ON -DOCPP_INSTALL=ON \
    -DEVEREST_SQLITE_INSTALL=ON -DTIMER_INSTALL=ON \
    -DEVSE_SECURITY_INSTALL=ON -DTLS_INSTALL=ON \
    -Deverest-core_USE_PYTHON_VENV=OFF
cmake --build build --target install

<sysdeps> is a prefix providing the third-party dependencies that yocto recipes normally provide natively: nlohmann_json, nlohmann_json_schema_validator, date, fmt, ryml, libwebsockets, mosquitto, mqttc, sigslot, pugixml, sdbus-c++ (plus system boost, openssl, curl, sqlite3, libevent). EVEREST_DEPENDENCY_ENABLED_LIBOCPP/LIBEVSE_SECURITY=ON is needed because the installed everest-core-config.cmake unconditionally requires those packages. An ev-cli matching the checkout's required version must be on PATH (0.8.0 for main, 0.8.1 for the PR branch).

2. Build this project against the install

cmake -S . -B build -G Ninja \
    -DCMAKE_BUILD_TYPE=Debug \
    -DCMAKE_CXX_STANDARD=17 \
    -DCMAKE_PREFIX_PATH="<dist>;<sysdeps>" \
    -DEVEREST_CMAKE_PATH=<everest-cmake checkout> \
    -Dtest-external-module_USE_PYTHON_VENV=OFF
cmake --build build

Pre-existing packaging issues (hit both legs equally)

Getting find_package(everest-core) to work at all required workarounds for bugs unrelated to the PR — see the NOTE in CMakeLists.txt:

  1. everest-core-config.cmake includes everest-core-targets.cmake before finding everest-framework/everest-ocpp, whose targets the export references — the consumer has to pre-find the whole package chain in dependency order.
  2. Several per-library configs are missing find_dependency() declarations (e.g. everest-evse_security does not find everest-log/everest-timer).
  3. everest::io, everest::util and everest::yaml are exported both into their own packages and into everest-core-targets, which makes that export unloadable ("Some (but not all) targets in this export set were already defined") — the guard in the installed everest-core-targets.cmake had to be neutralized for this test.
  4. everest-timer-config.cmake requires Boost COMPONENTS system, which is header-only since Boost 1.69 and has no CMake package on current distros — stubbed with an INTERFACE boost_system-config.cmake.

About

Out-of-tree EVerest module reproducing the missing everest::project_info regression of EVerest PR #2678

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages