Skip to content

Adapt modules and unit tests to use C symbols instead of internal kernel C++ API #1186

@wkozaczuk

Description

@wkozaczuk

The commit af2d371 introduced the ability to build OSv kernel with most symbols but a subset of glibc hidden.
The regular Linux glibc apps should run fine on such kernel, but unfortunately many unit tests and various internal OSv apps (so-called modules) do not as they had been coded to use many internal C++ API symbols. In order to make those programs run on a kernel built with most symbols and standard C++ library hidden, we need to change them to either use suitable standard glibc symbols or expose some of the C++ API as C functions just like it was done for the httpserver-monitoring-api module (see 182499c and 891bfcd).
The relevant effort would be quite substantial and I doubt we will ever finish adapting all apps. So I am listing individual programs below in the order of importance:

  • libtools (both lsroute.cc and ifconfig.cc use BSD internal API); ideally we should try to change some standard Linux facility or possibly expose a pseudo-file under /proc
  • non-read-only part of httpserver-api
  • cloud-init
  • golang (wrapper to bootstrap go programs built as a shared library), uses only 2 C++ symbols
  • unit tests

I am on purpose not mentioning run-java and any java programs as I do think we have any appetite to touch this - please read this to understand why.

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