Skip to content

Build process is broken in Platform.cpp: sys/sysctl.h: No such file or directory with glibc 2.32.x #27

@FredBezies

Description

@FredBezies

I tried to build from git imagewriter, but build process is broken while processing Platform.cpp:

g++ -c -pipe -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fvisibility=hidden -fvisibility-inlines-hidden -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC -DUSEUDISKS2 -DAPP_VERSION=\"1.10\" -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I. -I. -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtDBus -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o Platform.o Platform.cpp
MainWindow.cpp:40:10: fatal error: sys/sysctl.h: No such file or directory
   40 | #include <sys/sysctl.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.

It looks like to be related to glibc which removed sys/sysctl.h back in April 2020:

https://sourceware.org/git/?p=glibc.git;a=commit;h=076f09afbac1aa57756faa7a8feadb7936a724e4

So any glibc version starting with 2.32 is breaking build process.

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