New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
elogind 235.2 fail to compile with glibc 2.27 #46
Comments
confirm |
glibc-2.27 is brand new. I'll see what I can do. Please understand that I first look for a fix in yet to migrate systemd commits, as I do not want to divert too far from systemd-login. |
systemd-236/237 builds fine with glibc-2.27 |
@perfect7gentleman : The upgrade to systemd-236 will come soon. However, maybe I can backport glibc-2.27 support... |
I'm successfully compiling elogind with this patch: |
Hey, this is a super cool patch! |
Thank you selflex. |
@selflex Nice! Does elogind still build against the older glibc after applying that patch? |
It should build against older glibc versions but I can try building on glibc-2.26 in case it doesn't. |
@Yamakuzure I've built elogind successfully with glibc version 2.26 after applying the patch. Keep up the good work! |
A suitable patch in glibc 2.27 |
Sorry for the delay. I'll backport the patch to 235 and release a new version during this week. |
Bug: #46 elogind 235.2 fail to compile with glibc-2.27. Ali H. Caliskan (selflex) posted this patch which fixes the incompatibility with glibc-2.27+ He also made sure that elogind still compiles against glibc-2.26.
Please have a look whether the current state in the v235-stable branch compiles for you. |
And while you are at it: Does the current master compile against glibc 2.27? If it does it is almost ready to become v236.1 . |
Current master doesnt compile against glibc version 2.27. I get this error:
|
elogind 236.1 glibc-2.27 patch:
|
@selflex : If I rename those functions, the build will fail on all systems where these are really missing. The build system should have detected whether they are there or not. And if they are, those definitions wouldn't be needed, because the appropriate macros would have been defined. |
I have already branched out v236-stable, as upstream has committed a bunch of updates already. Part of the updates went into the build system, including the detection of these functions. Please test whether v235-stable and v236-stable branches compile cleanly against glibc-2.27. Thank you very much! |
@Yamakuzure
elogind 235-stable builds and works fine without patching, but v236-stable still fail to build for me with the following error [27/540] cc -Isrc/basic/basic@sta -Isrc/basic -I../src/basic -I. -I../ -Isrc/update-utmp -I../src/update-utmp -Isrc/sleep -I../src/sleep -I../src/libelogind/sd-id128 -I../src/libelogind/sd-bus -Isrc/core -I../src/core -Isrc/login -I../src/login -Isrc/systemd -I../src/systemd -Isrc/shared -I../src/shared -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu99 -Wextra -Werror=undef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wimplicit-fallthrough=5 -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Werror=overflow -Wdate-time -Wnested-externs -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong -fPIE --param=ssp-buffer-size=4 -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-format-signedness -Wno-error=nonnull -Werror=shadow -ffunction-sections -fdata-sections -include config.h -O2 -march=core2 -fstack-protector -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -MD -MQ 'src/basic/basic@sta/fileio.c.o' -MF 'src/basic/basic@sta/fileio.c.o.d' -o 'src/basic/basic@sta/fileio.c.o' -c ../src/basic/fileio.c libc is 2.27 and meson is 0.45.1, Debian Sid/Unstable. |
Dammit. Something is really fishy here. Could you please post your configuration log? |
I got this with meson + ninja (the previous post i was using the Debian building system, so the output is different) The Meson build system
Build targets in project: 412 then the build fails with ninja: Entering directory `build-test/' |
As I mentioned before the memfd_create and some more functions have been changed upstream already: src/basic/missing_syscall.h |
@selflex : Thank you for clarifying this. The difference between your previous comment is, that they actually map from I'll see to it that this is applied. |
I have ported the missing_syscall.h fix to both v235-stable and v236-stable. I'd appreciate if someone could be so kind and test whether both now compile successfully against glibc-2.27. Thank you very much! |
v236
|
tested v235.4 and v236.1, I confirm both now compile successfully. |
Cool! Thank you all very much for your patience and support! |
Hi,
Here is the compile log:
++ Mark Compile start : "elogind" "235.2" "Mon, 05 Feb 2018 22:50:46 +0000"
The Meson build system
Version: 0.44.0
Source dir: /usr/src/elogind-235.2
Build dir: /usr/src/elogind-235.2/build
Build type: native build
Project name: elogind
Native C compiler: gcc (gcc 7.3.0)
Appending CFLAGS from environment: ' -O2 -march=x86-64 -pipe'
Appending LDFLAGS from environment: ' -s'
Appending CPPFLAGS from environment: ' -D_FORTIFY_SOURCE=2'
Build machine cpu family: x86_64
Build machine cpu: x86_64
Program tools/meson-check-compilation.sh found: YES (/usr/src/elogind-235.2/tools/meson-check-compilation.sh)
Program c++ found: YES (/var/lib/lunar/compilers/c++)
Native C++ compiler: g++ (gcc 7.3.0)
Appending CXXFLAGS from environment: ' -O2 -march=x86-64 -pipe'
Appending LDFLAGS from environment: ' -s'
Appending CPPFLAGS from environment: ' -D_FORTIFY_SOURCE=2'
Compiler for C supports argument -Wextra: YES
Compiler for C supports argument -Werror=undef: YES
Compiler for C supports argument -Wlogical-op: YES
Compiler for C supports argument -Wmissing-include-dirs: YES
Compiler for C supports argument -Wold-style-definition: YES
Compiler for C supports argument -Wpointer-arith: YES
Compiler for C supports argument -Winit-self: YES
Compiler for C supports argument -Wdeclaration-after-statement: YES
Compiler for C supports argument -Wfloat-equal: YES
Compiler for C supports argument -Wsuggest-attribute=noreturn: YES
Compiler for C supports argument -Werror=missing-prototypes: YES
Compiler for C supports argument -Werror=implicit-function-declaration: YES
Compiler for C supports argument -Werror=missing-declarations: YES
Compiler for C supports argument -Werror=return-type: YES
Compiler for C supports argument -Werror=incompatible-pointer-types: YES
Compiler for C supports argument -Werror=format=2: YES
Compiler for C supports argument -Wstrict-prototypes: YES
Compiler for C supports argument -Wredundant-decls: YES
Compiler for C supports argument -Wmissing-noreturn: YES
Compiler for C supports argument -Wshadow: YES
Compiler for C supports argument -Wendif-labels: YES
Compiler for C supports argument -Wstrict-aliasing=2: YES
Compiler for C supports argument -Wwrite-strings: YES
Compiler for C supports argument -Werror=overflow: YES
Compiler for C supports argument -Wdate-time: YES
Compiler for C supports argument -Wnested-externs: YES
Compiler for C supports argument -ffast-math: YES
Compiler for C supports argument -fno-common: YES
Compiler for C supports argument -fdiagnostics-show-option: YES
Compiler for C supports argument -fno-strict-aliasing: YES
Compiler for C supports argument -fvisibility=hidden: YES
Compiler for C supports argument -fstack-protector: YES
Compiler for C supports argument -fstack-protector-strong: YES
Compiler for C supports argument -fPIE: YES
Compiler for C supports argument --param=ssp-buffer-size=4: YES
Compiler for C supports argument -Wunused-parameter: YES
Compiler for C supports argument -Wmissing-field-initializers: YES
Compiler for C supports argument -Wunused-result: YES
Compiler for C supports argument -Wformat-signedness: YES
Compiler for C supports argument -Werror=nonnull: YES
Checking if "-Werror=shadow with local shadowing" compiles: YES
Message: Linking with -Wl,-z,relro supported: yes
Message: Linking with -Wl,-z,now supported: yes
Message: Linking with -pie supported: yes
Checking for size of "pid_t": 4
Checking for size of "uid_t": 4
Checking for size of "gid_t": 4
Checking for size of "dev_t": 8
Checking for size of "ino_t": 8
Checking for size of "time_t": 8
Checking for size of "rlim_t": 8
Checking for size of "char16_t": 2
Checking for size of "char32_t": 4
Checking for size of "key_serial_t": -1
Checking for size of "struct ethtool_link_settings": 48
Checking for size of "struct fib_rule_uid_range": 8
Header <linux/if_link.h> has symbol "IFLA_INET6_ADDR_GEN_MODE": YES
Header <linux/if_link.h> has symbol "IN6_ADDR_GEN_MODE_STABLE_PRIVACY": YES
Header <linux/if_link.h> has symbol "IFLA_VRF_TABLE": YES
Header <linux/if_link.h> has symbol "IFLA_MACVLAN_FLAGS": YES
Header <linux/if_link.h> has symbol "IFLA_IPVLAN_MODE": YES
Header <linux/if_link.h> has symbol "IFLA_PHYS_PORT_ID": YES
Header <linux/if_link.h> has symbol "IFLA_BOND_AD_INFO": YES
Header <linux/if_link.h> has symbol "IFLA_VLAN_PROTOCOL": YES
Header <linux/if_link.h> has symbol "IFLA_VXLAN_REMCSUM_NOPARTIAL": YES
Header <linux/if_link.h> has symbol "IFLA_VXLAN_GPE": YES
Header <linux/if_link.h> has symbol "IFLA_GENEVE_LABEL": YES
Header <linux/if_tunnel.h> has symbol "IFLA_VTI_REMOTE": YES
Header <linux/if_tunnel.h> has symbol "IFLA_IPTUN_ENCAP_DPORT": YES
Header <linux/if_tunnel.h> has symbol "IFLA_GRE_ENCAP_DPORT": YES
Header <linux/if_bridge.h> has symbol "IFLA_BRIDGE_VLAN_INFO": YES
Header <linux/if_link.h> has symbol "IFLA_BRPORT_PROXYARP": YES
Header <linux/if_link.h> has symbol "IFLA_BRPORT_LEARNING_SYNC": YES
Header <linux/if_link.h> has symbol "IFLA_BR_VLAN_DEFAULT_PVID": YES
Header <linux/neighbour.h> has symbol "NDA_IFINDEX": YES
Header <linux/if_addr.h> has symbol "IFA_FLAGS": YES
Header <linux/fib_rules.h> has symbol "FRA_UID_RANGE": YES
Header <linux/loop.h> has symbol "LO_FLAGS_PARTSCAN": YES
Checking for function "secure_getenv": YES
Checking for function "__secure_getenv": NO
Checking for function "memfd_create": NO
Checking for function "gettid": NO
Checking for function "pivot_root": NO
Checking for function "name_to_handle_at": YES
Checking for function "setns": YES
Checking for function "renameat2": NO
Checking for function "kcmp": NO
Checking for function "keyctl": NO
Checking for function "copy_file_range": NO
Checking for function "bpf": NO
Checking for function "explicit_bzero": YES
Checking for function "getrandom": YES
Program sed found: YES (/usr/bin/sed)
Program grep found: YES (/usr/bin/grep)
Program awk found: YES (/usr/bin/awk)
Program m4 found: YES (/usr/bin/m4)
Program stat found: YES (/usr/bin/stat)
Program git found: YES (/usr/bin/git)
Program kexec found: NO
Program /usr/sbin/kexec found: NO
Program /sbin/kexec found: NO
Program nonexistingprogram found: NO
Program reboot found: YES (/usr/bin/reboot)
Program halt found: YES (/usr/bin/halt)
Program gperf found: YES (/usr/bin/gperf)
Message: gperf len type is unsigned
Has header "sys/capability.h": YES
Has header "linux/btrfs.h": YES
Has header "linux/memfd.h": YES
Has header "linux/vm_sockets.h": YES
Has header "sys/auxv.h": YES
Has header "valgrind/memcheck.h": NO
Has header "valgrind/valgrind.h": NO
Program tools/meson-get-cg-controller.sh found: YES (/usr/src/elogind-235.2/tools/meson-get-cg-controller.sh)
Message: maximum system UID is 999
Message: maximum system GID is 999
Dependency threads found: YES
Library rt found: YES
Library m found: YES
Library dl found: YES
Library crypt found: YES
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Native dependency libcap found: YES 2.25
Dependency libselinux found: NO
Native dependency polkit-gobject-1 found: YES 0.113
Library acl found: YES
Dependency audit found: NO
Library pam found: YES
Library pam_misc found: YES
Native dependency glib-2.0 found: YES 2.54.3
Native dependency gobject-2.0 found: YES 2.54.3
Native dependency gio-2.0 found: YES 2.54.3
Native dependency dbus-1 found: YES 1.12.2
Configuring config.h using configuration
Program intltool-merge found: YES (/usr/bin/intltool-merge)
Program /usr/src/elogind-235.2/tools/meson-symlink_headers.sh found: YES (/usr/src/elogind-235.2/tools/meson-symlink_headers.sh)
Program c++ found: YES (/var/lib/lunar/compilers/c++)
Program generate-gperfs.py found: YES (/usr/src/elogind-235.2/src/basic/generate-gperfs.py)
Program generate-cap-list.sh found: YES (/usr/src/elogind-235.2/src/basic/generate-cap-list.sh)
Program generate-errno-list.sh found: YES (/usr/src/elogind-235.2/src/basic/generate-errno-list.sh)
Configuring libelogind.pc using configuration
Configuring logind.conf using configuration
Configuring org.freedesktop.login1.service using configuration
Configuring 71-seat.rules using configuration
Configuring 73-seat-late.rules using configuration
Native dependency libudev found: YES 220
Program generate-sym-test.py found: YES (/usr/src/elogind-235.2/src/test/generate-sym-test.py)
Message: test-ipcrm is an unsafe test
Message: test-cgroup is a manual test
Message: test-inhibit is a manual test
Program tools/make-directive-index.py found: YES (/usr/src/elogind-235.2/tools/make-directive-index.py)
Program tools/make-man-index.py found: YES (/usr/src/elogind-235.2/tools/make-man-index.py)
Program tools/xml_helper.py found: YES (/usr/src/elogind-235.2/tools/xml_helper.py)
Program xsltproc found: YES (/usr/bin/xsltproc)
Native dependency bash-completion found: YES 2.7
Message: bash completions: /usr/share/bash-completion/completions
Message: zsh completions: /usr/share/zsh/site-functions
Program sh found: YES (/usr/bin/sh)
Program tools/meson-check-help.sh found: YES (/usr/src/elogind-235.2/tools/meson-check-help.sh)
Program tools/meson-git-contrib.sh found: YES (/usr/src/elogind-235.2/tools/meson-git-contrib.sh)
Message: elogind 235.2
prefix: /usr
rootprefix: /usr
sysconf dir: /etc
includedir: /usr/include
lib dir: /usr/lib
rootlib dir: /usr/lib
rootexeclib dir: /usr/libexec/elogind
PAM modules dir: /usr/lib/security
PAM configuration dir: /etc/pam.d
D-Bus policy dir: /usr/share/dbus-1/system.d
D-Bus session dir: /usr/share/dbus-1/services
D-Bus system dir: /usr/share/dbus-1/system-services
bash completions dir: /usr/share/bash-completion/completions
zsh completions dir: /usr/share/zsh/site-functions
TTY GID: 5
maximum system UID: 999
maximum system GID: 999
default KillUserProcesses setting: true
Build targets in project: 411
Found ninja-1.8.2 at /usr/bin/ninja
ninja: Entering directory `build'
[1/530] Compiling C object 'src/libelogind/elogind@sta/sd-bus_bus-common-errors.c.o'.
[2/530] Compiling C object 'src/libelogind/elogind@sta/sd-bus_bus-bloom.c.o'.
FAILED: src/libelogind/elogind@sta/sd-bus_bus-bloom.c.o
gcc -Isrc/libelogind/elogind@sta -Isrc/libelogind -I../src/libelogind -I. -I../ -Isrc/update-utmp -I../src/update-utmp -Isrc/sleep -I../src/sleep -I../src/libelogind/sd-id128 -I../src/libelogind/sd-bus -Isrc/core -I../src/core -Isrc/login -I../src/login -Isrc/systemd -I../src/systemd -Isrc/shared -I../src/shared -Isrc/basic -I../src/basic -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O0 -g -Wextra -Werror=undef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Werror=overflow -Wdate-time -Wnested-externs -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong -fPIE --param=ssp-buffer-size=4 -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-format-signedness -Wno-error=nonnull -Werror=shadow -include config.h -O2 -march=x86-64 -D_FORTIFY_SOURCE=2 -fPIC -pthread -MMD -MQ 'src/libelogind/elogind@sta/sd-bus_bus-bloom.c.o' -MF 'src/libelogind/elogind@sta/sd-bus_bus-bloom.c.o.d' -o 'src/libelogind/elogind@sta/sd-bus_bus-bloom.c.o' -c ../src/libelogind/sd-bus/bus-bloom.c
In file included from ../src/basic/missing.h:1278:0,
from ../src/basic/util.h:46,
from ../src/libelogind/sd-bus/bus-bloom.c:22:
../src/basic/missing_syscall.h:311:23: error: static declaration of 'copy_file_range' follows non-static declaration
static inline ssize_t copy_file_range(int fd_in, loff_t *off_in,
^~~~~~~~~~~~~~~
In file included from ../src/basic/util.h:42:0,
from ../src/libelogind/sd-bus/bus-bloom.c:22:
/usr/include/unistd.h:1110:9: note: previous declaration of 'copy_file_range' was here
ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
^~~~~~~~~~~~~~~
[3/530] Generating errno-list.txt with a meson_exe.py custom command.
++ Mark Compile stop : "elogind" "235.2" "Mon, 05 Feb 2018 22:51:00 +0000"
[4/530] Compiling C object 'src/libelogind/elogind@sta/sd-bus_bus-kernel.c.o'.
FAILED: src/libelogind/elogind@sta/sd-bus_bus-kernel.c.o
gcc -Isrc/libelogind/elogind@sta -Isrc/libelogind -I../src/libelogind -I. -I../ -Isrc/update-utmp -I../src/update-utmp -Isrc/sleep -I../src/sleep -I../src/libelogind/sd-id128 -I../src/libelogind/sd-bus -Isrc/core -I../src/core -Isrc/login -I../src/login -Isrc/systemd -I../src/systemd -Isrc/shared -I../src/shared -Isrc/basic -I../src/basic -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O0 -g -Wextra -Werror=undef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Werror=overflow -Wdate-time -Wnested-externs -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong -fPIE --param=ssp-buffer-size=4 -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-format-signedness -Wno-error=nonnull -Werror=shadow -include config.h -O2 -march=x86-64 -D_FORTIFY_SOURCE=2 -fPIC -pthread -MMD -MQ 'src/libelogind/elogind@sta/sd-bus_bus-kernel.c.o' -MF 'src/libelogind/elogind@sta/sd-bus_bus-kernel.c.o.d' -o 'src/libelogind/elogind@sta/sd-bus_bus-kernel.c.o' -c ../src/libelogind/sd-bus/bus-kernel.c
In file included from ../src/basic/missing.h:1278:0,
from ../src/basic/util.h:46,
from ../src/basic/hashmap.h:29,
from ../src/libelogind/sd-bus/bus-match.h:24,
from ../src/libelogind/sd-bus/bus-internal.h:29,
from ../src/libelogind/sd-bus/bus-kernel.c:36:
../src/basic/missing_syscall.h:66:19: error: static declaration of 'memfd_create' follows non-static declaration
static inline int memfd_create(const char *name, unsigned int flags) {
^~~~~~~~~~~~
In file included from /usr/include/bits/mman-linux.h:115:0,
from /usr/include/bits/mman.h:45,
from /usr/include/sys/mman.h:41,
from ../src/libelogind/sd-bus/bus-kernel.c:26:
/usr/include/bits/mman-shared.h:46:5: note: previous declaration of 'memfd_create' was here
int memfd_create (const char *__name, unsigned int __flags) __THROW;
^~~~~~~~~~~~
In file included from ../src/basic/missing.h:1278:0,
from ../src/basic/util.h:46,
from ../src/basic/hashmap.h:29,
from ../src/libelogind/sd-bus/bus-match.h:24,
from ../src/libelogind/sd-bus/bus-internal.h:29,
from ../src/libelogind/sd-bus/bus-kernel.c:36:
../src/basic/missing_syscall.h:311:23: error: static declaration of 'copy_file_range' follows non-static declaration
static inline ssize_t copy_file_range(int fd_in, loff_t *off_in,
^~~~~~~~~~~~~~~
In file included from ../src/basic/util.h:42:0,
from ../src/basic/hashmap.h:29,
from ../src/libelogind/sd-bus/bus-match.h:24,
from ../src/libelogind/sd-bus/bus-internal.h:29,
from ../src/libelogind/sd-bus/bus-kernel.c:36:
/usr/include/unistd.h:1110:9: note: previous declaration of 'copy_file_range' was here
ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
^~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered: