NetBSD Problem Report #52599

From bjjl@web.mx.plus  Sat Oct  7 22:47:55 2017
Return-Path: <bjjl@web.mx.plus>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 315C77A173
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  7 Oct 2017 22:47:55 +0000 (UTC)
Message-Id: <20171007212717.BD6A46C@web.mx.plus>
Date: Sat,  7 Oct 2017 23:27:17 +0200 (CEST)
From: ben@pocket.services
To: gnats-bugs@gnats.NetBSD.org
Subject: redis does not build
X-Send-Pr-Version: 3.95

>Number:         52599
>Category:       pkg
>Synopsis:       build error for redis package
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    fhajny
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 07 22:50:00 +0000 2017
>Closed-Date:    
>Last-Modified:  Sun May 13 05:01:25 +0000 2018
>Originator:     Benjamin Lorenz
>Release:        NetBSD 6.1_STABLE
>Organization:

>Environment:


System: NetBSD web.mx.plus 6.1_STABLE NetBSD 6.1_STABLE (GENERIC) #0: Sat Sep 9 20:15:08 CEST 2017 bjjl@web.mx.plus:/data/stable/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:

hyperloglog.o: In function `hllCount':
/data/stable/pkgsrc/databases/redis/work/redis-4.0.1/src/hyperloglog.c:1015: undefined reference to `llroundl'
Makefile:204: recipe for target 'redis-server' failed
gmake[1]: *** [redis-server] Error 1
gmake[1]: Leaving directory '/data/stable/pkgsrc/databases/redis/work/redis-4.0.1/src'
Makefile:6: recipe for target 'all' failed
gmake: *** [all] Error 2
*** Error code 2

Stop.
make: stopped in /data/stable/pkgsrc/databases/redis
*** Error code 1


>How-To-Repeat:

>Fix:


>Release-Note:

>Audit-Trail:
From: Benjamin Lorenz <ben@pocket.services>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52599: redis does not build
Date: Sun, 8 Oct 2017 09:43:15 +0200

 --=-SBNl78q+ACMqT0n9LI1z
 Content-Type: text/plain; charset="utf-8"
 Content-Transfer-Encoding: quoted-printable

 Looks like a problem with netbsd-6=C2=A0


 trying to build with gcc 4.8 yields new errors about


 undefined reference to __stack_chk_fail_local



 =

 --=-SBNl78q+ACMqT0n9LI1z
 Content-Type: text/html; charset="utf-8"

 <html><head></head><body>Looks like a problem with netbsd-6&nbsp;<div><br></div><div>trying to build with gcc 4.8 yields new errors about</div><div><br></div><div>undefined reference to __stack_chk_fail_local</div><div><br></div><div><br></div></body></html>
 --=-SBNl78q+ACMqT0n9LI1z--

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52599: redis does not build
Date: Tue, 20 Feb 2018 09:04:05 +0000

 On Sun, Oct 08, 2017 at 07:45:01AM +0000, Benjamin Lorenz wrote:
  >  trying to build with gcc 4.8 yields new errors about
  >  
  >  
  >  undefined reference to __stack_chk_fail_local

 this part should be fixed (see 52594), dunno about llroundl().

 -- 
 David A. Holland
 dholland@netbsd.org

From: Matthias Petermann <mp@petermann-it.de>
To: gnats-bugs@NetBSD.org
Cc: ben@pocket.services
Subject: Re: pkg/52599
Date: Fri, 13 Apr 2018 20:05:39 +0200

 Hello,

 the cause of this problem is that in NetBSD versions less than 7.99.71, 
 the llroundl function is missing in the libm. Hereby, I submit a patch 
 that emulates the missing function on these systems by casting the 
 return value of the existing function roundl to long long int.

 A comparable implementation is also found in the libgfortran of gcc, for 
 example:

 https://github.com/gcc-mirror/gcc/blob/4910e96964a257b8414783a70675b1ca1c141834/libgfortran/intrinsics/c99_functions.c#L718

 I have tested the patch on NetBSD 7.1.2. The Redis test suite runs 
 without any complaints (make test).

 I'd be happy if one of the committers could review and commit to HEAD 
 and the 2018Q1 branch.

 Kind regards,
 Matthias

 Patch:
 --------->8---------------------------------------------------------------------------------

 diff -ruN redis.orig/Makefile redis/Makefile
 --- redis.orig/Makefile	2018-04-13 16:27:37.000000000 +0000
 +++ redis/Makefile	2018-04-13 16:29:05.000000000 +0000
 @@ -1,6 +1,7 @@
   # $NetBSD: Makefile,v 1.36 2018/02/04 17:13:05 fhajny Exp $

   DISTNAME=	redis-4.0.8
 +PKGREVISION=	1
   CATEGORIES=	databases
   MASTER_SITES=	http://download.redis.io/releases/

 diff -ruN redis.orig/distinfo redis/distinfo
 --- redis.orig/distinfo	2018-04-13 16:27:37.000000000 +0000
 +++ redis/distinfo	2018-04-13 16:37:04.000000000 +0000
 @@ -6,4 +6,5 @@
   Size (redis-4.0.8.tar.gz) = 1729973 bytes
   SHA1 (patch-ab) = f8d2d20a5ae49ecd49a452b6e260f5a37b0d52e0
   SHA1 (patch-ac) = 1d848860a39af7a93a06eb8f3001fe89cb1bb3ad
 +SHA1 (patch-src_hyperloglog.c) = 57ca74b5a63c5bafb10f6b850f672eedf193fb11
   SHA1 (patch-src_object.c) = 30ffaec9c7e6135e3a5576cd1a35d7bcec668299
 diff -ruN redis.orig/patches/patch-src_hyperloglog.c 
 redis/patches/patch-src_hyperloglog.c
 --- redis.orig/patches/patch-src_hyperloglog.c	1970-01-01 
 00:00:00.000000000 +0000
 +++ redis/patches/patch-src_hyperloglog.c	2018-04-13 16:36:06.000000000 
 +0000
 @@ -0,0 +1,21 @@
 +$NetBSD$
 +
 +--- src/hyperloglog.c.orig	2018-04-13 16:30:09.000000000 +0000
 ++++ src/hyperloglog.c
 +@@ -34,6 +34,16 @@
 + #include <stdint.h>
 + #include <math.h>
 +
 ++#ifdef __NetBSD__
 ++#include <sys/param.h>
 ++#if __NetBSD_Version__ < 799007200
 ++/* llroundl not present in NetBSD libm before 7.99.71 */
 ++long long int llroundl (long double x) {
 ++    return (long long int) roundl (x);
 ++}
 ++#endif
 ++#endif
 ++
 + /* The Redis HyperLogLog implementation is based on the following ideas:
 +  *
 +  * * The use of a 64 bit hash function as proposed in [1], in order to 
 don't

 --------->8---------------------------------------------------------------------------------


 -- 
 Matthias Petermann <matthias@petermann-it.de> | www.petermann-it.de
 GnuPG: 0x5C3E6D75 | 5930 86EF 7965 2BBA 6572  C3D7 7B1D A3C3 5C3E 6D75

From: Matthias Petermann <matthias@petermann-it.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52599
Date: Sun, 15 Apr 2018 23:47:03 +0200

 This is the aforementioned patch as uuencoded text:

 begin-base64 644 redis.patch
 ZGlmZiAtcnVOIHJlZGlzLm9yaWcvTWFrZWZpbGUgcmVkaXMvTWFrZWZpbGUKLS0t
 IHJlZGlzLm9yaWcvTWFrZWZpbGUJMjAxOC0wNC0xMyAxNjoyNzozNy4wMDAwMDAw
 MDAgKzAwMDAKKysrIHJlZGlzL01ha2VmaWxlCTIwMTgtMDQtMTMgMTY6Mjk6MDUu
 MDAwMDAwMDAwICswMDAwCkBAIC0xLDYgKzEsNyBAQAogIyAkTmV0QlNEOiBNYWtl
 ZmlsZSx2IDEuMzYgMjAxOC8wMi8wNCAxNzoxMzowNSBmaGFqbnkgRXhwICQKIAog
 RElTVE5BTUU9CXJlZGlzLTQuMC44CitQS0dSRVZJU0lPTj0JMQogQ0FURUdPUklF
 Uz0JZGF0YWJhc2VzCiBNQVNURVJfU0lURVM9CWh0dHA6Ly9kb3dubG9hZC5yZWRp
 cy5pby9yZWxlYXNlcy8KIApkaWZmIC1ydU4gcmVkaXMub3JpZy9kaXN0aW5mbyBy
 ZWRpcy9kaXN0aW5mbwotLS0gcmVkaXMub3JpZy9kaXN0aW5mbwkyMDE4LTA0LTEz
 IDE2OjI3OjM3LjAwMDAwMDAwMCArMDAwMAorKysgcmVkaXMvZGlzdGluZm8JMjAx
 OC0wNC0xMyAxNjozNzowNC4wMDAwMDAwMDAgKzAwMDAKQEAgLTYsNCArNiw1IEBA
 CiBTaXplIChyZWRpcy00LjAuOC50YXIuZ3opID0gMT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0QlNEX1ZlcnNpb25fXyA8IDc5
 OTAwNzIwMAorKy8qIGxscm91bmRsIG5vdCBwcmVzZW50IGluIE5ldEJTRCBsaWJt
 IGJlZm9yZSA3Ljk5LjcxICovCisrbG9uZyBsb25nIGludCBsbHJvdW5kbCAobG9u
 ZyBkb3VibGUgeCkgeworKyAgICByZXR1cm4gKGxvbmcgbG9uZyBpbnQpIHJvdW5k
 bCAoeCk7CisrfQorKyNlbmRpZgorKyNlbmRpZgorKworIC8qIFRoZSBSZWRpcyBI
 eXBlckxvZ0xvZyBpbXBsZW1lbnRhdGlvbiBpcyBiYXNlZCBvbiB0aGUgZm9sbG93
 aW5nIGlkZWFzOgorICAqCisgICogKiBUaGUgdXNlIG9mIGEgNjQgYml0IGhhc2gg
 ZnVuY3Rpb24gYXMgcHJvcG9zZWQgaW4gWzFdLCBpbiBvcmRlciB0byBkb24ndAo=
 ====

 Looking forward to unbreak the Redis build for NetBSD 7 users.

 Kind regards,
 Matthias

 -- 
 Matthias Petermann <matthias@petermann-it.de> | www.petermann-it.de
 GnuPG: 0x5C3E6D75 | 5930 86EF 7965 2BBA 6572  C3D7 7B1D A3C3 5C3E 6D75

Responsible-Changed-From-To: pkg-manager->fhajny
Responsible-Changed-By: leot@NetBSD.org
Responsible-Changed-When: Mon, 23 Apr 2018 12:42:24 +0000
Responsible-Changed-Why:
Filip, can you please give it a look?
(over to MAINTAINER)


From: Filip Hajny <filip@joyent.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52599 (build error for redis package)
Date: Mon, 23 Apr 2018 16:58:24 +0200

 Looks good enough for me. Committed, thanks!

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 28 Apr 2018 08:42:10 +0000
State-Changed-Why:
The patch was committed; does it work now?


From: Benjamin Lorenz <ben@pocket.services>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52599 (build error for redis package)
Date: Sat, 12 May 2018 13:08:08 +0200

 --Apple-Mail=_B30CCE8D-4D04-470A-BB67-2BEFDDAC3711
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=us-ascii

 not yet on NetBSD 6:

     LINK redis-server
 hyperloglog.o: In function `llroundl':
 =
 /data/unstable/pkgsrc/databases/redis/work/redis-4.0.9/src/hyperloglog.c:4=
 2: undefined reference to `roundl'
 =
 /data/unstable/pkgsrc/databases/redis/work/redis-4.0.9/src/hyperloglog.c:4=
 2: undefined reference to `roundl'
 Makefile:204: recipe for target 'redis-server' failed
 gmake[1]: *** [redis-server] Error 1
 gmake[1]: Leaving directory =
 '/data/unstable/pkgsrc/databases/redis/work/redis-4.0.9/src'
 Makefile:6: recipe for target 'all' failed
 gmake: *** [all] Error 2
 *** Error code 2


 > On 28. Apr 2018, at 10:42, dholland@NetBSD.org wrote:
 >=20
 > Synopsis: build error for redis package
 >=20
 > State-Changed-From-To: open->feedback
 > State-Changed-By: dholland@NetBSD.org
 > State-Changed-When: Sat, 28 Apr 2018 08:42:10 +0000
 > State-Changed-Why:
 > The patch was committed; does it work now?
 >=20
 >=20
 >=20


 --Apple-Mail=_B30CCE8D-4D04-470A-BB67-2BEFDDAC3711
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/html;
 	charset=us-ascii

 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
 charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
 -webkit-nbsp-mode: space; line-break: after-white-space;" class=3D"">not =
 yet on NetBSD 6:<div class=3D""><br class=3D""></div><div class=3D""><div =
 style=3D"margin: 0px; font-stretch: normal; font-size: 13px; =
 line-height: normal; font-family: Menlo; color: rgb(204, 204, 204); =
 background-color: rgb(255, 255, 255);" class=3D""><span =
 style=3D"font-variant-ligatures: no-common-ligatures; color: #000000" =
 class=3D"">&nbsp; &nbsp;&nbsp;</span><span =
 style=3D"font-variant-ligatures: no-common-ligatures; color: #5230e1" =
 class=3D"">LINK</span><span =
 style=3D"font-variant-ligatures: no-common-ligatures; color: #000000" =
 class=3D""> </span><span style=3D"font-variant-ligatures: =
 no-common-ligatures" class=3D""><b =
 class=3D"">redis-server</span></div><div style=3D"margin: 0px; =
 font-stretch: normal; font-size: 13px; line-height: normal; font-family: =
 Menlo; background-color: rgb(255, 255, 255);" class=3D""><span =
 style=3D"font-variant-ligatures: no-common-ligatures" =
 class=3D"">hyperloglog.o: In function `llroundl':</span></div><div =
 style=3D"margin: 0px; font-stretch: normal; font-size: 13px; =
 line-height: normal; font-family: Menlo; background-color: rgb(255, 255, =
 255);" class=3D""><span style=3D"font-variant-ligatures: =
 no-common-ligatures" =
 class=3D"">/data/unstable/pkgsrc/databases/redis/work/redis-4.0.9/src/hype=
 rloglog.c:42: undefined reference to `roundl'</span></div><div =
 style=3D"margin: 0px; font-stretch: normal; font-size: 13px; =
 line-height: normal; font-family: Menlo; background-color: rgb(255, 255, =
 255);" class=3D""><span style=3D"font-variant-ligatures: =
 no-common-ligatures" =
 class=3D"">/data/unstable/pkgsrc/databases/redis/work/redis-4.0.9/src/hype=
 rloglog.c:42: undefined reference to `roundl'</span></div><div =
 style=3D"margin: 0px; font-stretch: normal; font-size: 13px; =
 line-height: normal; font-family: Menlo; background-color: rgb(255, 255, =
 255);" class=3D""><span style=3D"font-variant-ligatures: =
 no-common-ligatures" class=3D"">Makefile:204: recipe for target =
 'redis-server' failed</span></div><div style=3D"margin: 0px; =
 font-stretch: normal; font-size: 13px; line-height: normal; font-family: =
 Menlo; background-color: rgb(255, 255, 255);" class=3D""><span =
 style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">gmake[1]:=
  *** [redis-server] Error 1</span></div><div style=3D"margin: 0px; =
 font-stretch: normal; font-size: 13px; line-height: normal; font-family: =
 Menlo; background-color: rgb(255, 255, 255);" class=3D""><span =
 style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">gmake[1]:=
  Leaving directory =
 '/data/unstable/pkgsrc/databases/redis/work/redis-4.0.9/src'</span></div><=
 div style=3D"margin: 0px; font-stretch: normal; font-size: 13px; =
 line-height: normal; font-family: Menlo; background-color: rgb(255, 255, =
 255);" class=3D""><span style=3D"font-variant-ligatures: =
 no-common-ligatures" class=3D"">Makefile:6: recipe for target 'all' =
 failed</span></div><div style=3D"margin: 0px; font-stretch: normal; =
 font-size: 13px; line-height: normal; font-family: Menlo; =
 background-color: rgb(255, 255, 255);" class=3D""><span =
 style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">gmake: =
 *** [all] Error 2</span></div><div style=3D"margin: 0px; font-stretch: =
 normal; font-size: 13px; line-height: normal; font-family: Menlo; =
 background-color: rgb(255, 255, 255);" class=3D""><span =
 style=3D"font-variant-ligatures: no-common-ligatures" class=3D"">*** =
 Error code 2</span></div><div style=3D"margin: 0px; font-stretch: =
 normal; font-size: 13px; line-height: normal; font-family: Menlo; =
 background-color: rgb(255, 255, 255); min-height: 15px;" class=3D""><span =
 style=3D"font-variant-ligatures: no-common-ligatures" =
 class=3D""></span><br class=3D""></div><div><br class=3D""><blockquote =
 type=3D"cite" class=3D""><div class=3D"">On 28. Apr 2018, at 10:42, <a =
 href=3D"mailto:dholland@NetBSD.org" class=3D"">dholland@NetBSD.org</a> =
 wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><div =
 class=3D"">Synopsis: build error for redis package<br class=3D""><br =
 class=3D"">State-Changed-From-To: open-&gt;feedback<br =
 class=3D"">State-Changed-By: <a href=3D"mailto:dholland@NetBSD.org" =
 class=3D"">dholland@NetBSD.org</a><br class=3D"">State-Changed-When: =
 Sat, 28 Apr 2018 08:42:10 +0000<br class=3D"">State-Changed-Why:<br =
 class=3D"">The patch was committed; does it work now?<br class=3D""><br =
 class=3D""><br class=3D""><br =
 class=3D""></div></div></blockquote></div><br =
 class=3D""></div></body></html>=

 --Apple-Mail=_B30CCE8D-4D04-470A-BB67-2BEFDDAC3711--

State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 13 May 2018 05:01:25 +0000
State-Changed-Why:
Still fails on -6


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.