Bug 187571 - lang/perl5.16: fix the build of x11/rxvt-unicode on -CURRENT
Summary: lang/perl5.16: fix the build of x11/rxvt-unicode on -CURRENT
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-perl (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-14 10:20 UTC by Thierry Thomas
Modified: 2014-03-15 10:10 UTC (History)
1 user (show)

See Also:


Attachments
perl5.16.diff (1.17 KB, patch)
2014-03-14 10:20 UTC, Thierry Thomas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Thomas freebsd_committer freebsd_triage 2014-03-14 10:20:00 UTC
The compilation of x11/rxvt-unicode fails with clang34 (i.e. ATM on
-CURRENT) with the following message:

 --- rxvtperl.o ---
c++ -I.. -I. -I. -I./../libev -I./../libptytty/src -DHAVE_CONFIG_H
-I/usr/local/include -D_THREAD_SAFE -I/usr/local/include   -D_THREAD_SAFE
-I/usr/local/include  -I/usr/local/include/freetype2   -I/usr/local/include
 -I/usr/local/include/freetype2 -O2 -pipe -fno-strict-aliasing -w
-I/usr/local/include -I/usr/local/include/gdk-pixbuf-2.0 -pthread
-I/usr/local/include/glib-2.0 -I/usr/local/include
-I/usr/local/include/libpng15
-DAPPLLIB_EXP="/usr/local/lib/perl5/5.16/BSDPAN" -DHAS_FPSETMASK
-DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include  -I/usr/local/lib/perl5/5.16/mach/CORE
-DLIBDIR="\"/usr/local/lib/urxvt\"" -c rxvtperl.C
--- rxvtc ---
c++  -o rxvtc rxvtc.o rxvtdaemon.o fdpass_wrapper.o -lstdc++ -lutil -lm
--- rxvtperl.o ---
./rxvtperl.c:5493:5: error: declaration of 'Perl___notused' has a different
language linkage
    dVAR; dXSARGS;
    ^
/usr/local/lib/perl5/5.16/mach/CORE/perl.h:174:17: note: expanded from
macro 'dVAR'
#  define dVAR          dNOOP

The file rxvtperl.C is generated by xsubpp from rxvtperl.xs, and it can
be fixed in ExtUtils/ParseXS.pm by the hereunder patch.

Fix: This patch fixes the problem.

	/!\ It could have implications on other ports!

	Note: may be the other Perl ports should be fixed too?
How-To-Repeat: 	Either build x11/rxvt-unicode on -CURRENT or with clang34.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-03-14 10:20:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->perl

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Andrej Zverev 2014-03-15 08:43:33 UTC
Hello.=20

You need (I think) this commit: =
http://perl5.git.perl.org/perl.git/commit/7db66e12883f0832ca80164b723768b8=
48187bda

Can you try this patch*? If it is fine for you, please commit and close =
PR :-)


* http://people.freebsd.org/~az/perl/rxvt-unicode.diff
Comment 3 dfilter service freebsd_committer freebsd_triage 2014-03-15 09:57:44 UTC
Author: thierry
Date: Sat Mar 15 09:57:40 2014
New Revision: 348304
URL: http://svnweb.freebsd.org/changeset/ports/348304
QAT: https://qat.redports.org/buildarchive/r348304/

Log:
  Fix the build of x11/rxvt-unicode with clang34, by defining a more
  C++-friendly dNOOP.
  
  Note: don't apply the patch proposed in the PR, but a patch proposed
  by Craig A. Berry at
  http://perl5.git.perl.org/perl.git/commit/7db66e12883f0832ca80164b723768b848187bda
  as suggested by az@.
  
  PR:		ports/187571
  Submitted by:	/me
  Reported by:	Thomas Hoffmann <trh411 (at) gmail.com>
  Approved by:	az

Added:
  head/lang/perl5.16/files/patch-perl.h   (contents, props changed)
Modified:
  head/lang/perl5.16/Makefile

Modified: head/lang/perl5.16/Makefile
==============================================================================
--- head/lang/perl5.16/Makefile	Sat Mar 15 09:50:04 2014	(r348303)
+++ head/lang/perl5.16/Makefile	Sat Mar 15 09:57:40 2014	(r348304)
@@ -3,7 +3,7 @@
 
 PORTNAME=	perl
 PORTVERSION=	${PERL_VERSION}
-PORTREVISION=	7
+PORTREVISION=	8
 CATEGORIES=	lang devel perl5
 MASTER_SITES=	CPAN \
 		${MASTER_SITE_LOCAL:S/$/:local/} \
@@ -77,7 +77,7 @@ PKGDEINSTALL=	${WRKDIR}/use.perl
 .include "${PORTSDIR}/Mk/bsd.default-versions.mk"
 
 # if this port is default due PERL5_DEFAULT
-# change PKGNAME to reflect this 
+# change PKGNAME to reflect this
 .if ${PERL_VER} == ${PERL5_DEFAULT}
 PKGNAMESUFFIX=	${PERL_VERSION:C/\.[0-9]+\.[0-9]+$//}
 .else

Added: head/lang/perl5.16/files/patch-perl.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/perl5.16/files/patch-perl.h	Sat Mar 15 09:57:40 2014	(r348304)
@@ -0,0 +1,14 @@
+--- perl.h.orig	2013-03-04 16:16:22.000000000 +0100
++++ perl.h	2014-03-15 10:42:19.000000000 +0100
+@@ -359,7 +359,11 @@
+ /* Rats: if dTHR is just blank then the subsequent ";" throws an error */
+ /* Declaring a *function*, instead of a variable, ensures that we don't rely
+    on being able to suppress "unused" warnings.  */
++#ifdef __cplusplus
++#define dNOOP (void)0
++#else
+ #define dNOOP extern int Perl___notused(void)
++#endif
+ 
+ #ifndef pTHX
+ /* Don't bother defining tTHX and sTHX; using them outside
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Thierry Thomas freebsd_committer freebsd_triage 2014-03-15 09:58:40 UTC
State Changed
From-To: open->closed


Committed in r348304.
Comment 5 Thierry Thomas freebsd_committer freebsd_triage 2014-03-15 10:00:16 UTC
Le sam 15 mar 14 à  9:43:33 +0100, Andrej Zverev <andrej.zverev@gmail.com>
 écrivait :
> Hello.

Hello!

> You need (I think) this commit: http://perl5.git.perl.org/perl.git/commit/7db66e12883f0832ca80164b723768b848187bda
> 
> Can you try this patch*? If it is fine for you, please commit and close PR :-)
> 
> 
> * http://people.freebsd.org/~az/perl/rxvt-unicode.diff

Great! Just committed, thanks.
-- 
Th. Thomas.