Bug 217731 - x11-wm/compiz-plugins-extra: - Compiz crashes when using animation
Summary: x11-wm/compiz-plugins-extra: - Compiz crashes when using animation
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-12 19:27 UTC by andy
Modified: 2018-07-29 14:14 UTC (History)
5 users (show)

See Also:
pi: maintainer-feedback-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andy 2017-03-12 19:27:16 UTC
FreeBSD BSD_12 12.0-CURRENT FreeBSD 12.0-CURRENT #31 r315160: Sun Mar 12 13:02:14 EDT 2017     root@BSD_12:/usr/obj/usr/src/sys/MYKERNEL  amd64

Problem - Compiz crashes when selecting "Effects -> Animations -> Effect Settings Tab and clicking Random animation for All Events checkbox" in CCSM.


I start Compiz with the following command:
#! /bin/sh

compiz --replace --sm-disable --ignore-desktop-hints ccp & gtk-window-decorator --replace &

When selecting that option minimizing any other window causes Compiz to crash.

It seems to the same or similar to:
https://bugzilla.redhat.com/show_bug.cgi?id=1225358

http://git.net/ml/scm-fedora-commits/2015-05/msg07394.html

When starting Compiz on command line the following is received after crash:

# ./start-compiz
# libGL error: Version 7 or imageFromFds image extension not found
libGL error: failed to load driver: r600
/usr/local/lib/compiz/libanimationaddon.so: Undefined symbol "animGetI"

How reproducible:

Every time.


Steps to Reproduce:
1. enable the animation plugin
2. close/minimze a window= --> compiz crash
3.

Actual results:
compiz crash
Comment 1 Samy Mahmoudi 2018-06-16 20:25:15 UTC
/usr/local/lib/compiz/libanimationaddon.so is actually provided by x11-wm/compiz-plugins-extra, not by x11-wm/compiz.

Besides, both source headers animation-internal.h (from x11-wm/compiz-plugins-main) and animationaddon.h (from x11-wm/compiz-plugins-extra) include compiz-animation.h which uses gnu89 inline semantics.

However, x11-wm/compiz-plugins-main is built with -std=gnu89 whereas x11-wm/compiz-plugins-extra is not. This why main animations work properly whereas extra animations do not.

# /usr/ports/x11-wm/compiz-plugins-extra/patch-Makefile
--- Makefile.orig	2018-06-16 18:40:54.361456000 +0200
+++ Makefile	2018-06-16 15:21:33.174930000 +0200
@@ -20,6 +20,7 @@
 GNU_CONFIGURE=	yes
 USE_GL=		yes
 USES=		gettext gmake libtool:keepla pathfix pkgconfig tar:bzip2
+USE_CSTD=	gnu89
 USE_GNOME=	gconf2 intltool
 USE_XORG=	glproto
 USE_LDCONFIG=	yes
# End of file
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2018-07-29 02:33:10 UTC
testbuilds@work
Comment 3 andy 2018-07-29 03:17:38 UTC
I confirm that adding +USE_CSTD= gnu89 to the makefile fixes the problem for me, compiz-plugins-extra now works correctly.  Thanks to Samy Mahmoudi for providing the fix.  Also, Samy is correct bug should refer to x11-wm/compiz-plugins-extra.

- Summary corrected
Comment 4 Kurt Jaeger freebsd_committer freebsd_triage 2018-07-29 03:45:05 UTC
Committed, thanks!
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-07-29 03:45:17 UTC
A commit references this bug:

Author: pi
Date: Sun Jul 29 03:44:59 UTC 2018
New revision: 475624
URL: https://svnweb.freebsd.org/changeset/ports/475624

Log:
  x11-wm/compiz-plugins-extra: fix crashes when using animation

  - source headers animation-internal.h (from x11-wm/compiz-plugins-main)
    and animationaddon.h (from x11-wm/compiz-plugins-extra) include
    compiz-animation.h which uses gnu89 inline semantics.
  - x11-wm/compiz-plugins-main is built with -std=gnu89 whereas
    x11-wm/compiz-plugins-extra is not. This why main animations work
    properly whereas extra animations do not.

  PR:		217731
  Reported by:	andy@neu.net
  Submitted by:	Samy Mahmoudi <samy.mahmoudi@gmail.com>
  Approved by:	freebsd-ports@dan.me.uk (maintainer timeout)

Changes:
  head/x11-wm/compiz-plugins-extra/Makefile
Comment 6 Samy Mahmoudi 2018-07-29 14:14:42 UTC
Thank you both for your attention.