Bug 207268

Summary: irc/ircd-ratbox needs GCC to RUN on i386 (builds fine with CLANG but crashes)
Product: Ports & Packages Reporter: John Marshall <john>
Component: Individual Port(s)Assignee: Mark Felder <feld>
Status: Closed FIXED    
Severity: Affects Only Me CC: feld, moggie
Priority: --- Flags: bugzilla: maintainer-feedback? (moggie)
Version: Latest   
Hardware: Any   
OS: Any   

Description John Marshall 2016-02-17 01:39:56 UTC
After a successful build of irc/ircd-ratbox on i386 it fails to run...

Feb 17 10:08:08 rwsrv04 kernel: pid 28391 (ircd), uid 72: exited on signal 11 (core dumped)

This has been going on for a long time now. I have been working around this by just adding "USE_GCC= yes" near the top of the Makefile on the only i386 server we are still running. I would submit a patch but I cannot find the canonical way of doing this in an arhitecture-specific way. The Porters Handbook seems to be silent on the matter.

make(1) says that MACHINE_ARCH is available for testing architecture but I cannot see that used in other ports. It looks like ARCH is the preferred variable. ARCH is setup in bsd.port.mk but bsd.port.mk is what processes the dependent USE_GCC variable. So, the following patch "works for me" but I leave it to the ports gurus to do this according to the traditions of the rites of the inner sanctum of ports committers.

rwsrv04# svn diff Makefile
Index: Makefile
--- Makefile	(revision 409014)
+++ Makefile	(working copy)
@@ -19,6 +19,9 @@
 CPE_VENDOR=	ratbox
 USE_RC_SUBR=	ircd-ratbox
 USE_LDCONFIG=	${PREFIX}/lib/ircd-ratbox
+.if ${MACHINE_ARCH} == "i386"
+USE_GCC=	yes
Comment 1 Mark Felder freebsd_committer 2016-03-18 13:54:26 UTC
Confirmed, it does segfault in an i386 jail

$ ircd -foreground
ircd: version ircd-ratbox-3.0.8
ircd: libratbox version: 20120429_0-27395 - Using SSL: OpenSSL 1.0.1l-freebsd 15 Jan 2015 compiled: 0x100010cf, library 0x100010cf
ircd: pid 31352
ircd: running in foreground mode from /usr/local
Segmentation fault
Comment 2 commit-hook freebsd_committer 2016-03-18 13:58:11 UTC
A commit references this bug:

Author: feld
Date: Fri Mar 18 13:57:45 UTC 2016
New revision: 411355
URL: https://svnweb.freebsd.org/changeset/ports/411355

  irc/ircd-ratbox: Use GCC for i386

  When built with Clang on i386 ratbox segfaults at startup.

  PR:		207268