Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarify how to enable -DPERL_USE_SAFE_PUTENV #10499

Closed
p5pRT opened this issue Jul 21, 2010 · 5 comments
Closed

clarify how to enable -DPERL_USE_SAFE_PUTENV #10499

p5pRT opened this issue Jul 21, 2010 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 21, 2010

Migrated from rt.perl.org#76618 (status was 'resolved')

Searchable as RT76618$

@p5pRT
Copy link
Author

p5pRT commented Jul 21, 2010

From @daxim

Created by @daxim

Look at the config_args below. Can you see the mistake I made when I built
this perl? -DDEBUGGING is a recognised option, but -DPERL_USE_SAFE_PUTENV is
not. It must be within -Accflags, but the docs in F<INSTALL> don't make this
clear. Patch attached.

Perl Info

Flags:
    category=docs
    severity=low

Site configuration information for perl 5.10.1:

Configured by daxim at Fri Oct 16 18:45:40 CEST 2009.

Summary of my perl5 (revision 5 version 10 subversion 1) configuration:
   
  Platform:
    osname=linux, osvers=2.6.27.29-0.1-default, archname=x86_64-linux-thread-
multi-ld
    uname='linux galahad 2.6.27.29-0.1-default #1 smp 2009-08-15 17:53:59 
+0200 x86_64 x86_64 x86_64 gnulinux '
    config_args='-Accflags=-fPIC -DDEBUGGING -DPERL_USE_SAFE_PUTENV -
Dcf_email=daxim@cpan.org -Dhtml1dir=/home/daxim/local/share/doc/perl5 -
Dhtml3dir=/home/daxim/local/share/doc/perl5 -Dnoextensions=ODBM_File -
Dman1dir=/home/daxim/local/share/man/man1 -
Dman3dir=/home/daxim/local/share/man/man3 -Dperladmin=daxim@cpan.org -
Dprefix=/home/daxim/local -Dusemorebits -Dusethreads -des'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=define
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fPIC -DDEBUGGING -fno-
strict-aliasing -pipe -fstack-protector -I/usr/local/include -
D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fPIC -DDEBUGGING -fno-strict-
aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.3.2 [gcc-4_3-branch revision 141291]', 
gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', 
lseeksize=8
    alignbytes=16, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -
lgdbm_compat
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.9.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.9'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-
protector'

Locally applied patches:
    


@INC for perl 5.10.1:
    /home/daxim/local/lib/perl5/5.10.1/x86_64-linux-thread-multi-ld
    /home/daxim/local/lib/perl5/5.10.1
    /home/daxim/local/lib/perl5/site_perl/5.10.1/x86_64-linux-thread-multi-ld
    /home/daxim/local/lib/perl5/site_perl/5.10.1
    .


Environment for perl 5.10.1:
    HOME=/home/daxim
    LANG=de_DE.UTF-8
    LANGUAGE=
    LD_LIBRARY_PATH=:/home/daxim/local/share/oracle/lib
    LOGDIR (unset)
    PATH=/home/daxim/local/bin:/opt/kde3/sbin:/sbin:/usr/sbin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin
    PERL_BADLANG (unset)
    PERL_EXTUTILS_AUTOINSTALL=--default-deps
    SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Jul 21, 2010

From @daxim

0001-clarify-how-to-enable-DPERL_USE_SAFE_PUTENV.patch
From dff6190919db2ceb0819c035539d2e19318e2d30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lars=20D=C9=AA=E1=B4=87=E1=B4=84=E1=B4=8B=E1=B4=8F=E1=B4=A1=20=E8=BF=AA=E6=8B=89=E6=96=AF?= <daxim@cpan.org>
Date: Wed, 21 Jul 2010 10:53:50 +0200
Subject: [PATCH] clarify how to enable -DPERL_USE_SAFE_PUTENV

---
 INSTALL |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/INSTALL b/INSTALL
index 1e5ef68..5346337 100644
--- a/INSTALL
+++ b/INSTALL
@@ -495,9 +495,10 @@ to avoid these leaks. The default is now to perform direct manipulation
 whenever perl is running as a stand alone interpreter, and to call the safe
 but potentially leaky C<putenv()> function when the perl interpreter is
 embedded in another application. You can force perl to always use C<putenv()>
-by compiling with -DPERL_USE_SAFE_PUTENV. You can force an embedded perl to
-use direct manipulation by setting C<PL_use_safe_putenv = 0;> after the
-C<perl_construct()> call.
+by compiling with C<-Accflags="-DPERL_USE_SAFE_PUTENV">, see section
+L</"Altering Configure variables for C compiler switches etc.">.
+You can force an embedded perl to use direct manipulation by setting
+C<PL_use_safe_putenv = 0;> after the C<perl_construct()> call.
 
 =head2 Installation Directories
 
-- 
1.7.1

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2010

From @rafl

Thanks, applied.

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2010

From [Unknown Contact. See original ticket]

Thanks, applied.

@p5pRT
Copy link
Author

p5pRT commented Jul 26, 2010

@rafl - Status changed from 'new' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant