pkgsrc-Bugs archive

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

pkg/49014: chat/ircservices needs "-fno-stack-protector" on NetBSD/sparc-6.99.43



>Number:         49014
>Category:       pkg
>Synopsis:       chat/ircservices needs "-fno-stack-protector" on 
>NetBSD/sparc-6.99.43
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 18 14:55:00 +0000 2014
>Originator:     John D. Baker
>Release:        NetBSD/sparc-6.99.43, pkgsrc-2014Q2
>Organization:
>Environment:
NetBSD jean.technoskunk.fur 6.99.43 NetBSD 6.99.43 (JEAN) #9: Tue May 27 
14:56:45 CDT 2014  
sysop%verthandi.technoskunk.fur@localhost:/d0/build/current/obj/sparc/sys/arch/sparc/compile/JEAN
 sparc

>Description:
"chat/ircservices" fails during configure phase as follows:

===> Configuring for ircservices-5.0.64nb3

Beginning IRC Services configuration.

Executable (program) file will be installed in /usr/pkg/sbin
Data files will be installed in /usr/pkg/lib/services
Checking sanity of /bin/sh... high.
Searching for a suitable compiler... (supplied) using gcc.
Compiler flags supplied: -O2

*** WHOA THERE! ***

Your compiler is not compiling certain code correctly; this will result in
crashes when running Services.  If you have specified compiler flags, please
add "-fno-stack-protector" to the flags, or remove "-fstack-protector" if it
is present.  If this does not help, please reinstall or upgrade your
compiler.  See section 2-1 of the manual for details.

Configuration aborted.

*** Error code 1

Stop.
make[1]: stopped in /x/pkgsrc/chat/ircservices
*** Error code 1

Stop.
make: stopped in /x/pkgsrc/chat/ircservices


As the error message suggests, adding "-fno-stack-protector" to
CFLAGS allows the package to configure, build, and install.
>How-To-Repeat:
Attempt to build "chat/ircservices" on NetBSD/sparc-current (6.99.43
as of this date).  (Other ports/versions?)

Add something like:

  .if "${PKGPATH}" == "chat/ircservices"
    CFLAGS+=-fno-stack-protector
  .endif

to "/etc/mk.conf" and build again.
>Fix:
Something like:

Index: chat/ircservices/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/chat/ircservices/Makefile,v
retrieving revision 1.45
diff -u -p -r1.45 Makefile
--- chat/ircservices/Makefile   29 May 2014 23:35:18 -0000      1.45
+++ chat/ircservices/Makefile   18 Jul 2014 14:50:20 -0000
@@ -25,6 +25,10 @@ RCD_SCRIPTS= ircservices
 PKG_GROUPS=    services
 BUILD_DEFS=    VARBASE
 
+.if !empty(MACHINE_PLATFORM:MNetBSD-6.99.[4-9]?-sparc)
+  CFLAGS+=-fno-stack-protector
+.endif
+
 CONFIGURE_ARGS+=       -prefix ${PREFIX:Q}
 CONFIGURE_ARGS+=       -cc ${CC:Q}
 CONFIGURE_ARGS+=       ${empty(CFLAGS):?:-cflags ${CFLAGS:Q}}


Don't know if this affects HEAD prior to GCC48 switch or non-sparc
platforms (yet), so this is just a rough draft...



Home | Main Index | Thread Index | Old Index