pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/47322: pkgsrc/print/cups update for LIBS_SSP to include -libssp for solaris



>Number:         47322
>Category:       pkg
>Synopsis:       pkgsrc/print/cups update for LIBS_SSP to include -libssp for 
>solaris
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 13 16:35:00 +0000 2012
>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



Home | Main Index | Thread Index | Old Index