Skip to main content
AI
  • Get started with AI

    • Red Hat AI

      Accelerate the development and deployment of enterprise AI solutions.

    • AI learning hub

      Explore learning materials and tools, organized by task.

    • AI interactive demos

      Click through scenarios with Red Hat AI, including training LLMs and more.

    • AI/ML learning paths

      Expand your Red Hat OpenShift AI knowledge using these learning resources.

    • AI quickstarts

      Focused AI use cases designed for fast deployment on Red Hat AI platforms.

    • No-cost AI training

      Foundational Red Hat AI training.

  • Featured resources

    • Red Hat OpenShift AI
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

Red Hat AI Factory with NVIDIA

Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.

Learn
  • Self-guided

    • Documentation

      Find answers, get step-by-step guidance, and learn how to use Red Hat products.

    • Learning paths

      Explore curated walkthroughs for common development tasks.

    • Guided learning

      Receive custom learning paths powered by our AI assistant.

    • See all learning
  • Hands-on

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

    • Interactive labs

      Learn by doing in these hands-on, browser-based experiences.

    • Interactive demos

      Click through product features in these guided tours.

  • Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics
  • Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
Build
  • Get started

    • Red Hat build of Podman Desktop

      A downloadable, local development hub to experiment with our products and builds.

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

  • Download products

    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products
  • Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset
  • References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
Community
  • Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions
  • Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github
  • Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

Join the Red Hat Developer program

Download Red Hat products and project builds, access support documentation, learning content, and more.

ConsoleDocsSupport Search
New For you

Recommended

We'll recommend resources you may like as you browse. Try these suggestions for now.

  • Product downloads
  • Cheat sheets
  • Red Hat Developer learning portal
  • Developer blog
  • E-books
  • Developer Sandbox
Log in

Get more with a Red Hat Developer account

  • Product downloads
  • Console access
  • Event registration
  • Training & trials
Explore more account benefitsLog in or register

A subscription may be required for some services.

Contact us

The state of documentation for the GNU C library and kernel

What's up, docs?

September 13, 2024
DJ Delorie
Related topics:
C, C#, C++Developer productivityOpen sourceProgramming languages & frameworks
Related products:
Red Hat Enterprise Linux

    Probably the second most important asset to have when using a software library (the first being the library itself, of course) is documentation for how to use that library. In Ye Olde Days, the stature of a computing department would be indicated by how big their "wall of manuals" was. 

    I was going to insert a photo of such a wall here, but "picture of thing that existed before the Internet" is hard to find on the Internet. Here's a photo of a cute kitten instead, because finding those on the internet is easy (Figure 1).

    Photo of a kitten with gray stripes.
    Figure 1: Not a wall of manuals. Kitten photo courtesy of https://pixabay.com/photos/european-shorthair-cat-kitten-young-8107433/ and used in accordance with their license.

    Unfortunately, another thing that's easy to find on the Internet is misinformation, and documentation for software libraries is no exception. For new projects, the project's web site likely has the correct documentation for whatever version you have (assuming it has any documentation at all), or at least close enough. After a project has been around for a while, you have to dig a bit to find the documentation that corresponds to your version of the code—a search engine might give you documentation for the wrong version, or maybe someone's forked variant, or even another project that only resembles what you have. I won't even get started on opinions found in random forums or the garbage, er, "synthetically generated but not always correct information," AI can spit out that sounds official.

    It gets worse

    Now consider the core C library and OS interface, which have been around for decades. Do you know where the official documentation for those are? Hint: you're probably wrong. For the GNU C library, which is one of the core libraries of Fedora and Red Hat Enterprise Linux (RHEL), the authoritative documentation is the GNU C Library Manual. It's in the glibc-doc package on Fedora, and can be read with the info reader program. 

    Don't know what all those are? You're not alone. If you still remember how to get a command line prompt, type info libc. You can find a version online if you know where to look (for example, here if you're using an unmodified release of glibc), but keep in mind that version X.Y of glibc in RHEL is not the same as version X.Y of glibc in Fedora. 

    Also, because the license for the glibc manual is the GFDL instead of the GPL, some distributions (for example, Debian) don't include it at all, as there are parts of the GNU C Library Manual that no one is allowed to change. (Mostly copyright notices and attributions as per the GFDL, but including an entire appendix advocating for Free documentation, which can neither be removed nor altered.) This can sometimes discourage developers from updating the manual, if nobody is going to read it.

    What you probably thought was the documentation is "the man pages" (specifically, the Linux Man Pages Project) and while they do cover nearly all of the C API, they are not authoritative for the GNU C library (although recently specific versions have been adopted as "authoritative but secondary to the manual"). They are typically correct, but they're not part of glibc, so glibc can't guarantee you get the right versions. Sadly, there are things provided by the GNU C library that are only documented in the man pages! Again, though, the GFDL means that work can't be shared between the man pages and the glibc manual, because many of the man pages are GPL. 

    Frustrated yet? Let's also add the various standards that the C library must conform to; the most important is POSIX, which has its own documentation.

    But what about the kernel API? Surely the man pages are authoritative for the kernel, right? Well, if you look for the kernel's documentation, you mostly get documentation for the kernel internals. The system calls' documentation is mostly left to the man pages on an ad hoc basis. The man pages project has had at most two maintainers in its history, who sometimes have to chase developers down to get documentation for their changes.

    What's so hard about writing documentation?

    If you're asking yourself "what's so hard about writing documentation?", there is a secondary problem. The man pages are written in a very old language called roff. Never heard of it? Most people haven't. Ironically, roff is itself not well documented, nor are its modern extensions nroff and troff. GNU has its own roff interpreter called groff, which is documented in Texinfo.

    Texinfo is itself an old language, created by the GNU project for its documentation. The advantage of Texinfo is that it can produce many modern formats, like PDF, HTML, or plain text. The disadvantage of Texinfo is that it's not as popular outside the GNU project, so few know how to write docs with it. Neither of these formats are as popular as, say, the modern Markown format used by wikis.

    What can you do about it?

    If all this bothers you, well, I have some suggestions:

    • All the projects mentioned above welcome new volunteers, especially if you like writing documentation and learning new (er, old) languages. 

    • You could let the various docs maintainers know how much they're appreciated. 

    • Getting your company to allocate time or resources to help improve documentation would be fantastic. 

    Or you could look at the cute kitten some more.

    Related Posts

    • Multi-Thread, Async-Signal and Async-Cancel Safety Docs in GNU libc

    • Documentation as Code

    • Tools and practices for remote development teams

    • The Red Hat community commitment to open source

    • Red Hat joins the Backstage.io community

    • Accelerate glibc test development with the glibc-support repository

    Recent Posts

    • A day in the life of an NVIDIA H100 on Red Hat OpenShift 5

    • Migrate BuildConfigs to builds for Red Hat OpenShift with one plug-in install

    • Run Red Hat Enterprise Linux CoreOS on NVIDIA BlueField DPUs

    • Agent harness engineering: Separating model capabilities from enforcement

    • What's new for developers in Red Hat Enterprise Linux 10.3 and 9.9

    What’s up next?

    Learn how to onboard developers onto Red Hat Developer Hub so they can import and use relevant templates and run the application on the development environment.

    Start the activity
    Red Hat Developers logo

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    Red Hat Developer

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility
    Ask AI