Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Mar 2011 05:58:35 GMT
From:      Ron MacNeil <macro@hotmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/155334: [patch] Allow print/cups-client to build with lang/gcc45
Message-ID:  <201103070558.p275wZ2M031274@red.freebsd.org>
Resent-Message-ID: <201103070600.p2760JPw074334@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         155334
>Category:       ports
>Synopsis:       [patch] Allow print/cups-client to build with lang/gcc45
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 07 06:00:18 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Ron MacNeil
>Release:        FreeBSD 8.2-STABLE
>Organization:
>Environment:
FreeBSD ??? 8.2-STABLE FreeBSD 8.2-STABLE #0: Sat Mar  5 23:57:27 PST 2011     ???@???:/usr/obj/usr/src/sys/MYKERNEL  i386

>Description:

>How-To-Repeat:
1. Install lang/gcc45

2. Configure port builds to use gcc45 as per http://www.freebsd.org/doc/en_US.ISO8859-1/articles/custom-gcc/article.html

3. Attempt to build print/cups-client and observe breakage due to missing GCC stack smashing protection symbols:

[...]
Linking libcups.so.2...
gcc45  -L../cups -Wl,-R/usr/local/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -L/usr/local/lib -Wl,-soname,`basename libcups.so.2` -shared -Wall -Wno-format-y2k -fPIC -Os -g -fstack-protector -o libcups.so.2 adminutil.o array.o attr.o auth.o backchannel.o backend.o conflicts.o custom.o debug.o dest.o dir.o emit.o encode.o file.o getdevices.o getifaddrs.o getputfile.o globals.o http.o http-addr.o http-addrlist.o http-support.o ipp.o ipp-support.o langprintf.o language.o localize.o mark.o md5.o md5passwd.o notify.o options.o page.o ppd.o pwg-file.o pwg-media.o pwg-ppd.o request.o sidechannel.o snmp.o snprintf.o string.o tempfile.o transcode.o usersys.o util.o  \
		  -pthread -lm -lcrypt  -lz
adminutil.o: In function `get_cupsd_conf':
/usr/ports/print/cups-client/work/cups-1.4.6/cups/adminutil.c:2328: undefined reference to `__stack_chk_fail_local'
adminutil.o: In function `cupsAdminCreateWindowsPPD':
/usr/ports/print/cups-client/work/cups-1.4.6/cups/adminutil.c:393: undefined reference to `__stack_chk_fail_local'
adminutil.o: In function `cupsAdminExportSamba':
/usr/ports/print/cups-client/work/cups-1.4.6/cups/adminutil.c:840: undefined reference to `__stack_chk_fail_local'
adminutil.o: In function `cupsAdminGetServerSettings':
/usr/ports/print/cups-client/work/cups-1.4.6/cups/adminutil.c:1175: undefined reference to `__stack_chk_fail_local'
adminutil.o: In function `cupsAdminSetServerSettings':
/usr/ports/print/cups-client/work/cups-1.4.6/cups/adminutil.c:2146: undefined reference to `__stack_chk_fail_local'
attr.o:/usr/ports/print/cups-client/work/cups-1.4.6/cups/attr.c:88: more undefined references to `__stack_chk_fail_local' follow
collect2: ld returned 1 exit status
gmake[1]: *** [libcups.so.2] Error 1
gmake[1]: Leaving directory `/usr/ports/print/cups-client/work/cups-1.4.6/cups'
gmake: *** [all] Error 1
*** Error code 1

Stop in /usr/ports/print/cups-client.
*** Error code 1

>Fix:
Based on information from similar bugs such as...

http://www.freebsd.org/cgi/query-pr.cgi?pr=141238
http://www.freebsd.org/cgi/query-pr.cgi?pr=140791

..the following patch applied to print/cups-base permits print/cups-client to build successfully using lang/gcc45:

--- Makefile.old	2011-03-06 20:43:00.000000000 -0800
+++ Makefile	2011-03-06 21:43:43.000000000 -0800
@@ -214,6 +214,10 @@
 CONFIGURE_ARGS+=	--disable-libusb
 .endif
 
+.if ${OSVERSION} >= 800000
+CONFIGURE_ARGS+= LIBS="-lssp_nonshared"
+.endif
+
 .if defined(CUPS_CLIENT)
 MAN1=	cups-config.1
 .elif defined(CUPS_IMAGE)


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103070558.p275wZ2M031274>