Skip to content

Missing Cmake configuration leads to library version mismatch #39

@MarcoRuzzon

Description

@MarcoRuzzon

After changing the XbotInterface binaries the following error appeared after running forest grow xbot2:

[  2%] Built target xbot2_memory_hooks
make[2]: *** No rule to make target '/opt/xbot/lib/libXBotInterface.so.2.0.1', needed by 'libxbot2.so.2.2'.  Stop.
CMakeFiles/Makefile2:136: recipe for target 'CMakeFiles/xbot2.dir/all' failed
make[1]: *** [CMakeFiles/xbot2.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

I think a call to cmake is missing in this case.
The CmakeBuilder in build_hanlder.py (lines 202-212) does not perform configuration at each build.

# configure
if not cmake.is_configured() or reconfigure:
    # set install prefix and build type (only on first or forced configuration)
    cmake_args = list()
    cmake_args.append(f'-DCMAKE_INSTALL_PREFIX={installdir}')
    cmake_args.append(f'-DCMAKE_BUILD_TYPE={buildtype}')
    cmake_args += self.cmake_args  # note: flags from recipes as last entries to allow override

    self.pprint('running cmake...')
    if not cmake.configure(args=cmake_args):
        self.pprint('configuring failed')
        return False

It just allows performing a forced reconfiguration (using cmd line's and recipes' arguments).
What about always running a configuration and changing the arguments in case a reconfiguration is required?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions