Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jan 2014 16:00:28 GMT
From:      John Clark <clarkjc@runbox.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/186005: multimedia/mythtv: mythbackend crashes when built with GCC 4.6 on 10.0-RELEASE
Message-ID:  <201401221600.s0MG0SBK049358@oldred.freebsd.org>
Resent-Message-ID: <201401221610.s0MGA0i0001051@freefall.freebsd.org>

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

>Number:         186005
>Category:       ports
>Synopsis:       multimedia/mythtv: mythbackend crashes when built with GCC 4.6 on 10.0-RELEASE
>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:   Wed Jan 22 16:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     John Clark
>Release:        10.0-RELEASE
>Organization:
>Environment:
FreeBSD beastie.local 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
I recently upgraded my DVR box from 9.2-RELEASE to 10.0-RELEASE.  I rebuilt all the ports as instructed by freebsd-update.  Everything seemed to be going well until I started the MythTV backend service (mythbackend).  It crashed immediately with a seg fault.

Anyhow, it seems to only have a problem when it's built with GCC.  It works fine when I build it with Clang.  I've attached a patch for the multimedia/mythtv port that removes the dependency on GCC.  I'd try harder to figure out why it fails when built with GCC, but the goal I've heard is to use Clang for everything.
>How-To-Repeat:
* Build multimedia/mythtv port with default GCC (gcc46) on 10.0-RELEASE
* Enable and start mythbackend service
>Fix:
Apply attached patch to build with Clang instead.

Patch attached with submission follows:

diff -Naur mythtv.orig/Makefile mythtv/Makefile
--- mythtv.orig/Makefile	2014-01-22 09:14:57.000000000 -0500
+++ mythtv/Makefile	2014-01-22 09:11:13.000000000 -0500
@@ -25,7 +25,6 @@
 
 WRKSRC=		${WRKDIR}/${GH_ACCOUNT}-${GH_PROJECT}-e9545c0/${GH_PROJECT}
 
-USE_GCC=	any
 ONLY_FOR_ARCHS=	i386 amd64
 USES=		gmake pkgconfig perl5
 USE_QT4=	gui sql network script linguist_build l10n sql-mysql_run \
diff -Naur mythtv.orig/files/patch-libs__libmyth__remoteutil.h mythtv/files/patch-libs__libmyth__remoteutil.h
--- mythtv.orig/files/patch-libs__libmyth__remoteutil.h	1969-12-31 19:00:00.000000000 -0500
+++ mythtv/files/patch-libs__libmyth__remoteutil.h	2014-01-22 09:21:14.000000000 -0500
@@ -0,0 +1,10 @@
+--- libs/libmyth/remoteutil.h.orig	2013-09-18 16:06:08.000000000 -0400
++++ libs/libmyth/remoteutil.h	2014-01-22 08:26:34.000000000 -0500
+@@ -8,6 +8,7 @@
+ using namespace std;
+ 
+ #include "mythexp.h"
++#include <sys/types.h>
+ 
+ class ProgramInfo;
+ class MythEvent;
diff -Naur mythtv.orig/files/patch-libs__libmythtv__recorders__dvbdev__dvbci.cpp mythtv/files/patch-libs__libmythtv__recorders__dvbdev__dvbci.cpp
--- mythtv.orig/files/patch-libs__libmythtv__recorders__dvbdev__dvbci.cpp	2013-11-18 07:03:42.000000000 -0500
+++ mythtv/files/patch-libs__libmythtv__recorders__dvbdev__dvbci.cpp	2014-01-22 09:14:30.000000000 -0500
@@ -1,11 +1,13 @@
---- libs/libmythtv/recorders/dvbdev/dvbci.cpp.orig	2010-03-07 04:11:52.000000000 +0100
-+++ libs/libmythtv/recorders/dvbdev/dvbci.cpp	2010-04-26 23:30:52.000000000 +0200
-@@ -28,7 +28,9 @@
+--- libs/libmythtv/recorders/dvbdev/dvbci.cpp.orig	2010-04-26 23:30:52.000000000 +0200
++++ libs/libmythtv/recorders/dvbdev/dvbci.cpp	2014-01-22 09:13:22.000000000 -0500
+@@ -28,7 +28,11 @@
  #include <errno.h>
  #include <ctype.h>
  #include <linux/dvb/ca.h>
 +#ifndef __FreeBSD__
  #include <malloc.h>
++#else
++#include <stdlib.h>
 +#endif
  #include <netinet/in.h>
  #include <poll.h>
diff -Naur mythtv.orig/files/patch-libs__libmythui__mythgesture.cpp mythtv/files/patch-libs__libmythui__mythgesture.cpp
--- mythtv.orig/files/patch-libs__libmythui__mythgesture.cpp	1969-12-31 19:00:00.000000000 -0500
+++ mythtv/files/patch-libs__libmythui__mythgesture.cpp	2014-01-22 09:22:15.000000000 -0500
@@ -0,0 +1,19 @@
+--- libs/libmythui/mythgesture.cpp.orig	2013-09-18 16:06:08.000000000 -0400
++++ libs/libmythui/mythgesture.cpp	2014-01-22 08:20:33.000000000 -0500
+@@ -28,6 +28,7 @@
+ 
+ #include "mythgesture.h"
+ 
++#include <cstdlib>
+ #include <cmath>
+ #include <algorithm>
+ 
+@@ -283,7 +284,7 @@
+     int dely = p.y() - points.back().y();
+ 
+     /* step by the greatest delta direction */
+-    if (abs(delx) > abs(dely))
++    if (std::abs(delx) > std::abs(dely))
+     {
+         float iy = points.back().y();
+ 
diff -Naur mythtv.orig/files/patch-libs__libmythui__mythpainter.cpp mythtv/files/patch-libs__libmythui__mythpainter.cpp
--- mythtv.orig/files/patch-libs__libmythui__mythpainter.cpp	1969-12-31 19:00:00.000000000 -0500
+++ mythtv/files/patch-libs__libmythui__mythpainter.cpp	2014-01-22 09:22:38.000000000 -0500
@@ -0,0 +1,9 @@
+--- libs/libmythui/mythpainter.cpp.orig	2013-09-18 16:06:08.000000000 -0400
++++ libs/libmythui/mythpainter.cpp	2014-01-22 08:18:40.000000000 -0500
+@@ -1,5 +1,6 @@
+ #include <stdint.h>
+ #include <algorithm>
++#include <cstdlib>
+ 
+ // QT headers
+ #include <QRect>
diff -Naur mythtv.orig/files/patch-libs__libmythupnp__mmulticastsocketdevice.h mythtv/files/patch-libs__libmythupnp__mmulticastsocketdevice.h
--- mythtv.orig/files/patch-libs__libmythupnp__mmulticastsocketdevice.h	1969-12-31 19:00:00.000000000 -0500
+++ mythtv/files/patch-libs__libmythupnp__mmulticastsocketdevice.h	2014-01-22 09:23:04.000000000 -0500
@@ -0,0 +1,10 @@
+--- libs/libmythupnp/mmulticastsocketdevice.h.orig	2013-09-18 16:06:08.000000000 -0400
++++ libs/libmythupnp/mmulticastsocketdevice.h	2014-01-22 08:24:26.000000000 -0500
+@@ -18,6 +18,7 @@
+ #  include <ws2tcpip.h>
+ # endif
+ #else
++# include <sys/types.h>
+ # include <sys/socket.h>
+ # include <netinet/in.h>
+ # include <netinet/ip.h>


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



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