termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.15k stars 3.02k forks source link

[Bug]: fatal error: 'gnu/stubs-soft.h' file not found #20780

Closed fam007e closed 3 months ago

fam007e commented 3 months ago

Problem description

While building picom from source using meson and then using ninja to compile causes error as stubs-soft.h header is missing as glibc doesn't apparently have that file.

ninja -C build
ninja: Entering directory `build'
[1/33] Compiling C object src/picom.p/utils.c.o
FAILED: src/picom.p/utils.c.o
cc -Isrc/picom.p -Isrc -I../src -Isubprojects/test.h -I../subprojects/test.h -I/data/data/com.termux/files/usr/include -I/data/data/com.termux/files/usr/include/pixman-1 -I/data/data/com.termux/files/usr/include/dbus-1.0 -I/data/data/com.termux/files/usr/lib/dbus-1.0/include -I/data/data/com.termux/files/usr/glibc/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -O3 '-DPICOM_VERSION="vgit-df4c6"' -DNDEBUG -D_GNU_SOURCE -DHAS_STDC_PREDEF_H -mfloat-abi=softfp -Wcast-function-type -Wignored-qualifiers -Wnonnull -Wshadow -Wno-type-limits -Woverride-init -Wsign-compare -Wtype-limits -Wuninitialized -Wshift-negative-value -Wunused-but-set-parameter -Wunused-parameter -Wno-unknown-warning-option -Wno-missing-braces -Wconversion -Wempty-body -pthread -DCONFIG_LIBCONFIG -DCONFIG_REGEX_PCRE -DCONFIG_OPENGL -DCONFIG_DBUS -DHAS_INOTIFY -MD -MQ src/picom.p/utils.c.o -MF src/picom.p/utils.c.o.d -o src/picom.p/utils.c.o -c ../src/utils.c
In file included from ../src/utils.c:1:
In file included from /data/data/com.termux/files/usr/glibc/include/stdio.h:28:
In file included from /data/data/com.termux/files/usr/glibc/include/bits/libc-header-start.h:33:
In file included from /data/data/com.termux/files/usr/glibc/include/features.h:527:
/data/data/com.termux/files/usr/glibc/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found
    7 | # include <gnu/stubs-soft.h>
      |           ^~~~~~~~~~~~~~~~~~
1 error generated.
[2/33] Compiling C object src/picom.p/string_utils.c.o
FAILED: src/picom.p/string_utils.c.o
cc -Isrc/picom.p -Isrc -I../src -Isubprojects/test.h -I../subprojects/test.h -I/data/data/com.termux/files/usr/include -I/data/data/com.termux/files/usr/include/pixman-1 -I/data/data/com.termux/files/usr/include/dbus-1.0 -I/data/data/com.termux/files/usr/lib/dbus-1.0/include -I/data/data/com.termux/files/usr/glibc/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -O3 '-DPICOM_VERSION="vgit-df4c6"' -DNDEBUG -D_GNU_SOURCE -DHAS_STDC_PREDEF_H -mfloat-abi=softfp -Wcast-function-type -Wignored-qualifiers -Wnonnull -Wshadow -Wno-type-limits -Woverride-init -Wsign-compare -Wtype-limits -Wuninitialized -Wshift-negative-value -Wunused-but-set-parameter -Wunused-parameter -Wno-unknown-warning-option -Wno-missing-braces -Wconversion -Wempty-body -pthread -DCONFIG_LIBCONFIG -DCONFIG_REGEX_PCRE -DCONFIG_OPENGL -DCONFIG_DBUS -DHAS_INOTIFY -MD -MQ src/picom.p/string_utils.c.o -MF src/picom.p/string_utils.c.o.d -o src/picom.p/string_utils.c.o -c ../src/string_utils.c
In file included from ../src/string_utils.c:4:
In file included from /data/data/com.termux/files/usr/glibc/include/string.h:26:
In file included from /data/data/com.termux/files/usr/glibc/include/bits/libc-header-start.h:33:
In file included from /data/data/com.termux/files/usr/glibc/include/features.h:527:
/data/data/com.termux/files/usr/glibc/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found
    7 | # include <gnu/stubs-soft.h>
      |           ^~~~~~~~~~~~~~~~~~
1 error generated.
[3/33] Compiling C object src/picom.p/vsync.c.o
FAILED: src/picom.p/vsync.c.o
cc -Isrc/picom.p -Isrc -I../src -Isubprojects/test.h -I../subprojects/test.h -I/data/data/com.termux/files/usr/include -I/data/data/com.termux/files/usr/include/pixman-1 -I/data/data/com.termux/files/usr/include/dbus-1.0 -I/data/data/com.termux/files/usr/lib/dbus-1.0/include -I/data/data/com.termux/files/usr/glibc/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -O3 '-DPICOM_VERSION="vgit-df4c6"' -DNDEBUG -D_GNU_SOURCE -DHAS_STDC_PREDEF_H -mfloat-abi=softfp -Wcast-function-type -Wignored-qualifiers -Wnonnull -Wshadow -Wno-type-limits -Woverride-init -Wsign-compare -Wtype-limits -Wuninitialized -Wshift-negative-value -Wunused-but-set-parameter -Wunused-parameter -Wno-unknown-warning-option -Wno-missing-braces -Wconversion -Wempty-body -pthread -DCONFIG_LIBCONFIG -DCONFIG_REGEX_PCRE -DCONFIG_OPENGL -DCONFIG_DBUS -DHAS_INOTIFY -MD -MQ src/picom.p/vsync.c.o -MF src/picom.p/vsync.c.o.d -o src/picom.p/vsync.c.o -c ../src/vsync.c
In file included from ../src/vsync.c:6:
In file included from ../src/common.h:31:
In file included from /data/data/com.termux/files/usr/glibc/include/assert.h:35:
In file included from /data/data/com.termux/files/usr/glibc/include/features.h:527:
/data/data/com.termux/files/usr/glibc/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found
    7 | # include <gnu/stubs-soft.h>
      |           ^~~~~~~~~~~~~~~~~~
1 error generated.
[4/33] Compiling C object src/picom.p/c2.c.o
FAILED: src/picom.p/c2.c.o
cc -Isrc/picom.p -Isrc -I../src -Isubprojects/test.h -I../subprojects/test.h -I/data/data/com.termux/files/usr/include -I/data/data/com.termux/files/usr/include/pixman-1 -I/data/data/com.termux/files/usr/include/dbus-1.0 -I/data/data/com.termux/files/usr/lib/dbus-1.0/include -I/data/data/com.termux/files/usr/glibc/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -O3 '-DPICOM_VERSION="vgit-df4c6"' -DNDEBUG -D_GNU_SOURCE -DHAS_STDC_PREDEF_H -mfloat-abi=softfp -Wcast-function-type -Wignored-qualifiers -Wnonnull -Wshadow -Wno-type-limits -Woverride-init -Wsign-compare -Wtype-limits -Wuninitialized -Wshift-negative-value -Wunused-but-set-parameter -Wunused-parameter -Wno-unknown-warning-option -Wno-missing-braces -Wconversion -Wempty-body -pthread -DCONFIG_LIBCONFIG -DCONFIG_REGEX_PCRE -DCONFIG_OPENGL -DCONFIG_DBUS -DHAS_INOTIFY -MD -MQ src/picom.p/c2.c.o -MF src/picom.p/c2.c.o.d -o src/picom.p/c2.c.o -c ../src/c2.c
In file included from ../src/c2.c:13:
In file included from /data/data/com.termux/files/usr/glibc/include/ctype.h:25:
In file included from /data/data/com.termux/files/usr/glibc/include/features.h:527:
/data/data/com.termux/files/usr/glibc/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found
    7 | # include <gnu/stubs-soft.h>
      |           ^~~~~~~~~~~~~~~~~~
1 error generated.
[5/33] Compiling C object src/picom.p/config.c.o
FAILED: src/picom.p/config.c.o
cc -Isrc/picom.p -Isrc -I../src -Isubprojects/test.h -I../subprojects/test.h -I/data/data/com.termux/files/usr/include -I/data/data/com.termux/files/usr/include/pixman-1 -I/data/data/com.termux/files/usr/include/dbus-1.0 -I/data/data/com.termux/files/usr/lib/dbus-1.0/include -I/data/data/com.termux/files/usr/glibc/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -O3 '-DPICOM_VERSION="vgit-df4c6"' -DNDEBUG -D_GNU_SOURCE -DHAS_STDC_PREDEF_H -mfloat-abi=softfp -Wcast-function-type -Wignored-qualifiers -Wnonnull -Wshadow -Wno-type-limits -Woverride-init -Wsign-compare -Wtype-limits -Wuninitialized -Wshift-negative-value -Wunused-but-set-parameter -Wunused-parameter -Wno-unknown-warning-option -Wno-missing-braces -Wconversion -Wempty-body -pthread -DCONFIG_LIBCONFIG -DCONFIG_REGEX_PCRE -DCONFIG_OPENGL -DCONFIG_DBUS -DHAS_INOTIFY -MD -MQ src/picom.p/config.c.o -MF src/picom.p/config.c.o.d -o src/picom.p/config.c.o -c ../src/config.c
In file included from ../src/config.c:5:
In file included from /data/data/com.termux/files/usr/glibc/include/ctype.h:25:
In file included from /data/data/com.termux/files/usr/glibc/include/features.h:527:
/data/data/com.termux/files/usr/glibc/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found
    7 | # include <gnu/stubs-soft.h>
      |           ^~~~~~~~~~~~~~~~~~
1 error generated.
[6/33] Compiling C object src/picom.p/win.c.o
FAILED: src/picom.p/win.c.o
cc -Isrc/picom.p -Isrc -I../src -Isubprojects/test.h -I../subprojects/test.h -I/data/data/com.termux/files/usr/include -I/data/data/com.termux/files/usr/include/pixman-1 -I/data/data/com.termux/files/usr/include/dbus-1.0 -I/data/data/com.termux/files/usr/lib/dbus-1.0/include -I/data/data/com.termux/files/usr/glibc/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -O3 '-DPICOM_VERSION="vgit-df4c6"' -DNDEBUG -D_GNU_SOURCE -DHAS_STDC_PREDEF_H -mfloat-abi=softfp -Wcast-function-type -Wignored-qualifiers -Wnonnull -Wshadow -Wno-type-limits -Woverride-init -Wsign-compare -Wtype-limits -Wuninitialized -Wshift-negative-value -Wunused-but-set-parameter -Wunused-parameter -Wno-unknown-warning-option -Wno-missing-braces -Wconversion -Wempty-body -pthread -DCONFIG_LIBCONFIG -DCONFIG_REGEX_PCRE -DCONFIG_OPENGL -DCONFIG_DBUS -DHAS_INOTIFY -MD -MQ src/picom.p/win.c.o -MF src/picom.p/win.c.o.d -o src/picom.p/win.c.o -c ../src/win.c
In file included from ../src/win.c:5:
In file included from /data/data/com.termux/files/usr/glibc/include/X11/Xlib.h:38:
In file included from /data/data/com.termux/files/usr/glibc/include/sys/types.h:25:
In file included from /data/data/com.termux/files/usr/glibc/include/features.h:527:
/data/data/com.termux/files/usr/glibc/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found
    7 | # include <gnu/stubs-soft.h>
      |           ^~~~~~~~~~~~~~~~~~
1 error generated.
[7/33] Compiling C object src/picom.p/diagnostic.c.o
FAILED: src/picom.p/diagnostic.c.o
cc -Isrc/picom.p -Isrc -I../src -Isubprojects/test.h -I../subprojects/test.h -I/data/data/com.termux/files/usr/include -I/data/data/com.termux/files/usr/include/pixman-1 -I/data/data/com.termux/files/usr/include/dbus-1.0 -I/data/data/com.termux/files/usr/lib/dbus-1.0/include -I/data/data/com.termux/files/usr/glibc/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -O3 '-DPICOM_VERSION="vgit-df4c6"' -DNDEBUG -D_GNU_SOURCE -DHAS_STDC_PREDEF_H -mfloat-abi=softfp -Wcast-function-type -Wignored-qualifiers -Wnonnull -Wshadow -Wno-type-limits -Woverride-init -Wsign-compare -Wtype-limits -Wuninitialized -Wshift-negative-value -Wunused-but-set-parameter -Wunused-parameter -Wno-unknown-warning-option -Wno-missing-braces -Wconversion -Wempty-body -pthread -DCONFIG_LIBCONFIG -DCONFIG_REGEX_PCRE -DCONFIG_OPENGL -DCONFIG_DBUS -DHAS_INOTIFY -MD -MQ src/picom.p/diagnostic.c.o -MF src/picom.p/diagnostic.c.o.d -o src/picom.p/diagnostic.c.o -c ../src/diagnostic.c
In file included from ../src/diagnostic.c:4:
In file included from /data/data/com.termux/files/usr/glibc/include/stdio.h:28:
In file included from /data/data/com.termux/files/usr/glibc/include/bits/libc-header-start.h:33:
In file included from /data/data/com.termux/files/usr/glibc/include/features.h:527:
/data/data/com.termux/files/usr/glibc/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found
    7 | # include <gnu/stubs-soft.h>
      |           ^~~~~~~~~~~~~~~~~~
1 error generated.
[8/33] Compiling C object src/picom.p/render.c.o
FAILED: src/picom.p/render.c.o
cc -Isrc/picom.p -Isrc -I../src -Isubprojects/test.h -I../subprojects/test.h -I/data/data/com.termux/files/usr/include -I/data/data/com.termux/files/usr/include/pixman-1 -I/data/data/com.termux/files/usr/include/dbus-1.0 -I/data/data/com.termux/files/usr/lib/dbus-1.0/include -I/data/data/com.termux/files/usr/glibc/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -O3 '-DPICOM_VERSION="vgit-df4c6"' -DNDEBUG -D_GNU_SOURCE -DHAS_STDC_PREDEF_H -mfloat-abi=softfp -Wcast-function-type -Wignored-qualifiers -Wnonnull -Wshadow -Wno-type-limits -Woverride-init -Wsign-compare -Wtype-limits -Wuninitialized -Wshift-negative-value -Wunused-but-set-parameter -Wunused-parameter -Wno-unknown-warning-option -Wno-missing-braces -Wconversion -Wempty-body -pthread -DCONFIG_LIBCONFIG -DCONFIG_REGEX_PCRE -DCONFIG_OPENGL -DCONFIG_DBUS -DHAS_INOTIFY -MD -MQ src/picom.p/render.c.o -MF src/picom.p/render.c.o.d -o src/picom.p/render.c.o -c ../src/render.c
In file included from ../src/render.c:4:
In file included from /data/data/com.termux/files/usr/glibc/include/stdlib.h:26:
In file included from /data/data/com.termux/files/usr/glibc/include/bits/libc-header-start.h:33:
In file included from /data/data/com.termux/files/usr/glibc/include/features.h:527:
/data/data/com.termux/files/usr/glibc/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found
    7 | # include <gnu/stubs-soft.h>
      |           ^~~~~~~~~~~~~~~~~~
1 error generated.
[9/33] Compiling C object src/picom.p/x.c.o
FAILED: src/picom.p/x.c.o
cc -Isrc/picom.p -Isrc -I../src -Isubprojects/test.h -I../subprojects/test.h -I/data/data/com.termux/files/usr/include -I/data/data/com.termux/files/usr/include/pixman-1 -I/data/data/com.termux/files/usr/include/dbus-1.0 -I/data/data/com.termux/files/usr/lib/dbus-1.0/include -I/data/data/com.termux/files/usr/glibc/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -O3 '-DPICOM_VERSION="vgit-df4c6"' -DNDEBUG -D_GNU_SOURCE -DHAS_STDC_PREDEF_H -mfloat-abi=softfp -Wcast-function-type -Wignored-qualifiers -Wnonnull -Wshadow -Wno-type-limits -Woverride-init -Wsign-compare -Wtype-limits -Wuninitialized -Wshift-negative-value -Wunused-but-set-parameter -Wunused-parameter -Wno-unknown-warning-option -Wno-missing-braces -Wconversion -Wempty-body -pthread -DCONFIG_LIBCONFIG -DCONFIG_REGEX_PCRE -DCONFIG_OPENGL -DCONFIG_DBUS -DHAS_INOTIFY -MD -MQ src/picom.p/x.c.o -MF src/picom.p/x.c.o.d -o src/picom.p/x.c.o -c ../src/x.c
In file included from ../src/x.c:5:
In file included from /data/data/com.termux/files/usr/glibc/include/stdlib.h:26:
In file included from /data/data/com.termux/files/usr/glibc/include/bits/libc-header-start.h:33:
In file included from /data/data/com.termux/files/usr/glibc/include/features.h:527:
/data/data/com.termux/files/usr/glibc/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found
    7 | # include <gnu/stubs-soft.h>
      |           ^~~~~~~~~~~~~~~~~~
1 error generated.
[10/33] Compiling C object src/picom.p/picom.c.o
FAILED: src/picom.p/picom.c.o
cc -Isrc/picom.p -Isrc -I../src -Isubprojects/test.h -I../subprojects/test.h -I/data/data/com.termux/files/usr/include -I/data/data/com.termux/files/usr/include/pixman-1 -I/data/data/com.termux/files/usr/include/dbus-1.0 -I/data/data/com.termux/files/usr/lib/dbus-1.0/include -I/data/data/com.termux/files/usr/glibc/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -O3 '-DPICOM_VERSION="vgit-df4c6"' -DNDEBUG -D_GNU_SOURCE -DHAS_STDC_PREDEF_H -mfloat-abi=softfp -Wcast-function-type -Wignored-qualifiers -Wnonnull -Wshadow -Wno-type-limits -Woverride-init -Wsign-compare -Wtype-limits -Wuninitialized -Wshift-negative-value -Wunused-but-set-parameter -Wunused-parameter -Wno-unknown-warning-option -Wno-missing-braces -Wconversion -Wempty-body -pthread -DCONFIG_LIBCONFIG -DCONFIG_REGEX_PCRE -DCONFIG_OPENGL -DCONFIG_DBUS -DHAS_INOTIFY -MD -MQ src/picom.p/picom.c.o -MF src/picom.p/picom.c.o.d -o src/picom.p/picom.c.o -c ../src/picom.c
In file included from ../src/picom.c:14:
In file included from /data/data/com.termux/files/usr/glibc/include/X11/Xlib-xcb.h:7:
In file included from /data/data/com.termux/files/usr/glibc/include/xcb/xcb.h:30:
In file included from /data/data/com.termux/files/usr/glibc/include/sys/types.h:25:
In file included from /data/data/com.termux/files/usr/glibc/include/features.h:527:
/data/data/com.termux/files/usr/glibc/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found
    7 | # include <gnu/stubs-soft.h>
      |           ^~~~~~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.

What steps will reproduce the bug?

After using meson to build the build via meson setup --buildtype=release build --wipe and then when ninja -C build is used error is shown.

What is the expected behavior?

It's going to make picom executable.

System information

Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=GITHUB
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=1964
TERMUX_IS_DEBUGGABLE_BUILD=1
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
TERMUX__USER_ID=0
Packages CPU architecture:
arm
Subscribed repositories:
# sources.list
deb https://mirror.endianness.com/termux/termux-main stable main
# x11-repo (sources.list.d/x11.list)
deb https://mirror.endianness.com/termux/termux-x11 x11 main
# glibc-repo (sources.list.d/glibc.list)
deb https://packages-cf.termux.dev/apt/termux-glibc/ glibc stable
Updatable packages:
All packages up to date
termux-tools version:
1.42.4
Android version:
11
Kernel build information:
Linux localhost 4.14.193+-ab538 #1 SMP PREEMPT Thu May 9 20:28:29 CST 2024 armv8l Android
Device manufacturer:
realme
Device model:
RMX3235
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51
licy183 commented 3 months ago

Seems a glibc-repo issue.

Ping @Maxython

Maxython commented 3 months ago

According to your error log, I see that you are trying to compile a project with the bionic environment and the glibc environment. You can't do that! If you want to build a glibc-based binary, then you must use only the glibc environment, that is, use only glibc-based libraries and their headers from $PREFIX/glibc/include/. The same rule applies when compiling on bionic.