NetBSD Problem Report #47322
From www@NetBSD.org Thu Dec 13 16:30:55 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id A664563E33E
for <gnats-bugs@gnats.NetBSD.org>; Thu, 13 Dec 2012 16:30:55 +0000 (UTC)
Message-Id: <20121213163054.63E2363E33E@www.NetBSD.org>
Date: Thu, 13 Dec 2012 16:30:54 +0000 (UTC)
From: richard.palo@baou.fr
Reply-To: richard.palo@baou.fr
To: gnats-bugs@NetBSD.org
Subject: pkgsrc/print/cups update for LIBS_SSP to include -libssp for solaris
X-Send-Pr-Version: www-1.0
>Number: 47322
>Category: pkg
>Synopsis: pkgsrc/print/cups update for LIBS_SSP to include -libssp for solaris
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: sbd
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Dec 13 16:35:00 +0000 2012
>Closed-Date: Sat Nov 02 19:00:30 +0000 2013
>Last-Modified: Sat Nov 02 19:00:30 +0000 2013
>Originator: Richard PALO
>Release: pkgsrc trunk
>Organization:
>Environment:
SunOS devzone 5.11 oi_151a7 i86pc i386 i86pc Solaris
>Description:
although cups will "build" and "install", other programs linking to any cups shared library using libssp_nonshared.a will fail with 'error symbol __stack_chk_guard not found' unless cups links at the same time with libssp.so.
>How-To-Repeat:
an example program that fails is gutenprint-lib:
richard@devzone:~/src/pkgsrc/print/gutenprint-lib/work.devzone/gutenprint-5.2.9$ ldd -d /opt/pkg/lib/libcupsimage.so
libtiff.so.5 => /opt/pkg/lib/libtiff.so.5
liblzma.so.5 => /opt/pkg/lib/liblzma.so.5
librt.so.1 => /lib/64/librt.so.1
libpng15.so.15 => /opt/pkg/lib/libpng15.so.15
libjpeg.so.8 => /opt/pkg/lib/libjpeg.so.8
libcups.so.2 => /opt/pkg/lib/libcups.so.2
libpthread.so.1 => /lib/64/libpthread.so.1
libm.so.2 => /lib/64/libm.so.2
libiconv.so.2 => /opt/pkg/lib/libiconv.so.2
libgssapi.so.3 => /opt/pkg/lib/libgssapi.so.3
libheimntlm.so.0 => /opt/pkg/lib/libheimntlm.so.0
libkrb5.so.26 => /opt/pkg/lib/libkrb5.so.26
libsqlite3.so.0 => /opt/pkg/lib/libsqlite3.so.0
libdl.so.1 => /lib/64/libdl.so.1
libhx509.so.5 => /opt/pkg/lib/libhx509.so.5
libasn1.so.8 => /opt/pkg/lib/libasn1.so.8
libwind.so.0 => /opt/pkg/lib/libwind.so.0
libcom_err.so.1 => /opt/pkg/lib/libcom_err.so.1
libheimbase.so.1 => /opt/pkg/lib/libheimbase.so.1
libroken.so.18 => /opt/pkg/lib/libroken.so.18
libresolv.so.2 => /lib/64/libresolv.so.2
libnsl.so.1 => /lib/64/libnsl.so.1
libsocket.so.1 => /lib/64/libsocket.so.1
libssl.so.0.9.8 => /opt/pkg/lib/libssl.so.0.9.8
libcrypto.so.0.9.8 => /opt/pkg/lib/libcrypto.so.0.9.8
libdns_sd.so => /opt/pkg/lib/libdns_sd.so
libz.so.1 => /opt/pkg/lib/libz.so.1
libgcc_s.so.1 => /opt/pkg/gcc47/lib/amd64/libgcc_s.so.1
libc.so.1 => /lib/64/libc.so.1
libmd.so.1 => /lib/64/libmd.so.1
libmp.so.2 => /lib/64/libmp.so.2
libgcc_s.so.1 => /opt/pbulk/gcc47/lib/amd64/libgcc_s.so.1
symbol not found: __stack_chk_guard (/opt/pkg/lib/libcupsimage.so)
symbol not found: __stack_chk_guard (/opt/pkg/lib/libcups.so.2)
>Fix:
From what I can gather, normally the gcc compiler should do 'the right thing' when -fstack-protect is passed, but thanks to a hint gleaned here (http://gcc.gnu.org/ml/gcc-patches/2005-07/msg00066.html)
in addition to -lssp_nonshared, -lssp needs to be there as well.
Apparently a compiler problem, and a moving target, because I noticed that the pkgsrc Makefile for cups had this entry for SunOS: CONFIGURE_ENV+= LIBS_SSP=-lssp_nonshared
after applying the following, (and deinstalling fully cups), I was able to rebuild cups and get over this problem in gutenprint:
richard@devzone:~/src/pkgsrc/print/cups$ cvs diff
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/cups/Makefile,v
retrieving revision 1.193
diff -u -p -r1.193 Makefile
--- Makefile 8 Oct 2012 13:45:36 -0000 1.193
+++ Makefile 13 Dec 2012 16:29:15 -0000
@@ -70,7 +70,8 @@ CONFIGURE_ENV+= DSOFLAGS=${LDFLAGS:M*:Q
.include "options.mk"
.if ${OPSYS} == "SunOS"
-CONFIGURE_ENV+= LIBS_SSP=-lssp_nonshared
+LIBS_SSP = -lssp_nonshared -lssp
+CONFIGURE_ENV+= LIBS_SSP=${LIBS_SSP:M*:Q}
LIBS.SunOS+= -liconv
.endif
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->sbd
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Sun, 16 Dec 2012 19:47:22 +0000
Responsible-Changed-Why:
Over to maintainer.
From: Richard PALO <richard.palo@baou.fr>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47322 (pkgsrc/print/cups update for LIBS_SSP to include -libssp
for solaris)
Date: Tue, 29 Jan 2013 11:10:16 +0100
Le 16/12/12 20:47, hauke@NetBSD.org a écrit :
> Synopsis: pkgsrc/print/cups update for LIBS_SSP to include -libssp for solaris
>
> Responsible-Changed-From-To: pkg-manager->sbd
> Responsible-Changed-By: hauke@NetBSD.org
> Responsible-Changed-When: Sun, 16 Dec 2012 19:47:22 +0000
> Responsible-Changed-Why:
> Over to maintainer.
>
>
>
>
Any movement on this and the libtool patch (pkg/47359) for solaris?
If there is a better suggestion, I'd be happy to try it.
From: Richard PALO <richard.palo@free.fr>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/47322 (pkgsrc/print/cups update for LIBS_SSP to include -libssp
for solaris)
Date: Tue, 08 Oct 2013 17:04:31 +0200
Le 16/12/12 20:47, hauke@NetBSD.org a écrit :
> Synopsis: pkgsrc/print/cups update for LIBS_SSP to include -libssp for solaris
>
> Responsible-Changed-From-To: pkg-manager->sbd
> Responsible-Changed-By: hauke@NetBSD.org
> Responsible-Changed-When: Sun, 16 Dec 2012 19:47:22 +0000
> Responsible-Changed-Why:
> Over to maintainer.
No response for quite awhile, so I'll reiterate with an extract of the
link provided:
> But, if GCC decides to use TLS canary for -fstack-protector,
> then it ought to avoid -lssp_nonshared -lssp, while if
> it decides not to use them, then it should force -lssp_nonshared -lssp
> (as glibc doesn't provide __stack_chk_guard on the architectures
> that provide TLS canary).
In absence of any pertinent objections, I'll push this with the builtin
mit-krb5 gssapi fixes affecting cups this weekend or so.
BTW - I don't believe suppressing the 'LDFLAGS+= -lssp_nonshared' in
favour of 'CFLAGS+= -fno-stack-protector' is necessarily a great
alternative... That is, unless there are some great arguments for this
approach.
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/47322 (pkgsrc/print/cups update for LIBS_SSP to include
-libssp for solaris)
Date: Sat, 2 Nov 2013 18:36:14 +0000
not sent to gnats
--------
From: Richard PALO <richard.palo@free.fr>
To: sbd@NetBSD.org, pkgsrc-bugs@netbsd.org, richard.palo@baou.fr
Subject: Re: pkg/47322 (pkgsrc/print/cups update for LIBS_SSP to include
-libssp for solaris)
Date: Mon, 14 Oct 2013 14:10:41 +0200
Le 08/10/13 17:05, Richard PALO a ?crit :
> The following reply was made to PR pkg/47322; it has been noted by GNATS.
>
> No response for quite awhile, so I'll reiterate with an extract of the
> link provided:
> > But, if GCC decides to use TLS canary for -fstack-protector,
> > then it ought to avoid -lssp_nonshared -lssp, while if
> > it decides not to use them, then it should force -lssp_nonshared -lssp
> > (as glibc doesn't provide __stack_chk_guard on the architectures
> > that provide TLS canary).
>
> In absence of any pertinent objections, I'll push this with the builtin
> mit-krb5 gssapi fixes affecting cups this weekend or so.
>
> BTW - I don't believe suppressing the 'LDFLAGS+= -lssp_nonshared' in
> favour of 'CFLAGS+= -fno-stack-protector' is necessarily a great
> alternative... That is, unless there are some great arguments for this
> approach.
>
>
As this was pushed this morning, the problem report can probably be closed.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 02 Nov 2013 19:00:30 +0000
State-Changed-Why:
submitter says it can be closed
>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-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.