Bug 199303 - news/pan crashes when started.
Summary: news/pan crashes when started.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Koop Mast
URL:
Keywords: crash, easy, needs-qa, patch, patch-ready
: 208763 212635 (view as bug list)
Depends on:
Blocks: 182203
  Show dependency treegraph
 
Reported: 2015-04-08 23:25 UTC by Andrew
Modified: 2017-01-11 14:04 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments
svn diff (430 bytes, patch)
2015-12-07 05:05 UTC, Andrew
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew 2015-04-08 23:25:38 UTC
news/pan crashes when started. The fix is to force libs from gcc:


--- Makefile.orig	2015-04-08 15:11:52.476348502 -0700
+++ Makefile	2015-04-08 15:12:02.859348409 -0700
@@ -22,7 +22,7 @@
 USE_GCC=	any
 GNU_CONFIGURE=	yes
 CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib -lgnuregex ${ICONV_LIB}
+LDFLAGS+=	-static-libgcc -static-libstdc++ -L${LOCALBASE}/lib -lgnuregex ${ICONV_LIB}
 
 OPTIONS_DEFINE=	GTKSPELL GTK3
 OPTIONS_DEFAULT=GTKSPELL
Comment 1 Detlef Graef 2015-12-02 10:19:27 UTC
Is there a chance this patch is commited to the port of pan?

The problem still exists.

I've installed FreeBSD 10.2-RELEASE (AMD64):

$ uname -a
FreeBSD fbsd 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12 15:26:37 UTC 2015     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
 
I've installed the pan package ("pkg install pan").

The following version is installed:

$ pkg info | grep pan-0
pan-0.139_2               Threaded GTK+ newsreader based on Agent for Windows

When I try to start pan the following error occurs:

$ pan &
$ 
[1]   Segmentation fault (core dumped) pan
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-06 12:34:35 UTC
@Andrew, could you please attach your diff in comment 0 as an attachment?

Thanks!
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-06 12:36:10 UTC
This issue has reached maintainer-timeout (incl. discretionary time).

@Gnome can this be bumped up the list?
Comment 4 Andrew 2015-12-07 05:05:12 UTC
Created attachment 163929 [details]
svn diff

The patch that fixes the crash.
Comment 5 Andrew 2015-12-07 05:06:58 UTC
@Kubilay Kocak

I attached the diff generated by svn.


Alternatively you can build a working version of pan by using the following command:

cd /usr/ports/news/pan
make LDFLAGS="-static-libgcc -static-libstdc++"
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-07 05:11:09 UTC
Thank you Andrew :)

@Committer We may want to put some of those flags in LIBS, rather than LDFLAGS
Comment 7 commit-hook freebsd_committer freebsd_triage 2015-12-12 23:38:51 UTC
A commit references this bug:

Author: kwm
Date: Sat Dec 12 23:37:57 UTC 2015
New revision: 403639
URL: https://svnweb.freebsd.org/changeset/ports/403639

Log:
  Staticly link to libgcc and libstdc++. This fixes a segmentation fault
  when trying to run pan on a libc++ based system.

  PR:		199303
  Submitted by:	Andrew <andrew_terekhov@yahoo.com>

Changes:
  head/news/pan/Makefile
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-13 13:52:13 UTC
Assign to committer that resolved
Comment 9 Jan Beich freebsd_committer freebsd_triage 2017-01-08 23:41:43 UTC
Kurt dropped the change in ports r412967. If USE_GCC is still required one should spell it as USES=compiler:gcc-c++11-lib rather than resort to static linking.
Comment 10 Jan Beich freebsd_committer freebsd_triage 2017-01-08 23:43:01 UTC
*** Bug 208763 has been marked as a duplicate of this bug. ***
Comment 11 Jan Beich freebsd_committer freebsd_triage 2017-01-08 23:45:00 UTC
*** Bug 212635 has been marked as a duplicate of this bug. ***
Comment 12 commit-hook freebsd_committer freebsd_triage 2017-01-09 22:21:41 UTC
A commit references this bug:

Author: kwm
Date: Mon Jan  9 22:21:30 UTC 2017
New revision: 431039
URL: https://svnweb.freebsd.org/changeset/ports/431039

Log:
  Drop USE_GCC, this fixed a segfault crash when starting the program.

  PR:		199303
  MFH:		2017Q1

Changes:
  head/news/pan/Makefile
Comment 13 commit-hook freebsd_committer freebsd_triage 2017-01-11 13:33:50 UTC
A commit references this bug:

Author: kwm
Date: Wed Jan 11 13:32:58 UTC 2017
New revision: 431179
URL: https://svnweb.freebsd.org/changeset/ports/431179

Log:
  MFH: r431039

  Drop USE_GCC, this fixed a segfault crash when starting the program.

  PR:		199303

  Approved by:	ports-secteam (feld@)

Changes:
_U  branches/2017Q1/
  branches/2017Q1/news/pan/Makefile
Comment 14 Koop Mast freebsd_committer freebsd_triage 2017-01-11 14:04:29 UTC
should be fixed now.