Overslaan naar inhoud
CTech Digital
  • Startpagina
  • Odoo services
  • AI services
  • Contact
  • 0
  • Nederlands (BE) English (UK) Français
CTech Digital
  • 0
    • Startpagina
    • Odoo services
    • AI services
    • Contact
  • Nederlands (BE) English (UK) Français

Updating CMake version on Linux

LINUX
  • Alle blogs
  • Daily blog
  • Updating CMake version on Linux
  • 30 juni 2025 in
    CTech Metrology, Luc Wens

    Updating CMake version on Linux


    I got an error that version 3.22 does not support remote debugging on WSL, so Cmake needed to be updated on WSL.

    sudo apt-get remove cmake
    [sudo] password for LucWens:
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
      cmake-data dh-elpa-helper emacsen-common libarchive13 libjsoncpp25 librhash0
    Use 'sudo apt autoremove' to remove them.
    The following packages will be REMOVED:
      cmake
    0 upgraded, 0 newly installed, 1 to remove and 91 not upgraded.
    After this operation, 21.2 MB disk space will be freed.
    Do you want to continue? [Y/n] Y
    (Reading database ... 72649 files and directories currently installed.)
    Removing cmake (3.22.1-1ubuntu1.22.04.2) ...
    Processing triggers for man-db (2.10.2-1) ...
    LucWens@DELL:/mnt/c/Xenomatix5GAlert$ wget https://github.com/Kitware/CMake/releases/download/v3.29.3/cmake-3.29.3-linux-x86_64.sh
    --2025-06-30 08:24:17--  https://github.com/Kitware/CMake/releases/download/v3.29.3/cmake-3.29.3-linux-x86_64.sh
    Resolving github.com (github.com)... 140.82.121.3
    Connecting to github.com (github.com)|140.82.121.3|:443... connected.
    HTTP request sent, awaiting response... 302 Found
    Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/537699/b73482c5-23ed-407c-a9a5-9357de5283b9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20250630%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250630T062416Z&X-Amz-Expires=1800&X-Amz-Signature=672c06f2fbb781f1ce2fdf5fcedfc7f4ac9300e96df8daff15bdc25ac373453f&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dcmake-3.29.3-linux-x86_64.sh&response-content-type=application%2Foctet-stream [following]
    --2025-06-30 08:24:17--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/537699/b73482c5-23ed-407c-a9a5-9357de5283b9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20250630%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250630T062416Z&X-Amz-Expires=1800&X-Amz-Signature=672c06f2fbb781f1ce2fdf5fcedfc7f4ac9300e96df8daff15bdc25ac373453f&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dcmake-3.29.3-linux-x86_64.sh&response-content-type=application%2Foctet-stream
    Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.111.133, 185.199.108.133, ...
    Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 53246492 (51M) [application/octet-stream]
    Saving to: ‘cmake-3.29.3-linux-x86_64.sh’

    cmake-3.29.3-linux-x86_64.sh                   100%[====================================================================================================>]  50.78M  9.07MB/s    in 6.6s

    2025-06-30 08:24:24 (7.75 MB/s) - ‘cmake-3.29.3-linux-x86_64.sh’ saved [53246492/53246492]

    chmod +x cmake-3.29.3-linux-x86_64.sh
    ./cmake-3.29.3-linux-x86_64.sh --prefix=/usr/local --exclude-subdir
    CMake Installer Version: 3.29.3, Copyright (c) Kitware
    This is a self-extracting archive.
    The archive will be extracted to: /usr/local

    Using target directory: /usr/local
    Extracting, please wait...

    Unpacking finished successfully
    LucWens@DELL:/mnt/c/Xenomatix5GAlert$ cmake --version
    -bash: /usr/bin/cmake: No such file or directory
    LucWens@DELL:/mnt/c/Xenomatix5GAlert$ # Make the installer executable
    3.29.3-linux-x86LucWens@DELL:/mnt/c/Xenomatix5GAlert$
    LucWens@DELL:/mnt/c/Xenomatix5GAlert$ chmod +x cmake-3.29.3-linux-x86_64.sh
    the installer. It will ask you to accept the license.

    # The --prefix=/usr/local option installs it for all users in a standard location.

    sudo ./cmake-3.29.3-linux-x86_64.sh --prefix=/usr/local --exclude-subdirLucWens@DELL:/mnt/c/Xenomatix5GAlert$
    LucWens@DELL:/mnt/c/Xenomatix5GAlert$
    LucWens@DELL:/mnt/c/Xenomatix5GAlert$
    LucWens@DELL:/mnt/c/Xenomatix5GAlert$ # Run the installer. It will ask you to accept the license.
    LucWens@DELL:/mnt/c/Xenomatix5GAlert$
    LucWens@DELL:/mnt/c/Xenomatix5GAlert$ # The --prefix=/usr/local option installs it for all users in a standard location.
    LucWens@DELL:/mnt/c/Xenomatix5GAlert$
    LucWens@DELL:/mnt/c/Xenomatix5GAlert$ sudo ./cmake-3.29.3-linux-x86_64.sh --prefix=/usr/local --exclude-subdir
    CMake Installer Version: 3.29.3, Copyright (c) Kitware
    This is a self-extracting archive.
    The archive will be extracted to: /usr/local

    Using target directory: /usr/local
    Extracting, please wait...

    Unpacking finished successfully
    LucWens@DELL:/mnt/c/Xenomatix5GAlert$ hash -r
    LucWens@DELL:/mnt/c/Xenomatix5GAlert$ cmake --version
    cmake version 3.29.3

    CMake suite maintained and supported by Kitware (kitware.com/cmake).
    LucWens@DELL:/mnt/c/Xenomatix5GAlert$

    After that I got a permission error when deleting the protobuf directories. Suggestion here would be to move the complete code into WSL and build it there, but let's not bother and wait until we have the Nano and do it there.

    BUT now my windows side does not compile anymore because it can't find headers that were added with vcpkg.

    I cloned the project from scratch, thinking it might have been WSL that has fucked up some folders.


    Some mermaid charts

    Class structure

    ---

    config:

      theme: neutral

      look: classic

    ---

    classDiagram

        class ISource {

            <<interface>>

            +Init() bool

            +Subscribe(callback)

            +Stop()

        }

        class ISink {

            <<interface>>

            +Init() bool

            +Send(frame)

            +Stop()

        }

        class IProcessor {

            <<interface>>

            +Init() bool

            +OnNewFrame(frame)

            +Stop()

            +AddSink(sink)

        }


        class SimulationSource {

            -simulationFileName : string

            +Init() bool

            +Run()

            +Stop()

        }


        class OusterDetect {

            -host : string

            -port : uint16_t

            +Init() bool

            +Subscribe(callback)

            +Stop()

        }


        class Simulation5GAlertProcessor {

            +Init() bool

            +OnNewFrame(frame)

            +Stop()

        }


        class CitsWebSocketClient {

            -host : string

            -apiPath : string

            -port : string

            -message : string

            +Init() bool

            +Send(frame)

            +Stop()

        }


        class ThreadSafeQueue {

            +Push(value)

            +Pop() optional<T>

            +Stop()

        }


        ISource <|-- SimulationSource

        ISource <|-- OusterDetect

        ISink <|-- CitsWebSocketClient

        IProcessor <|-- Simulation5GAlertProcessor

        ThreadSafeQueue <|-- TrackingSequence

        SimulationSource o-- TrackingSequence : has a




    Sequence Diagram

    sequenceDiagram
        participant Source as SimulationSource/OusterDetect
        participant Processor as Simulation5GAlertProcessor
        participant Sink as CitsWebSocketClient

        Source->>Processor: Notify New TrackingFrame
        Processor->>Processor: OnNewFrame(TrackingFrame)
        Processor->>Sink: Send(Processed Frame)
        Sink->>Sink: Convert & Send over WebSocket


    Data Flow

    flowchart TD
        Start([Start Program]) --> CheckArg{Simulation File Provided?}

        CheckArg -- Yes --> SimSource[Use SimulationSource]
        CheckArg -- No --> OusterSource[Use OusterDetect Lidar]

        SimSource --> Processor[Simulation5GAlertProcessor]
        OusterSource --> Processor

        Processor --> Sink[CitsWebSocketClient]

        Sink --> RunIOContext[Run io_context thread]

        RunIOContext --> WaitForExit[Wait for 'q' Pressed]

        WaitForExit --> StopProcessor[Stop Processor]
        StopProcessor --> StopIOContext[Stop io_context]

        StopIOContext --> JoinThreads[Join Threads & Cleanup]

        JoinThreads --> End([End Program])

    Data structure

    classDiagram
        %% Constants %%
        class Constants {
          <<constant>>
          pedestrianClassificationString : PERSON
          bicycleClassificationString : TWO_WHEELER
          vehicleClassificationString : VEHICLE
          largeVehicleClassificationString : LARGE_VEHICLE
        }

        %% Data Structures %%
        class Dimensions {
            height : double
            length : double
            width  : double
        }

        class Coordinates {
            x : double
            y : double
            z : double
        }

        class Orientation {
            qw : double
            qx : double
            qy : double
            qz : double
        }

        class Object {
            id : int
            uuid : string
            classification : string
            classificationConfidence : double
            creationTUsec : int64_t
            frameCount : int
            updateTUsec : int64_t
            numPoints : int
            positionM : Coordinates
            initialPositionM : Coordinates
            orientationQ : Orientation
            dimensionsM : Coordinates
            velocityMs : Coordinates
            headingDeg : double
            positionUncertaintyM : Coordinates
            velocityUncertaintyMs : Coordinates
        }

        class TrackingFrame {
            frameCount : int64_t
            timeStampUsec : int64_t
            objects : vector~Object~
        }

        class TrackingSequence {
            +TrackingSequence()
            +Save(filename : string) bool
            +Load(filename : string) bool
            +Empty() bool
            +GetNext(trackingFrame : TrackingFrame&, cycle : bool) bool
            -currentRecord : iterator~deque~TrackingFrame~~
        }

        %% Relationships %%
        Object o-- Coordinates
        Object o-- Orientation
        TrackingFrame o-- Object
        TrackingSequence --|> ThreadSafeQueue

    Back to TOML

    For the future we could have the next architecture 

    • Use DLL plug-in's for the sinks
    • Have TOML sections for the settings of the sinks
    • Multiple sinks can be specified

    For the source side we would have 3 possibilities

    • Simulation, as done now for most of the time
    • Scan a folder specified by TOML
    • Include the model directly using torch script



    in Daily blog
    # Xenomatix
    Getting xeno alert 5G back going
    Copyright © CTech
    Nederlands (BE) | English (UK) | Français
    Aangeboden door Odoo - De #1 Open source e-commerce