Re: [systemd-devel] Failure(s) Building Systemd with --enable-resolved

2015-04-23 Thread Aaron_Wright
Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote on 04/21/2015 
01:51:29 PM:
 On Tue, Apr 21, 2015 at 08:39:35AM -0700, aaron_wri...@selinc.com wrote:
  I've been getting a few problems building systemd with 
--enable-resolved
  . Any help would be very welcomed. I don't have any problems when 
  compiling with --disable-resolved.
  
  The first problem I got was this:
  
CCLD   libnss_resolve.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/cc03x1nN.ltrans6.ltrans.o: In function 
`bus_error_name_to_errno.4725
  ':
  cc03x1nN.ltrans6.o:(.text+0x12bb): undefined reference to 
  `__stop_BUS_ERROR_MAP'
  cc03x1nN.ltrans6.o:(.text+0x12c2): undefined reference to 
  `__start_BUS_ERROR_MAP'
  collect2: ld returned 1 exit status
  
  I got around this be removing -flto from OUR_CFLAGS in the 
Makefile. 
  How is that change going to impact systemd? Is there a better way to 
work 
  around this problem?
 Afaik nobody has measured that. It will certainly make your compilation
 times much shorter :)

So after some reading, LTO is an optimization flag; removing it would 
potentially slow down systemd a little bit, but it shouldn't change any 
behavior. I could live with that. But now I can't figure out how to get 
rid of -flto reliably. It's not mentioned in Makefile.am. It seems to be 
added by libtool automatically, but I can't figure out how to make it 
stop. I tried adding -fno-lto to libnss_resolve_la_LDFLAGS in 
Makefile.am, but libtool seems to strip that out. Presumably because it 
doesn't recognize it.

 
  After I got pass the first error, I now get this:
  
CC src/resolve/resolved-dns-cache.o
  src/resolve/resolved-dns-scope.c: In function ?dns_scope_tcp_socket?:
  src/resolve/resolved-dns-scope.c:260:56: error: ?IP_UNICAST_IF? 
undeclared 
  (first use in this function)
  src/resolve/resolved-dns-scope.c:260:56: note: each undeclared 
identifier 
  is reported only once for each function it appears in
 It was in kernel 3.4. What kernel headers are you using?
 
 Zbyszek

You're right. I'm using Kernel 3.10. I didn't have the right 
linux-libc-dev package installed. So now IP_UNICAST_IF is defined in 
/usr/include/linux/in.h, but that doesn't fix the compile errors. I can't 
include linux/in.h directly as that'll cause all sorts of redefinition 
errors with netinet/in.h. I'm not sure what is supposed to include 
linux/in.h for me. Including netinet/in.h doesn't fix it, as it 
doesn't define IP_UNICAST_IF.

I ended up adding #define IP_UNICAST_IF 50 to the top of 
src/resolve/resolved-dns-scope.c and src/resolve/resolved-dns-stream.c, 
which is a little hackish, but at leasts gets it to compile.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Failure(s) Building Systemd with --enable-resolved

2015-04-23 Thread Aaron_Wright
Lennart Poettering lenn...@poettering.net wrote on 04/22/2015 04:29:18 
PM:
 On Tue, 21.04.15 08:39, aaron_wri...@selinc.com 
 (aaron_wri...@selinc.com) wrote:
 
  I've been getting a few problems building systemd with 
--enable-resolved
  . Any help would be very welcomed. I don't have any problems when 
  compiling with --disable-resolved.
  
  The first problem I got was this:
  
CCLD   libnss_resolve.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/cc03x1nN.ltrans6.ltrans.o: In function 
`bus_error_name_to_errno.4725
  ':
  cc03x1nN.ltrans6.o:(.text+0x12bb): undefined reference to 
  `__stop_BUS_ERROR_MAP'
  cc03x1nN.ltrans6.o:(.text+0x12c2): undefined reference to 
  `__start_BUS_ERROR_MAP'
  collect2: ld returned 1 exit status
 
 Kay made some changes to the build system for this. Can you check if
 this part works now for you?
 
 Lennart
 
 -- 
 Lennart Poettering, Red Hat

I cloned down the master branch yesterday and tried to build, but got:

src/shared/random-util.c:26:22: fatal error: sys/auxv.h: No such file or 
directory

Which is new. Apparently sys/auxv.h was added in eglibc 2.16, and I'm 
stuck with eglibc 2.15, so that's a new unrelated wrinkle.

So, I attempted to merge the changes that seemed to make sense from 
Makefile.am on master to 219, which involved a lot of adding 
libsystemd-internal.la to different places, and ordering 
libsystemd-shared.la after it. Most of changes were in sections I'm not 
using, due to my configuration arguments, and libnss_resolve_la_LIBADD, 
the failing library, already had both libsystemd-internal.la and 
libsystemd-shared.la listed in libnss_resolve_la_LIBADD in the same 
order as everyone else. Am I missing something? Should I be looking in a 
different file, other than Makefile.am?

So, I haven't found a solution to this yet. It seems my problem is that my 
build environment is too old for systemd. I won't be able to move to 220 
because of eglibc 2.16 dependency, and I can't get libnss_resolve to 
compile due to a bug in my old gcc 4.6. My environment is Ubuntu Precise, 
which is a long term service edition.

My configuration arguments if anyone is curious:
--disable-chkconfig \
--disable-apparmor \
--disable-xz \
--disable-zlib \
--disable-bzip2 \
--disable-lz4 \
--disable-pam \
--disable-acl \
--disable-smack \
--disable-gcrypt \
--disable-audit \
--disable-elfutils \
--disable-libcryptsetup \
--disable-qrencode \
--disable-microhttpd \
--disable-gnutls \
--disable-libcurl \
--disable-libidn \
--disable-libiptc \
--disable-binfmt \
--disable-vconsole \
--disable-bootchart \
--disable-quotacheck \
--disable-backlight \
--disable-rfkill \
--disable-logind \
--disable-machined \
--disable-importd \
--disable-hostnamed \
--disable-timedated \
--disable-timesyncd \
--disable-localed \
--disable-coredump \
--disable-polkit \
--disable-networkd \
--disable-efi \
--disable-terminal \
--disable-kdbus \
--disable-gudev \
--disable-manpages \
--disable-hibernate \
--disable-ldconfig \
--disable-tests \
--disable-sysusers \
--disable-dbus \
\
--enable-selinux \
--enable-tmpfiles \
--enable-randomseed \
--enable-split-usr \
--enable-myhostname \
--enable-firstboot \
--enable-resolved \
\
--without-python \
\
--with-debug-shell= \
--with-debug-tty= \
--with-ntp-servers= \
--with-dns-servers= \
--with-telinit= \
--with-sysvinit-path= \
--with-sysvrcnd-path= \
--with-rc-local-script-path-start= \
--with-rc-local-script-path-stop= \
--with-bashcompletiondir= \
--with-zshcompletiondir= \
--with-pamlibdir= \
--with-pamconfdir= \
--with-dbuspolicydir= \
--with-dbussessionservicedir= \
--with-dbussystemservicedir=___
systemd-devel mailing list

Re: [systemd-devel] Failure(s) Building Systemd with --enable-resolved

2015-04-23 Thread Lennart Poettering
On Thu, 23.04.15 09:43, aaron_wri...@selinc.com (aaron_wri...@selinc.com) wrote:

 I cloned down the master branch yesterday and tried to build, but got:
 
 src/shared/random-util.c:26:22: fatal error: sys/auxv.h: No such file or 
 directory
 
 Which is new. Apparently sys/auxv.h was added in eglibc 2.16, and I'm 
 stuck with eglibc 2.15, so that's a new unrelated wrinkle.

See the README, we require 2.16. Please update your glibc first!

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Failure(s) Building Systemd with --enable-resolved

2015-04-23 Thread Lennart Poettering
On Thu, 23.04.15 10:16, aaron_wri...@selinc.com (aaron_wri...@selinc.com) wrote:

 Lennart Poettering lenn...@poettering.net wrote on 04/23/2015 09:59:38 
 AM:
  On Thu, 23.04.15 09:43, aaron_wri...@selinc.com 
  (aaron_wri...@selinc.com) wrote:
  
   I cloned down the master branch yesterday and tried to build, but got:
   
   src/shared/random-util.c:26:22: fatal error: sys/auxv.h: No such file 
 or 
   directory
   
   Which is new. Apparently sys/auxv.h was added in eglibc 2.16, and 
 I'm 
   stuck with eglibc 2.15, so that's a new unrelated wrinkle.
  
  See the README, we require 2.16. Please update your glibc first!
  
 
 Well, yeah, now systemd requires 2.16, but 219 doesn't, unless that was an 
 oversight.

Yeah, it kinda was. See 3dd26f3e3aa7fa0696d304e14551362133dd281f.

That said, if this is just about IP_UNICAST_IF, I'd be willing to
merge a patch that adds this to missing.h

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Failure(s) Building Systemd with --enable-resolved

2015-04-23 Thread Lennart Poettering
On Thu, 23.04.15 09:21, aaron_wri...@selinc.com (aaron_wri...@selinc.com) wrote:

   After I got pass the first error, I now get this:
   
 CC src/resolve/resolved-dns-cache.o
   src/resolve/resolved-dns-scope.c: In function ?dns_scope_tcp_socket?:
   src/resolve/resolved-dns-scope.c:260:56: error: ?IP_UNICAST_IF? 
 undeclared 
   (first use in this function)
   src/resolve/resolved-dns-scope.c:260:56: note: each undeclared 
 identifier 
   is reported only once for each function it appears in
  It was in kernel 3.4. What kernel headers are you using?
  
  Zbyszek
 
 You're right. I'm using Kernel 3.10. I didn't have the right 
 linux-libc-dev package installed. So now IP_UNICAST_IF is defined in 
 /usr/include/linux/in.h, but that doesn't fix the compile errors. I can't 
 include linux/in.h directly as that'll cause all sorts of redefinition 
 errors with netinet/in.h. I'm not sure what is supposed to include 
 linux/in.h for me. Including netinet/in.h doesn't fix it, as it 
 doesn't define IP_UNICAST_IF.
 
 I ended up adding #define IP_UNICAST_IF 50 to the top of 
 src/resolve/resolved-dns-scope.c and src/resolve/resolved-dns-stream.c, 
 which is a little hackish, but at leasts gets it to compile.

Which glibc version are you using?

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Failure(s) Building Systemd with --enable-resolved

2015-04-23 Thread Aaron_Wright
Lennart Poettering lenn...@poettering.net wrote on 04/23/2015 09:59:38 
AM:
 On Thu, 23.04.15 09:43, aaron_wri...@selinc.com 
 (aaron_wri...@selinc.com) wrote:
 
  I cloned down the master branch yesterday and tried to build, but got:
  
  src/shared/random-util.c:26:22: fatal error: sys/auxv.h: No such file 
or 
  directory
  
  Which is new. Apparently sys/auxv.h was added in eglibc 2.16, and 
I'm 
  stuck with eglibc 2.15, so that's a new unrelated wrinkle.
 
 See the README, we require 2.16. Please update your glibc first!
 

Well, yeah, now systemd requires 2.16, but 219 doesn't, unless that was an 
oversight.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Failure(s) Building Systemd with --enable-resolved

2015-04-23 Thread Aaron_Wright
Lennart Poettering lenn...@poettering.net wrote on 04/23/2015 10:35:12 
AM:
 On Thu, 23.04.15 10:16, aaron_wri...@selinc.com 
 (aaron_wri...@selinc.com) wrote:
 
  Lennart Poettering lenn...@poettering.net wrote on 04/23/2015 
09:59:38 
  AM:
   On Thu, 23.04.15 09:43, aaron_wri...@selinc.com 
   (aaron_wri...@selinc.com) wrote:
   
I cloned down the master branch yesterday and tried to build, but 
got:

src/shared/random-util.c:26:22: fatal error: sys/auxv.h: No such 
file 
  or 
directory

Which is new. Apparently sys/auxv.h was added in eglibc 2.16, 
and 
  I'm 
stuck with eglibc 2.15, so that's a new unrelated wrinkle.
   
   See the README, we require 2.16. Please update your glibc first!
   
  
  Well, yeah, now systemd requires 2.16, but 219 doesn't, unless that 
was an 
  oversight.
 
 Yeah, it kinda was. See 3dd26f3e3aa7fa0696d304e14551362133dd281f.
 
 That said, if this is just about IP_UNICAST_IF, I'd be willing to
 merge a patch that adds this to missing.h
 

I wouldn't worry too much about it. I just need to figure out how to 
upgrade my stuff.___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Failure(s) Building Systemd with --enable-resolved

2015-04-22 Thread Lennart Poettering
On Tue, 21.04.15 08:39, aaron_wri...@selinc.com (aaron_wri...@selinc.com) wrote:

 I've been getting a few problems building systemd with --enable-resolved
 . Any help would be very welcomed. I don't have any problems when 
 compiling with --disable-resolved.
 
 The first problem I got was this:
 
   CCLD   libnss_resolve.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/cc03x1nN.ltrans6.ltrans.o: In function `bus_error_name_to_errno.4725
 ':
 cc03x1nN.ltrans6.o:(.text+0x12bb): undefined reference to 
 `__stop_BUS_ERROR_MAP'
 cc03x1nN.ltrans6.o:(.text+0x12c2): undefined reference to 
 `__start_BUS_ERROR_MAP'
 collect2: ld returned 1 exit status

Kay made some changes to the build system for this. Can you check if
this part works now for you?

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Failure(s) Building Systemd with --enable-resolved

2015-04-21 Thread Aaron_Wright
I've been getting a few problems building systemd with --enable-resolved
. Any help would be very welcomed. I don't have any problems when 
compiling with --disable-resolved.

The first problem I got was this:

  CCLD   libnss_resolve.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/cc03x1nN.ltrans6.ltrans.o: In function `bus_error_name_to_errno.4725
':
cc03x1nN.ltrans6.o:(.text+0x12bb): undefined reference to 
`__stop_BUS_ERROR_MAP'
cc03x1nN.ltrans6.o:(.text+0x12c2): undefined reference to 
`__start_BUS_ERROR_MAP'
collect2: ld returned 1 exit status

I got around this be removing -flto from OUR_CFLAGS in the Makefile. 
How is that change going to impact systemd? Is there a better way to work 
around this problem?

After I got pass the first error, I now get this:

  CC src/resolve/resolved-dns-cache.o
src/resolve/resolved-dns-scope.c: In function ?dns_scope_tcp_socket?:
src/resolve/resolved-dns-scope.c:260:56: error: ?IP_UNICAST_IF? undeclared 
(first use in this function)
src/resolve/resolved-dns-scope.c:260:56: note: each undeclared identifier 
is reported only once for each function it appears in

I'm not sure what to do about this one. Ideas?

Versions (Upgrading is not trivial. Patching is much easier.):

GNU ld (GNU Binutils for Ubuntu) 2.22
gcc-4.6.real (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Failure(s) Building Systemd with --enable-resolved

2015-04-21 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Apr 21, 2015 at 08:39:35AM -0700, aaron_wri...@selinc.com wrote:
 I've been getting a few problems building systemd with --enable-resolved
 . Any help would be very welcomed. I don't have any problems when 
 compiling with --disable-resolved.
 
 The first problem I got was this:
 
   CCLD   libnss_resolve.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/cc03x1nN.ltrans6.ltrans.o: In function `bus_error_name_to_errno.4725
 ':
 cc03x1nN.ltrans6.o:(.text+0x12bb): undefined reference to 
 `__stop_BUS_ERROR_MAP'
 cc03x1nN.ltrans6.o:(.text+0x12c2): undefined reference to 
 `__start_BUS_ERROR_MAP'
 collect2: ld returned 1 exit status
 
 I got around this be removing -flto from OUR_CFLAGS in the Makefile. 
 How is that change going to impact systemd? Is there a better way to work 
 around this problem?
Afaik nobody has measured that. It will certainly make your compilation
times much shorter :)

 After I got pass the first error, I now get this:
 
   CC src/resolve/resolved-dns-cache.o
 src/resolve/resolved-dns-scope.c: In function ?dns_scope_tcp_socket?:
 src/resolve/resolved-dns-scope.c:260:56: error: ?IP_UNICAST_IF? undeclared 
 (first use in this function)
 src/resolve/resolved-dns-scope.c:260:56: note: each undeclared identifier 
 is reported only once for each function it appears in
It was in kernel 3.4. What kernel headers are you using?

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel