Re: libsystemd not found an error

2018-08-01 Thread Yoshi Horigome via Unbound-users
Hello Wouter-san,

I confirmed that it can be built with svn @r4824.
Thank you for your response and advice.

Best regards.

2018年8月1日(水) 22:51 Wouter Wijngaards :
>
> Hi Yoshi Horigome,
>
>
> On 01/08/18 15:44, Yoshi Horigome wrote:
> > Hello Wouter-san,
> >
> > Thank you for your reply and information.
> > I am running this build in the following environment.
>
> I see this version of Debian is not at that version for systemd.  Okay,
> I have applied the patch I proposed previously to the unbound source, so
> that unbound can build for that system.  Thank you for checking the
> version numbers.
>
> Best regards, Wouter
>
> >
> > $ uname -mrs
> > Linux 4.14.18-sunxi armv7l
> > $ lsb_release -a
> > No LSB modules are available.
> > Distributor ID: Debian
> > Description:Debian GNU/Linux 9.5 (stretch)
> > Release:9.5
> > Codename:   stretch
> >
> > The version of systemd in this environment was 232.
> >
> > $ dpkg -l | grep systemd
> > ii  libpam-systemd:armhf  232-25+deb9u4
> > armhfsystem and service manager - PAM module
> > ii  libsystemd-dev:armhf  232-25+deb9u4
> > armhfsystemd utility library - development files
> > ii  libsystemd0:armhf 232-25+deb9u4
> > armhfsystemd utility library
> > ii  python-systemd233-1
> > armhfPython 2 bindings for systemd
> > ii  python3-systemd   233-1
> > armhfPython 3 bindings for systemd
> > ii  systemd   232-25+deb9u4
> > armhfsystem and service manager
> > ii  systemd-sysv  232-25+deb9u4
> > armhfsystem and service manager - SysV links
> >
> > I checked the debian repository, but this seems to be the latest at the 
> > moment.
> > In the debian environment, do you think that build can not be built
> > with systemd enabled?
> >
> > Best regards.
> >
> > 2018年7月31日(火) 23:57 Wouter Wijngaards via Unbound-users
> > :
> >> Hi Yoshihito Horigome,
> >>
> >> On 07/31/2018 04:43 PM, Yoshihito Horigome via Unbound-users wrote:
> >>> Hello,
> >>>
> >>> Wouter-san,
> >>>
> >>> I delayed to reply.
> >>>
> >>> When pkg-config is specified as below, configure now passes.
> >> It is nice that configure works.
> >>
> >> The sd_is_socket_sockaddr function was added in Dec 14, 2016
> >> https://github.com/systemd/systemd/commit/f6f372d2f46ac9be7cbb1ecd8f82f1b3ab669924#diff-cc45620f66c43ebd347d5d003647520e
> >> It could be that the systemd that you use does not have that commit yet
> >> and thus does not have the API?  The v233 tag makes me think that
> >> systemd 2.3.3 has the feature introduced.
> >>
> >> Are you interested in using the socket activation code?  Because I got
> >> replies for the NSD daemon that systemd socket activation is not useful
> >> for DNS servers and the code has bugs (and I want to remove bugs).  It
> >> is possible to not use the sockaddr code, but I wanted to add more
> >> checking to remove potential bugs.  If you use systemd, perhaps you can
> >> tell me what is actually useful for systemd users; and then I'll use
> >> that version of the systemd_get_activated routine.
> >>
> >> The code repository version should howevery have much better readiness
> >> signalling for systemd, I took it out of a signal handler and rewrote it
> >> elsewhere to only get enabled when the use-systemd config option in
> >> unbound.conf is set to yes.
> >>
> >> If you need code without the sockaddr check, here is the patch:
> >>
> >>
> >> Index: services/listen_dnsport.c
> >> ===
> >> --- services/listen_dnsport.c   (revision 4820)
> >> +++ services/listen_dnsport.c   (working copy)
> >> @@ -144,17 +144,8 @@
> >>
> >> for(i = 0; i < r; i++) {
> >> if(sd_is_socket(SD_LISTEN_FDS_START + i, family, socktype, 
> >> listen)) {
> >> -   if( (family == AF_INET || family == AF_INET6) ) {
> >> -   if(sd_is_socket_sockaddr(
> >> -   SD_LISTEN_FDS_START + i, family,
> >> -   addr, addrlen)) {
> >> -   s = SD_LISTEN_FDS_START + i;
> >> -   break;
> >> -   }
> >> -   } else {
> >> -   s = SD_LISTEN_FDS_START + i;
> >> -   break;
> >> -   }
> >> +   s = SD_LISTEN_FDS_START + i;
> >> +   break;
> >> }
> >> }
> >> if (s == -1) {
> >>
> >>
> >> Best regards, Wouter
> >>
> >>
> >>> $ sudo ./configure --with-libevent --with-ssl --disable-static
> >>> --sysconfdir=/etc/unbound --with-conf-file=/etc/unbound/unbound.conf
> >>> --with-pidfile=/var/run/unbound.pid --enable-pie --enable-systemd
> >>> --disable-rpath --enable-subnet 

Re: libsystemd not found an error

2018-08-01 Thread Wouter Wijngaards via Unbound-users
Hi Yoshi Horigome,


On 01/08/18 15:44, Yoshi Horigome wrote:
> Hello Wouter-san,
>
> Thank you for your reply and information.
> I am running this build in the following environment.

I see this version of Debian is not at that version for systemd.  Okay,
I have applied the patch I proposed previously to the unbound source, so
that unbound can build for that system.  Thank you for checking the
version numbers.

Best regards, Wouter

>
> $ uname -mrs
> Linux 4.14.18-sunxi armv7l
> $ lsb_release -a
> No LSB modules are available.
> Distributor ID: Debian
> Description:Debian GNU/Linux 9.5 (stretch)
> Release:9.5
> Codename:   stretch
>
> The version of systemd in this environment was 232.
>
> $ dpkg -l | grep systemd
> ii  libpam-systemd:armhf  232-25+deb9u4
> armhfsystem and service manager - PAM module
> ii  libsystemd-dev:armhf  232-25+deb9u4
> armhfsystemd utility library - development files
> ii  libsystemd0:armhf 232-25+deb9u4
> armhfsystemd utility library
> ii  python-systemd233-1
> armhfPython 2 bindings for systemd
> ii  python3-systemd   233-1
> armhfPython 3 bindings for systemd
> ii  systemd   232-25+deb9u4
> armhfsystem and service manager
> ii  systemd-sysv  232-25+deb9u4
> armhfsystem and service manager - SysV links
>
> I checked the debian repository, but this seems to be the latest at the 
> moment.
> In the debian environment, do you think that build can not be built
> with systemd enabled?
>
> Best regards.
>
> 2018年7月31日(火) 23:57 Wouter Wijngaards via Unbound-users
> :
>> Hi Yoshihito Horigome,
>>
>> On 07/31/2018 04:43 PM, Yoshihito Horigome via Unbound-users wrote:
>>> Hello,
>>>
>>> Wouter-san,
>>>
>>> I delayed to reply.
>>>
>>> When pkg-config is specified as below, configure now passes.
>> It is nice that configure works.
>>
>> The sd_is_socket_sockaddr function was added in Dec 14, 2016
>> https://github.com/systemd/systemd/commit/f6f372d2f46ac9be7cbb1ecd8f82f1b3ab669924#diff-cc45620f66c43ebd347d5d003647520e
>> It could be that the systemd that you use does not have that commit yet
>> and thus does not have the API?  The v233 tag makes me think that
>> systemd 2.3.3 has the feature introduced.
>>
>> Are you interested in using the socket activation code?  Because I got
>> replies for the NSD daemon that systemd socket activation is not useful
>> for DNS servers and the code has bugs (and I want to remove bugs).  It
>> is possible to not use the sockaddr code, but I wanted to add more
>> checking to remove potential bugs.  If you use systemd, perhaps you can
>> tell me what is actually useful for systemd users; and then I'll use
>> that version of the systemd_get_activated routine.
>>
>> The code repository version should howevery have much better readiness
>> signalling for systemd, I took it out of a signal handler and rewrote it
>> elsewhere to only get enabled when the use-systemd config option in
>> unbound.conf is set to yes.
>>
>> If you need code without the sockaddr check, here is the patch:
>>
>>
>> Index: services/listen_dnsport.c
>> ===
>> --- services/listen_dnsport.c   (revision 4820)
>> +++ services/listen_dnsport.c   (working copy)
>> @@ -144,17 +144,8 @@
>>
>> for(i = 0; i < r; i++) {
>> if(sd_is_socket(SD_LISTEN_FDS_START + i, family, socktype, 
>> listen)) {
>> -   if( (family == AF_INET || family == AF_INET6) ) {
>> -   if(sd_is_socket_sockaddr(
>> -   SD_LISTEN_FDS_START + i, family,
>> -   addr, addrlen)) {
>> -   s = SD_LISTEN_FDS_START + i;
>> -   break;
>> -   }
>> -   } else {
>> -   s = SD_LISTEN_FDS_START + i;
>> -   break;
>> -   }
>> +   s = SD_LISTEN_FDS_START + i;
>> +   break;
>> }
>> }
>> if (s == -1) {
>>
>>
>> Best regards, Wouter
>>
>>
>>> $ sudo ./configure --with-libevent --with-ssl --disable-static
>>> --sysconfdir=/etc/unbound --with-conf-file=/etc/unbound/unbound.conf
>>> --with-pidfile=/var/run/unbound.pid --enable-pie --enable-systemd
>>> --disable-rpath --enable-subnet PKG_CONFIG="/usr/bin/pkg-config"
>>>
>>> However, when you run make, it will be build failed on the way as follows.
>>>
>>> event -lcrypto -lsystemd -pthread
>>> /usr/bin/ld: error: undefined symbol: sd_is_socket_sockaddr
>> referenced by listen_dnsport.c:148 (services/listen_dnsport.c:148)
>> .libs/listen_dnsport.o:(systemd_get_activated)
>>> collect2: error: ld returned 1 exit status
>>> Makefile:322: 

Re: libsystemd not found an error

2018-08-01 Thread Yoshi Horigome via Unbound-users
Hello Wouter-san,

Thank you for your reply and information.
I am running this build in the following environment.

$ uname -mrs
Linux 4.14.18-sunxi armv7l
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:Debian GNU/Linux 9.5 (stretch)
Release:9.5
Codename:   stretch

The version of systemd in this environment was 232.

$ dpkg -l | grep systemd
ii  libpam-systemd:armhf  232-25+deb9u4
armhfsystem and service manager - PAM module
ii  libsystemd-dev:armhf  232-25+deb9u4
armhfsystemd utility library - development files
ii  libsystemd0:armhf 232-25+deb9u4
armhfsystemd utility library
ii  python-systemd233-1
armhfPython 2 bindings for systemd
ii  python3-systemd   233-1
armhfPython 3 bindings for systemd
ii  systemd   232-25+deb9u4
armhfsystem and service manager
ii  systemd-sysv  232-25+deb9u4
armhfsystem and service manager - SysV links

I checked the debian repository, but this seems to be the latest at the moment.
In the debian environment, do you think that build can not be built
with systemd enabled?

Best regards.

2018年7月31日(火) 23:57 Wouter Wijngaards via Unbound-users
:
>
> Hi Yoshihito Horigome,
>
> On 07/31/2018 04:43 PM, Yoshihito Horigome via Unbound-users wrote:
> > Hello,
> >
> > Wouter-san,
> >
> > I delayed to reply.
> >
> > When pkg-config is specified as below, configure now passes.
>
> It is nice that configure works.
>
> The sd_is_socket_sockaddr function was added in Dec 14, 2016
> https://github.com/systemd/systemd/commit/f6f372d2f46ac9be7cbb1ecd8f82f1b3ab669924#diff-cc45620f66c43ebd347d5d003647520e
> It could be that the systemd that you use does not have that commit yet
> and thus does not have the API?  The v233 tag makes me think that
> systemd 2.3.3 has the feature introduced.
>
> Are you interested in using the socket activation code?  Because I got
> replies for the NSD daemon that systemd socket activation is not useful
> for DNS servers and the code has bugs (and I want to remove bugs).  It
> is possible to not use the sockaddr code, but I wanted to add more
> checking to remove potential bugs.  If you use systemd, perhaps you can
> tell me what is actually useful for systemd users; and then I'll use
> that version of the systemd_get_activated routine.
>
> The code repository version should howevery have much better readiness
> signalling for systemd, I took it out of a signal handler and rewrote it
> elsewhere to only get enabled when the use-systemd config option in
> unbound.conf is set to yes.
>
> If you need code without the sockaddr check, here is the patch:
>
>
> Index: services/listen_dnsport.c
> ===
> --- services/listen_dnsport.c   (revision 4820)
> +++ services/listen_dnsport.c   (working copy)
> @@ -144,17 +144,8 @@
>
> for(i = 0; i < r; i++) {
> if(sd_is_socket(SD_LISTEN_FDS_START + i, family, socktype, 
> listen)) {
> -   if( (family == AF_INET || family == AF_INET6) ) {
> -   if(sd_is_socket_sockaddr(
> -   SD_LISTEN_FDS_START + i, family,
> -   addr, addrlen)) {
> -   s = SD_LISTEN_FDS_START + i;
> -   break;
> -   }
> -   } else {
> -   s = SD_LISTEN_FDS_START + i;
> -   break;
> -   }
> +   s = SD_LISTEN_FDS_START + i;
> +   break;
> }
> }
> if (s == -1) {
>
>
> Best regards, Wouter
>
>
> >
> > $ sudo ./configure --with-libevent --with-ssl --disable-static
> > --sysconfdir=/etc/unbound --with-conf-file=/etc/unbound/unbound.conf
> > --with-pidfile=/var/run/unbound.pid --enable-pie --enable-systemd
> > --disable-rpath --enable-subnet PKG_CONFIG="/usr/bin/pkg-config"
> >
> > However, when you run make, it will be build failed on the way as follows.
> >
> > event -lcrypto -lsystemd -pthread
> > /usr/bin/ld: error: undefined symbol: sd_is_socket_sockaddr
>  referenced by listen_dnsport.c:148 (services/listen_dnsport.c:148)
>  .libs/listen_dnsport.o:(systemd_get_activated)
> > collect2: error: ld returned 1 exit status
> > Makefile:322: recipe for target 'unbound' failed
> > make: *** [unbound] Error 1
> >
> > I am also worried about warnings appearing on the way as follows.
> >
> > services/listen_dnsport.c: In function ‘systemd_get_activated’:
> > services/listen_dnsport.c:148:8: warning: implicit declaration of
> > function ‘sd_is_socket_sockaddr’ [-Wimplicit-function-declaration]
> > if(sd_is_socket_sockaddr(
> > ^
> >
> > I tried it with commit of