NetBSD Problem Report #51502
From www@NetBSD.org Sat Sep 24 06:39:39 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 C2E517A27F
for <gnats-bugs@gnats.NetBSD.org>; Sat, 24 Sep 2016 06:39:38 +0000 (UTC)
Message-Id: <20160924063937.C17A57A2BD@mollari.NetBSD.org>
Date: Sat, 24 Sep 2016 06:39:37 +0000 (UTC)
From: hako@affrc.go.jp
Reply-To: hako@affrc.go.jp
To: gnats-bugs@NetBSD.org
Subject: readline 7.0 failed to build on Solaris 10
X-Send-Pr-Version: www-1.0
>Number: 51502
>Category: pkg
>Synopsis: readline 7.0 failed to build on Solaris 10
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 24 06:40:00 +0000 2016
>Closed-Date: Sun Nov 20 01:23:08 +0000 2016
>Last-Modified: Sun Nov 20 01:23:08 +0000 2016
>Originator: Hiroshi Hakoyama
>Release: current
>Organization:
FRA
>Environment:
SunOS ec21 5.10 Generic_147147-26 sun4u sparc SUNW,Sun-Blade-1000
>Description:
readline-7.0 failed to build on Solaris 10.
test -d examples || mkdir examples
(cd examples && /usr/pkg/bin/bmake all )
rm -f fileman.o
libtool --mode=link gcc-4.9 -DHAVE_CONFIG_H -DREADLINE_LIBRARY -DRL_LIBRARY_VERSION='"7.0"' -I. -I.. -I.. -I/usr/include -O2 -I/usr/include -c fileman.c
libtool: link: you must specify an output file
libtool: link: Try `libtool --help --mode=link' for more information.
*** Error code 1
Stop.
bmake[1]: stopped in /usr/pkgsrc/devel/readline/work/readline-7.0/examples
*** Error code 1 (ignored)
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/51502: readline 7.0 failed to build on Solaris 10
Date: Sat, 24 Sep 2016 13:26:52 +0200
On Sat, Sep 24, 2016 at 06:40:00AM +0000, hako@affrc.go.jp wrote:
> test -d examples || mkdir examples
> (cd examples && /usr/pkg/bin/bmake all )
> rm -f fileman.o
> libtool --mode=link gcc-4.9 -DHAVE_CONFIG_H -DREADLINE_LIBRARY -DRL_LIBRARY_VERSION='"7.0"' -I. -I.. -I.. -I/usr/include -O2 -I/usr/include -c fileman.c
> libtool: link: you must specify an output file
> libtool: link: Try `libtool --help --mode=link' for more information.
> *** Error code 1
What exactly is your mk.conf?
Joerg
State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sun, 25 Sep 2016 21:43:53 +0000
State-Changed-Why:
Feedback requested
From: Hiroshi Hakoyama <hako@affrc.go.jp>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org,
gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org
Subject: Re: pkg/51502: readline 7.0 failed to build on Solaris 10
Date: Mon, 26 Sep 2016 19:01:28 +0900
Dear Joerg,
> What exactly is your mk.conf?
>=20
> Joerg
.ifdef BSD_PKG_MK # begin pkgsrc settings
ABI=3D 32
PKGSRC_COMPILER=3D gcc
PKG_DBDIR=3D /var/db/pkg
LOCALBASE=3D /usr/pkg
VARBASE=3D /usr/pkg/var
PKG_TOOLS_BIN=3D /usr/pkg/sbin
PKGINFODIR=3D info
PKGMANDIR=3D man
TOOLS_PLATFORM.install?=3D ${LOCALBASE}/bin/bsdinstall
TOOLS_PLATFORM.awk?=3D ${LOCALBASE}/bin/nawk
TOOLS_PLATFORM.sed?=3D ${LOCALBASE}/bin/nbsed
TOOLS_PLATFORM.sh?=3D ${LOCALBASE}/bin/bash
CONFIG_SHELL=3D ${LOCALBASE}/bin/bash
WRAPPER_SHELL=3D ${LOCALBASE}/bin/bash
CC=3D/opt/csw/bin/gcc-4.9
CXX=3D/opt/csw/bin/g++-4.9
CFLAGS+=3D -O2
CXXFLAGS+=3D -O2
DBG=3D
.endif # end pkgsrc settings
FETCH_CMD=3D ${LOCALBASE}/bin/ftp
TOOLS_PLATFORM.pax?=3D ${LOCALBASE}/bin/nbpax
TOOLS_PLATFORM.mtree?=3D ${LOCALBASE}/sbin/mtree
TOOLS_PLATFORM.flex?=3D ${LOCALBASE}/bin/flex
TOOLS_PLATFORM.lex?=3D ${LOCALBASE}/bin/flex
PAX=3D${LOCALBASE}/bin/pax
SED=3D${LOCALBASE}/bin/nbsed
ACCEPTABLE_LICENSES+=3Dvim-license
X11_TYPE=3Dmodular
PREFER.gettext =3D pkgsrc
BUILDLINK_PASSTHRU_DIRS+=3D /usr/java
BUILDLINK_PASSTHRU_DIRS+=3D /usr/sfw
BUILDLINK_PASSTHRU_RPATHDIRS+=3D /usr/sfw/lib/64
USE_INET6=3D no
IS_BUILTIN.zlib=3D yes
USE_BUILTIN.zlib=3D no
BUILDLINK_LIBDIRS.zlib=3D lib=20
BUILDLINK_LDFLAGS.zlib=3D -R/usr/pkg2/lib=20
BUILDLINK_RPATHDIRS.zlib=3D lib
PREFER.zlib =3D pkgsrc
USE_BUILTIN.bzip2=3D no
PREFER.bzip2=3D pkgsrc
USE_BZIP2=3D yes
IS_BUILTIN.xpm=3D yes
USE_BUILTIN.xpm=3D no
PREFER.xpm=3D pkgsrc
PKG_OPTIONS.gd=3D -libvpx x11
Hiroshi Hakoyama
hako@affrc.go.jp
On 2016/09/24, at 20:30, Joerg Sonnenberger wrote:
> The following reply was made to PR pkg/51502; it has been noted by =
GNATS.
>=20
> From: Joerg Sonnenberger <joerg@bec.de>
> To: gnats-bugs@NetBSD.org
> Cc:=20
> Subject: Re: pkg/51502: readline 7.0 failed to build on Solaris 10
> Date: Sat, 24 Sep 2016 13:26:52 +0200
>=20
> On Sat, Sep 24, 2016 at 06:40:00AM +0000, hako@affrc.go.jp wrote:
>> test -d examples || mkdir examples
>> (cd examples && /usr/pkg/bin/bmake all )
>> rm -f fileman.o
>> libtool --mode=3Dlink gcc-4.9 -DHAVE_CONFIG_H -DREADLINE_LIBRARY =
-DRL_LIBRARY_VERSION=3D'"7.0"' -I. -I.. -I.. -I/usr/include -O2 =
-I/usr/include -c fileman.c
>> libtool: link: you must specify an output file
>> libtool: link: Try `libtool --help --mode=3Dlink' for more =
information.
>> *** Error code 1
>=20
> What exactly is your mk.conf?
>=20
> Joerg
>=20
State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 26 Sep 2016 14:25:09 +0000
State-Changed-Why:
feedback received
From: Hiroshi Hakoyama <hako@affrc.go.jp>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org,
pkgsrc-bugs@netbsd.org,
gnats-admin@netbsd.org,
dholland@NetBSD.org
Subject: Re: pkg/51502 (readline 7.0 failed to build on Solaris 10)
Date: Wed, 28 Sep 2016 12:23:13 +0900
On 2016/09/26, at 23:25, dholland@NetBSD.org wrote:
> Synopsis: readline 7.0 failed to build on Solaris 10
>=20
> State-Changed-From-To: feedback->open
> State-Changed-By: dholland@NetBSD.org
> State-Changed-When: Mon, 26 Sep 2016 14:25:09 +0000
> State-Changed-Why:
> feedback received
>=20
>=20
>=20
workaround: use a patch like the patch-examples_Makefile.in ver. 1.2
./work/readline-7.0/examples/Makefile.in.patched
#
# This is the Makefile for the readline examples subdirectory.
#
# Copyright (C) 1994,2008,2009 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see =
<http://www.gnu.org/licenses/>.
RL_LIBRARY_VERSION =3D @LIBVERSION@
SHELL =3D @MAKE_SHELL@
RM =3D rm -f
prefix =3D @prefix@
exec_prefix =3D @exec_prefix@
datarootdir =3D @datarootdir@
bindir =3D @bindir@
srcdir =3D @srcdir@
datadir =3D @datadir@
VPATH =3D @srcdir@
top_srcdir =3D @top_srcdir@
#BUILD_DIR =3D .
BUILD_DIR =3D @BUILD_DIR@
installdir =3D $(datadir)/readline
INSTALL =3D @INSTALL@
INSTALL_PROGRAM =3D @INSTALL_PROGRAM@
INSTALL_DATA =3D @INSTALL_DATA@
EXEEXT =3D @EXEEXT@
OBJEXT =3D @OBJEXT@
# Support an alternate destination root directory for package building
DESTDIR =3D
DEFS =3D @DEFS@
CC =3D @CC@
CFLAGS =3D @CFLAGS@
LOCAL_CFLAGS =3D @LOCAL_CFLAGS@ -DREADLINE_LIBRARY =
-DRL_LIBRARY_VERSION=3D'"$(RL_LIB
RARY_VERSION)"'
CPPFLAGS =3D @CPPFLAGS@
INCLUDES =3D -I$(srcdir) -I$(top_srcdir) -I..
CCFLAGS =3D $(DEFS) $(LOCAL_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
LDFLAGS =3D -g -L.. @LDFLAGS@
READLINE_LIB =3D ../libreadline.la
HISTORY_LIB =3D ../libhistory.la
TERMCAP_LIB =3D @TERMCAP_LIB@
.c.o:
${RM} $@
$(CC) $(CCFLAGS) -c $<
SOURCES =3D excallback.c fileman.c histexamp.c manexamp.c rl-fgets.c =
rl.c \
rlbasic.c rlcat.c rlevent.c rlptytest.c rltest.c =
rlversion.c \
rl-callbacktest.c hist_erasedups.c hist_purgecmd.c=20
EXECUTABLES =3D fileman$(EXEEXT) rltest$(EXEEXT) rl$(EXEEXT) =
rlcat$(EXEEXT) \
rlevent$(EXEEXT) rlversion$(EXEEXT) histexamp$(EXEEXT) \
rl-callbacktest$(EXEEXT) rlbasic$(EXEEXT) \
hist_erasedups$(EXEEXT) hist_purgecmd$(EXEEXT)
OBJECTS =3D fileman.o rltest.o rl.o rlevent.o rlcat.o rlversion.o =
histexamp.o \
rl-callbacktest.o rlbasic.o hist_erasedups.o hist_purgecmd.o
OTHEREXE =3D rlptytest$(EXEEXT)
OTHEROBJ =3D rlptytest.o
all: $(EXECUTABLES)
everything: all
check: rlversion$(EXEEXT)
@echo Readline version: `rlversion$(EXEEXT)`
installdirs:
-$(SHELL) $(top_srcdir)/support/mkdirs $(DESTDIR)$(installdir)
install: installdirs
@for f in $(SOURCES); do \
$(RM) $(DESTDIR)$(installdir)/$$f ; \
$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(installdir) ; =
\
done
uninstall:
@for f in $(SOURCES); do \
$(RM) $(DESTDIR)$(installdir)/$$f ; \
done
-rmdir $(DESTDIR)$(installdir)
rl$(EXEEXT): rl.o $(READLINE_LIB)
$(LIBTOOL) --mode=3Dlink $(CC) $(LDFLAGS) -o $@ rl.o =
$(READLINE_LIB) $(TER
MCAP_LIB)
rlbasic$(EXEEXT): rlbasic.o $(READLINE_LIB)
$(LIBTOOL) --mode=3Dlink $(CC) $(LDFLAGS) -o $@ rlbasic.o =
$(READLINE_LIB)=20
$(TERMCAP_LIB)
rlcat$(EXEEXT): rlcat.o $(READLINE_LIB)
$(LIBTOOL) --mode=3Dlink $(CC) $(LDFLAGS) -o $@ rlcat.o =
$(READLINE_LIB) $(
TERMCAP_LIB)
rlevent$(EXEEXT): rlevent.o $(READLINE_LIB)
$(LIBTOOL) --mode=3Dlink $(CC) $(LDFLAGS) -o $@ rlevent.o =
$(READLINE_LIB)=20
$(TERMCAP_LIB)
fileman$(EXEEXT): fileman.o $(READLINE_LIB)
$(LIBTOOL) --mode=3Dlink $(CC) $(LDFLAGS) -o $@ fileman.o =
$(READLINE_LIB)=20
$(TERMCAP_LIB)
rltest$(EXEEXT): rltest.o $(READLINE_LIB)
$(LIBTOOL) --mode=3Dlink $(CC) $(LDFLAGS) -o $@ rltest.o =
$(READLINE_LIB) $
(TERMCAP_LIB)
rl-callbacktest$(EXEEXT): rl-callbacktest.o $(READLINE_LIB)
$(LIBTOOL) --mode=3Dlink $(CC) $(LDFLAGS) -o $@ =
rl-callbacktest.o $(READLI
NE_LIB) $(TERMCAP_LIB)
rlptytest$(EXEEXT): rlptytest.o $(READLINE_LIB)
$(LIBTOOL) --mode=3Dlink $(CC) $(LDFLAGS) -o $@ rlptytest.o =
$(READLINE_LIB
) $(TERMCAP_LIB) $(LIBUTIL)
rlversion$(EXEEXT): rlversion.o $(READLINE_LIB)
$(LIBTOOL) --mode=3Dlink $(CC) $(LDFLAGS) -o $@ rlversion.o =
$(READLINE_LIB
) $(TERMCAP_LIB)
histexamp$(EXEEXT): histexamp.o $(HISTORY_LIB)
$(LIBTOOL) --mode=3Dlink $(CC) $(LDFLAGS) -o $@ histexamp.o =
-lhistory $(TE
RMCAP_LIB)
hist_erasedups$(EXEEXT): hist_erasedups.o $(HISTORY_LIB)
$(LIBTOOL) --mode=3Dlink $(CC) $(LDFLAGS) -o $@ hist_erasedups.o =
-lhistory
$(TERMCAP_LIB)
hist_purgecmd$(EXEEXT): hist_purgecmd.o $(HISTORY_LIB)
$(LIBTOOL) --mode=3Dlink $(CC) $(LDFLAGS) -o $@ hist_purgecmd.o =
-lhistory=20
$(TERMCAP_LIB)
clean mostlyclean:
$(RM) $(OBJECTS) $(OTHEROBJ)
$(RM) $(EXECUTABLES) $(OTHEREXE) *.exe
distclean maintainer-clean: clean
$(RM) Makefile
fileman.o: fileman.c
rltest.o: rltest.c
rl.o: rl.c
rlversion.o: rlversion.c
histexamp.o: histexamp.c
hist_erasedups.o: hist_erasedups.c
hist_purgecmd.o: hist_purgecmd.c
rlbasic.o: rlbasic.c
rlcat.o: rlcat.c
rlptytest.o: rlptytest.c
rl-callbacktest.o: rl-callbacktest.c
fileman.o: $(top_srcdir)/readline.h
rltest.o: $(top_srcdir)/readline.h
rl.o: $(top_srcdir)/readline.h
rlversion.o: $(top_srcdir)/readline.h
histexamp.o: $(top_srcdir)/history.h
hist_erasedups.o: $(top_srcdir)/history.h
hist_purgecmd.o: $(top_srcdir)/history.h
rlbasic.o: $(top_srcdir)/readline.h $(top_srcdir)/history.h
rlcat.o: $(top_srcdir)/readline.h $(top_srcdir)/history.h
rlptytest.o: $(top_srcdir)/readline.h $(top_srcdir)/history.h
rl-callbacktest.o: $(top_srcdir)/readline.h $(top_srcdir)/history.h
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/51502: readline 7.0 failed to build on Solaris 10
Date: Sun, 20 Nov 2016 00:58:37 +0000
On Sat, Sep 24, 2016 at 11:30:01AM +0000, Joerg Sonnenberger wrote:
> > test -d examples || mkdir examples
> > (cd examples && /usr/pkg/bin/bmake all )
> > rm -f fileman.o
> > libtool --mode=link gcc-4.9 -DHAVE_CONFIG_H -DREADLINE_LIBRARY -DRL_LIBRARY_VERSION='"7.0"' -I. -I.. -I.. -I/usr/include -O2 -I/usr/include -c fileman.c
> > libtool: link: you must specify an output file
> > libtool: link: Try `libtool --help --mode=link' for more information.
> > *** Error code 1
>
> What exactly is your mk.conf?
This is the problem:
CC = $(LIBTOOL) --mode=link @CC@
:
.c.o:
${RM} $@
$(CC) $(CCFLAGS) -c $<
Of course that doesn't work.
The other thing is: in the original report the build didn't actually
fail. It says "*** Error code 1 (ignored)", because it seems for some
reason that the build system tries to build the examples but blithely
continues if they fail. This is a bug - it should either build the
examples or skip them but not go halfway.
So you can (AFAICT) actually continue to install after this; it just
looks like it died.
If you set MAKE_JOBS (as Joerg and most of us with big build machines
do) the apparent problem disappears, because due to a third makefile
bug it tries to build the examples before it's built the readline
library, so the examples build dies right up front and one doesn't
notice.
--
David A. Holland
dholland@netbsd.org
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/51502 CVS commit: pkgsrc/devel/readline
Date: Sun, 20 Nov 2016 01:14:21 +0000
Module Name: pkgsrc
Committed By: dholland
Date: Sun Nov 20 01:14:21 UTC 2016
Modified Files:
pkgsrc/devel/readline: Makefile distinfo
pkgsrc/devel/readline/patches: patch-ae patch-examples_Makefile.in
Log Message:
Fix three different interacting build problems:
(1) don't ignore errors when building the examples;
(2) build the examples *after* the library build, not *during* the
library build;
(3) don't try to compile the examples with "libtool --mode=link cc -c"
as that flies like a particularly wingless brick.
Closes PR 51502.
To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 pkgsrc/devel/readline/Makefile
cvs rdiff -u -r1.27 -r1.28 pkgsrc/devel/readline/distinfo
cvs rdiff -u -r1.17 -r1.18 pkgsrc/devel/readline/patches/patch-ae
cvs rdiff -u -r1.3 -r1.4 \
pkgsrc/devel/readline/patches/patch-examples_Makefile.in
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: dholland@NetBSD.org
State-Changed-When: Sun, 20 Nov 2016 01:23:08 +0000
State-Changed-Why:
Should be fixed - let me/us know if you still have problems.
Or if the examples turn out not to build on Solaris, which is definitely a
possibility.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.