NetBSD Problem Report #50776
From www@NetBSD.org Sun Feb 7 04:40:02 2016
Return-Path: <www@NetBSD.org>
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 "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id A14EF7A215
for <gnats-bugs@gnats.NetBSD.org>; Sun, 7 Feb 2016 04:40:02 +0000 (UTC)
Message-Id: <20160207044000.C17B37ACBA@mollari.NetBSD.org>
Date: Sun, 7 Feb 2016 04:40:00 +0000 (UTC)
From: davshao@gmail.com
Reply-To: davshao@gmail.com
To: gnats-bugs@NetBSD.org
Subject: databases/sqlite3 add mk/readline.buildlink3.mk to buildlink3.mk for devel/subversion-base
X-Send-Pr-Version: www-1.0
>Number: 50776
>Category: pkg
>Synopsis: databases/sqlite3 add mk/readline.buildlink3.mk to buildlink3.mk for devel/subversion-base
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: wiz
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 07 04:45:00 +0000 2016
>Closed-Date: Tue Dec 13 08:09:04 +0000 2016
>Last-Modified: Thu Aug 02 04:30:00 +0000 2018
>Originator: David Shao
>Release: pkgsrc current
>Organization:
>Environment:
FreeBSD xxxxx.xxx 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r295345+b30e7ad(svn_head): Sat Feb 6 02:30:21 PST 2016 xxxxx@xxxxx.xxx:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
On FreeBSD 11-current amd64, with /usr/pkg/etc/mk.conf settings:
PREFER_PKGSRC= yes
CURSES_DEFAULT=ncurses
READLINE_DEFAULT=readline
devel/subversion-base fails to build with:
cd subversion/libsvn_subr && /bin/sh "/usr/pkgsrc/devel/subversion-base/work/subversion-1.9.3/libtool" --tag=CC --silent --mode=link clang -Werror=unknown-warning-option -g -I/usr/pkg/include -I/usr/pkg/include/apr-1 -I/usr/include -g -I/usr/pkg/include -I/usr/pkg/include/apr-1 -I/usr/include -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -L/usr/pkg/lib -rpath /usr/pkg/lib -version-info 0 -o libsvn_subr-1.la adler32.lo atomic.lo auth.lo base64.lo bit_array.lo cache-inprocess.lo cache-membuffer.lo cache-memcache.lo cache.lo cache_config.lo checksum.lo cmdline.lo compat.lo compress.lo config.lo config_auth.lo config_file.lo config_win.lo crypto.lo ctype.lo date.lo debug.lo deprecated.lo dirent_uri.lo dso.lo eol.lo error.lo fnv1a.lo gpg_agent.lo hash.lo io.lo iter.lo lock.lo log.lo macos_keychain.lo magic.lo md5.lo mergeinfo.lo mutex.lo nls.lo object_pool.lo opt.lo packed_data.lo path.lo pool.lo prefix_string.lo prompt.lo properties.lo quoprint.lo ro
ot_pools.lo simple_providers.lo skel.lo sorts.lo spillbuf.lo sqlite.lo sqlite3wrapper.lo ssl_client_cert_providers.lo ssl_client_cert_pw_providers.lo ssl_server_trust_providers.lo stream.lo string.lo subst.lo sysinfo.lo target.lo temp_serializer.lo time.lo token.lo types.lo user.lo username_providers.lo utf.lo utf8proc.lo utf_validate.lo utf_width.lo validate.lo version.lo win32_crashrpt.lo win32_crypto.lo win32_xlate.lo x509info.lo x509parse.lo xml.lo -L/usr/pkg/lib -laprutil-1 -L/usr/pkg/lib -lapr-1 -lexpat -lz -lsqlite3 -lmagic -lintl -liconv
/usr/bin/ld: cannot find -lreadline
clang: error: linker command failed with exit code 1 (use -v to see invocation)
>How-To-Repeat:
>Fix:
Following the dependencies, for this group of settings in /usr/pkg/etc/mk.conf, there is a dependency on databases/sqlite3 which in turn depends on devel/readline.
In databases/sqlite3's Makefile there is an unconditional
.include "../../mk/readline.buildlink3.mk"
that does not appear in databases/sqlite3/buildlink3.mk
Using the following patch allows devel/subversion-base to build.
--- databases/sqlite3/buildlink3.orig 2015-04-06 12:08:53.000000000 -0700
+++ databases/sqlite3/buildlink3.mk 2016-02-06 20:14:19.710024000 -0800
@@ -16,6 +16,8 @@
.include "../../textproc/icu/buildlink3.mk"
.endif
+.include "../../mk/readline.buildlink3.mk"
+
.endif # SQLITE3_BUILDLINK3_MK
BUILDLINK_TREE+= -sqlite3
>Release-Note:
>Audit-Trail:
From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/50776: databases/sqlite3 add mk/readline.buildlink3.mk to
buildlink3.mk for devel/subversion-base
Date: Sat, 6 Feb 2016 20:57:49 -0800
While we are on the subject of FreeBSD and databases/sqlite3, I am
also using the patch:
--- databases/sqlite3/Makefile 2016-02-06 20:56:04.443223000 -0800
+++ databases/sqlite3/Makefile.new 2016-01-28 07:39:38.000000000 -0800
@@ -56,9 +56,11 @@
.if ${READLINE_TYPE} == "editline" && ${IS_BUILTIN.editline} == "yes"
LDFLAGS.NetBSD+= -ledit
LDFLAGS.DragonFly+= -ledit
+LDFLAGS.FreeBSD+= -ledit
.else
LDFLAGS.NetBSD+= -lreadline
LDFLAGS.DragonFly+= -lreadline
+LDFLAGS.FreeBSD+= -lreadline
.endif
.include "../../mk/dlopen.buildlink3.mk"
Responsible-Changed-From-To: pkg-manager->ryoon
Responsible-Changed-By: ryoon@NetBSD.org
Responsible-Changed-When: Mon, 21 Mar 2016 00:34:38 +0000
Responsible-Changed-Why:
take.
From: "Ryo ONODERA" <ryoon@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50776 CVS commit: pkgsrc/databases/sqlite3
Date: Mon, 21 Mar 2016 00:33:16 +0000
Module Name: pkgsrc
Committed By: ryoon
Date: Mon Mar 21 00:33:16 UTC 2016
Modified Files:
pkgsrc/databases/sqlite3: Makefile
Log Message:
Fix FreeBSD build, apply patch in PR pkg/50776
To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 pkgsrc/databases/sqlite3/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: ryoon@NetBSD.org
State-Changed-When: Mon, 21 Mar 2016 00:35:46 +0000
State-Changed-Why:
Applied. Thank you.
State-Changed-From-To: closed->open
State-Changed-By: ryoon@NetBSD.org
State-Changed-When: Mon, 21 Mar 2016 00:36:39 +0000
State-Changed-Why:
subversion part remains.
From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/50776 (databases/sqlite3 add mk/readline.buildlink3.mk to
buildlink3.mk for devel/subversion-base)
Date: Sun, 4 Dec 2016 18:00:09 -0800
A question about what should be in a buildlink3.mk file.
For DragonFly, I use
PREFER_PKGSRC= yes
CURSES_DEFAULT=ncurses
READLINE_DEFAULT=readline
When I do:
# ldd libsqlite3.so.0.8.6
libsqlite3.so.0.8.6:
libreadline.so.7 => /usr/pkg/lib/libreadline.so.7 (0x800781000)
libncurses.so.6 => /usr/pkg/lib/libncurses.so.6 (0x8007d0000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x80082c000)
libdl.so.0 => /usr/lib/libdl.so.0 (0x8005c9000)
libc.so.8 => /lib/libc.so.8 (0x800458000)
We see that pkgsrc libreadline is linked in.
And for say heimdal:
# ldd libkrb5.so.26.0.0
libkrb5.so.26.0.0:
libheimbase.so.1 => /usr/pkg/lib/libheimbase.so.1 (0x8005c9000)
libhx509.so.5 => /usr/pkg/lib/libhx509.so.5 (0x800730000)
libasn1.so.8 => /usr/pkg/lib/libasn1.so.8 (0x80077b000)
libwind.so.0 => /usr/pkg/lib/libwind.so.0 (0x80081b000)
libsqlite3.so.0 => /usr/pkg/lib/libsqlite3.so.0 (0x800844000)
libreadline.so.7 => /usr/pkg/lib/libreadline.so.7 (0x800915000)
But in security/heimdal's buildlink3.mk:
CHECK_BUILTIN.heimdal:= yes
.include "../../security/heimdal/builtin.mk"
CHECK_BUILTIN.heimdal:= no
.if !empty(USE_BUILTIN.heimdal:M[nN][oO])
.include "../../databases/sqlite3/buildlink3.mk"
.include "../../mk/bdb.buildlink3.mk"
.endif
So there is a link to sqlite3's buildlink3.mk, but not to readline's.
So should readline's buildlink3.mk be added to sqlite3's? Or does
every package that links in sqlite3 have to know that readline should
be linked in as well?
From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@NetBSD.org
Cc: ryoon@NetBSD.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,
davshao@gmail.com
Subject: Re: pkg/50776 (databases/sqlite3 add mk/readline.buildlink3.mk to
buildlink3.mk for devel/subversion-base)
Date: Mon, 5 Dec 2016 11:07:44 +0100
On Mon, Dec 05, 2016 at 02:05:01AM +0000, David Shao wrote:
> When I do:
>
> # ldd libsqlite3.so.0.8.6
> libsqlite3.so.0.8.6:
> libreadline.so.7 => /usr/pkg/lib/libreadline.so.7 (0x800781000)
> libncurses.so.6 => /usr/pkg/lib/libncurses.so.6 (0x8007d0000)
> libpthread.so.0 => /usr/lib/libpthread.so.0 (0x80082c000)
> libdl.so.0 => /usr/lib/libdl.so.0 (0x8005c9000)
> libc.so.8 => /lib/libc.so.8 (0x800458000)
>
> We see that pkgsrc libreadline is linked in.
I don't see this and from the Makefile, it should do it either.
Readline use should be limited to the sqlite3 binary, it should not be
used by the library.
> And for say heimdal:
>
> # ldd libkrb5.so.26.0.0
> libkrb5.so.26.0.0:
> libheimbase.so.1 => /usr/pkg/lib/libheimbase.so.1 (0x8005c9000)
> libhx509.so.5 => /usr/pkg/lib/libhx509.so.5 (0x800730000)
> libasn1.so.8 => /usr/pkg/lib/libasn1.so.8 (0x80077b000)
> libwind.so.0 => /usr/pkg/lib/libwind.so.0 (0x80081b000)
> libsqlite3.so.0 => /usr/pkg/lib/libsqlite3.so.0 (0x800844000)
> libreadline.so.7 => /usr/pkg/lib/libreadline.so.7 (0x800915000)
Since it is linked against sqlite3, that could be the source of the
problem.
Joerg
From: Joerg Sonnenberger <joerg@bec.de>
To: Joerg Sonnenberger <joerg@bec.de>
Cc: gnats-bugs@NetBSD.org, ryoon@NetBSD.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org, davshao@gmail.com
Subject: Re: pkg/50776 (databases/sqlite3 add mk/readline.buildlink3.mk to
buildlink3.mk for devel/subversion-base)
Date: Mon, 5 Dec 2016 11:10:42 +0100
On Mon, Dec 05, 2016 at 11:07:44AM +0100, Joerg Sonnenberger wrote:
> On Mon, Dec 05, 2016 at 02:05:01AM +0000, David Shao wrote:
> > When I do:
> >
> > # ldd libsqlite3.so.0.8.6
> > libsqlite3.so.0.8.6:
> > libreadline.so.7 => /usr/pkg/lib/libreadline.so.7 (0x800781000)
> > libncurses.so.6 => /usr/pkg/lib/libncurses.so.6 (0x8007d0000)
> > libpthread.so.0 => /usr/lib/libpthread.so.0 (0x80082c000)
> > libdl.so.0 => /usr/lib/libdl.so.0 (0x8005c9000)
> > libc.so.8 => /lib/libc.so.8 (0x800458000)
> >
> > We see that pkgsrc libreadline is linked in.
>
> I don't see this and from the Makefile, it should do it either.
> Readline use should be limited to the sqlite3 binary, it should not be
> used by the library.
Ah, right. It was added early this year to the pkgsrc Makefile. That
change is wrong, at least for current sqlite version and should be
reverted. Ryoon, I think that's your responsibility.
Joerg
Responsible-Changed-From-To: ryoon->wiz
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Mon, 12 Dec 2016 16:20:09 +0000
Responsible-Changed-Why:
I've removed the LDFLAGS lines.
Does sqlite3 still build for you?
If it does, is subversion-base working now as well?
State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Mon, 12 Dec 2016 16:20:09 +0000
State-Changed-Why:
see above
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50776 CVS commit: pkgsrc/databases/sqlite3
Date: Mon, 12 Dec 2016 16:17:54 +0000
Module Name: pkgsrc
Committed By: wiz
Date: Mon Dec 12 16:17:53 UTC 2016
Modified Files:
pkgsrc/databases/sqlite3: Makefile
Log Message:
Do not unconditionally add libedit/libreadline to LDFLAGS.
This way they got added as dependencies to sqlite3.so, while
only the sqlite3 binary really needs libreadline.
However, even without the LDFLAGS, the sqlite3 binary correctly
links the library in for me (on NetBSD).
Addresses PR 50776.
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 pkgsrc/databases/sqlite3/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/50776 (databases/sqlite3 add mk/readline.buildlink3.mk to
buildlink3.mk for devel/subversion-base)
Date: Mon, 12 Dec 2016 18:15:47 -0800
I have updated to databases/sqlite3, did
pkg_rolling-update -uv
and git and firefox, which I am using to send this reply, seem to be
functioning fine.
Thanks for the fix!
State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 13 Dec 2016 08:09:04 +0000
State-Changed-Why:
Thanks for the feedback!
From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/50776 (databases/sqlite3 add mk/readline.buildlink3.mk to
buildlink3.mk for devel/subversion-base)
Date: Fri, 30 Dec 2016 18:58:23 -0800
After
bmake replace package clean
of ncurses and readline, and then
pkg_rolling-replace -suv
all seems well on DragonFly 4.7-DEVELOPMENT, in the sense that at
least xorg, xfce4, and Firefox seem to be working fine.
And there is no more appearance of readline when ldd-ing
libkrb5.so.26.0.0. Thanks!
From: "SAITOH Masanobu" <msaitoh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/50776 CVS commit: src/sys/kern
Date: Thu, 2 Aug 2018 04:28:56 +0000
Module Name: src
Committed By: msaitoh
Date: Thu Aug 2 04:28:56 UTC 2018
Modified Files:
src/sys/kern: uipc_mbuf2.c
Log Message:
Adjust alignment in m_pulldown().
IP6_EXTHDR_GET() and M_REGION_GET() do m_pulldown(). When m_pulldown() copies
data into M_TRAILINGSPACE, the alignment might be changed. There are a lot of
IP6_EXTHDR_GET() calls, so I think it's not good to check the alignment after
every IP6_EXTHDR_GET() call. This change fixes this problem in m_pulldown().
In this commit, the next mbuf are 4 byte aligned. For networking, I've never
heard that 64bit alignment is required, so I think it would be OK.
I don't know this is the best solution, but it's better than nothing.
OK'd by maxv@.
After committing this change, the workaround code for PR#50776 can be removed.
To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/kern/uipc_mbuf2.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(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.