[systemd-devel] Compilation error on Debian

Holger Schurig holgerschurig at gmail.com
Thu Feb 20 00:59:50 PST 2014


I'm on Debian 7.4 (the current stable one), gcc is "gcc (Debian
4.7.2-5) 4.7.2". I get lots of warnings, but also a compilation error.

I also get one warning at autogen time and one warning at configure time.


For the compilation error: I have libc6-dev in version 2.13-38+deb7u1.
Doesn't that one define setns? The libc6-dev *.deb provides
/usr/include/i386-linux-gnu/bits/syscall.h, which at least defines
SYS_setns.



$ git describe
v209-1-g6300b3e
$ git clean -fdx
$ ./autogen.sh
...
configure.ac:37: installing `build-aux/missing'
Makefile.am:36: user target `.PRECIOUS' defined here...
/usr/share/automake-1.11/am/configure.am: ... overrides Automake
target `.PRECIOUS' defined here
...
$ ./configure
...
checking for LIBGCRYPT - version >= 1.4.5... yes (1.5.0)
configure: WARNING:
***
*** The config script /usr/bin/libgcrypt-config was
*** built for i486-pc-linux-gnu and thus may not match the
*** used host i686-pc-linux-gnu.
*** You may want to use the configure option --with-libgcrypt-prefix
*** to specify a matching config script.
***
checking libaudit.h usability... yes
...
$ make
...
  CC     src/libsystemd/sd-bus/libsystemd_la-bus-kernel.lo
src/libsystemd/sd-bus/bus-kernel.c: In function 'bus_message_setup_kmsg':
src/libsystemd/sd-bus/bus-kernel.c:230:9: warning: ISO C90 forbids
mixed declarations and code [-Wdeclaration-after-statement]
src/libsystemd/sd-bus/bus-kernel.c: In function 'bus_kernel_create_bus':
src/libsystemd/sd-bus/bus-kernel.c:1301:9: warning: ISO C90 forbids
mixed declarations and code [-Wdeclaration-after-statement]
src/libsystemd/sd-bus/bus-kernel.c:1302:9: warning: ISO C90 forbids
mixed declarations and code [-Wdeclaration-after-statement]
...
  CC     src/core/libsystemd_core_la-namespace.lo
src/core/namespace.c: In function 'setup_netns':
src/core/namespace.c:495:17: warning: implicit declaration of function
'setns' [-Wimplicit-function-declaration]
src/core/namespace.c:495:17: warning: nested extern declaration of
'setns' [-Wnested-externs]
...
  CC     src/shared/conf-parser.lo
src/shared/conf-parser.c: In function 'config_parse_bytes_off':
src/shared/conf-parser.c:493:9: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
...
  CCLD   libsystemd.la
src/libsystemd/sd-bus/.libs/libsystemd_la-bus-message.o (symbol from
plugin): warning: memset used with constant zero length parameter;
this could be due to transposed parameters
...
  CC     src/libsystemd/sd-bus/libsystemd_internal_la-bus-kernel.lo
src/libsystemd/sd-bus/bus-kernel.c: In function 'bus_message_setup_kmsg':
src/libsystemd/sd-bus/bus-kernel.c:230:9: warning: ISO C90 forbids
mixed declarations and code [-Wdeclaration-after-statement]
src/libsystemd/sd-bus/bus-kernel.c: In function 'bus_kernel_create_bus':
src/libsystemd/sd-bus/bus-kernel.c:1301:9: warning: ISO C90 forbids
mixed declarations and code [-Wdeclaration-after-statement]
src/libsystemd/sd-bus/bus-kernel.c:1302:9: warning: ISO C90 forbids
mixed declarations and code [-Wdeclaration-after-statement]
...
  CCLD   libudev.la
libsystemd_internal_la-bus-message.o (symbol from plugin): warning:
memset used with constant zero length parameter; this could be due to
transposed parameters
...
  CC     src/shared/libsystemd_capability_la-capability.lo
src/shared/capability.c: In function 'drop_from_file':
src/shared/capability.c:174:9: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
src/shared/capability.c:175:9: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
...
  CC     src/core/libsystemd_core_la-manager.lo
src/core/manager.c: In function 'manager_setup_time_change':
src/core/manager.c:238:9: warning: ISO C90 forbids mixed declarations
and code [-Wdeclaration-after-statement]
  CC     src/core/libsystemd_core_la-transaction.lo
  CC     src/core/libsystemd_core_la-load-fragment.lo
src/core/load-fragment.c: In function 'config_parse_memory_limit':
src/core/load-fragment.c:2279:9: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
...
  CC     src/core/libsystemd_core_la-dbus-manager.lo
src/core/dbus-manager.c: In function 'property_set_runtime_watchdog':
src/core/dbus-manager.c:284:9: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
src/core/dbus-manager.c: In function 'method_get_unit_by_pid':
src/core/dbus-manager.c:334:9: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
...
  CC     src/core/libsystemd_core_la-namespace.lo
src/core/namespace.c: In function 'setup_netns':
src/core/namespace.c:495:17: warning: implicit declaration of function
'setns' [-Wimplicit-function-declaration]
src/core/namespace.c:495:17: warning: nested extern declaration of
'setns' [-Wnested-externs]
...
  CC     src/udev/net/libudev_core_la-link-config.lo
src/udev/net/link-config.c: In function 'get_mac':
src/udev/net/link-config.c:334:17: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
...
  CC     src/machine/machined-dbus.lo
src/machine/machined-dbus.c: In function 'method_get_machine_by_pid':
src/machine/machined-dbus.c:99:9: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
src/machine/machined-dbus.c: In function 'method_create_or_register_machine':
src/machine/machined-dbus.c:227:17: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
...
src/login/logind-dbus.c: In function 'method_get_session_by_pid':
src/login/logind-dbus.c:170:9: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
src/login/logind-dbus.c: In function 'method_get_user_by_pid':
src/login/logind-dbus.c:238:9: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
src/login/logind-dbus.c: In function 'method_create_session':
src/login/logind-dbus.c:573:17: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
...
  CCLD   pam_systemd.la
libsystemd_internal_la-bus-message.o (symbol from plugin): warning:
memset used with constant zero length parameter; this could be due to
transposed parameters
/tmp/ccSsUdbL.ltrans11.ltrans.o: In function `namespace_enter':
ccSsUdbL.ltrans11.o:(.text+0xf94): undefined reference to `setns'
ccSsUdbL.ltrans11.o:(.text+0xfa8): undefined reference to `setns'
collect2: error: ld returned 1 exit status
make[2]: *** [pam_systemd.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


More information about the systemd-devel mailing list