PERL_USE_SAFE_PUTENV (Re: [Custom PREFIX]
x11-toolkits/p5-Wx-Perl-ProcessStream - fails: coredump)
Cezary Morga
cm at therek.net
Fri Jun 26 09:23:49 UTC 2009
Hi.
Although this is a follow-up to my and Ion-Mihai Tetcu's corespondence,
freebsd-perl@ folks, please bear with me till the end.
Ion-Mihai, I've finally managed to locate the source of
p5-Wx-Perl-ProcessStream's core dumping (at least on 8-CURRENT).
It comes from p5-Wx memory leaks problems on which
p5-Wx-Perl-ProcessStream depends on, which in turn comes from Perl
trying to directly manipulate environment (see Envinronment access
section:
http://search.cpan.org/~rgarcia/perl-5.10.0/INSTALL#Environment_access).
I'm currently testing a small patch for p5-Wx to try forcing the use of
FreeBSD's putenv() and if it'll work then p5-Wx-Perl-ProcessStream issue
should be resolved.
But I think forcing Perl itself to use putenv() (-DPERL_USE_SAFE_PUTENV
compilation flag) might be a solution worth at least a though. It would
not only solve my problem but I believe other (like ports/131664) too.
And here comes a question to skv@ and free-ports@: what do you think
about it?
In attachment I'm sending a patch for lang/perl5.10/Makefile but I think
this should work for perl5.8 as well.
--
Cezary Morga
-------------- next part --------------
--- lang/perl5.10/Makefile.orig 2009-04-11 14:51:22.000000000 +0200
+++ lang/perl5.10/Makefile 2009-06-26 11:06:10.000000000 +0200
@@ -52,7 +52,8 @@
-Dsiteman1dir=${PREFIX}/man/man1 \
-Ui_malloc -Ui_iconv -Uinstallusrbinperl \
-Dcc="${CC}" -Duseshrplib -Dinc_version_list=none \
- -Dccflags=-DAPPLLIB_EXP=\"${BSDPAN_DEST}\"
+ -Dccflags=-DAPPLLIB_EXP=\"${BSDPAN_DEST}\" \
+ -DPERL_USE_SAFE_PUTENV -A append:ccflags=" -DPERL_USE_SAFE_PUTENV"
LOCALE_CLEANUP= LANG="" LC_ALL="" LC_COLLATE="" LC_CTYPE="" \
LC_MESSAGES="" LC_MONETARY="" LC_NUMERIC="" \
LC_TIME=""
More information about the freebsd-perl
mailing list