develooper Front page | perl.perl5.porters | Postings from April 2012

[perl #112536] Setting -g3 is not trivial

Thread Next
From:
Ruslan Zakirov
Date:
April 21, 2012 10:49
Subject:
[perl #112536] Setting -g3 is not trivial
Message ID:
rt-3.6.HEAD-4610-1334832995-139.112536-75-0@perl.org
# New Ticket Created by  Ruslan Zakirov 
# Please include the string:  [perl #112536]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=112536 >


This is a bug report for perl from ruz@new-mac.local,
generated with the help of perlbug 1.39 running under perl 5.15.9.

-----------------------------------------------------------------
[Please describe your issue here]

Wanted to compile perl with -g3 flag to enable macros expanding
in GDB. According to INSTALL document:

    =item -DEBUGGING=-g

    =item -Doptimize=-g

    Adds -g to optimize, but does not set -DDEBUGGING.

    (Note:  Your system may actually require something like cc -g2.
    Check your man pages for cc(1) and also any hint file for your system.)

This note made me believe that I can set -DEBUGGING=-g3 and it will work,
but it failed. I've tried a combinations using -Accflags and -DDEBUGGING.
It was a mess. Ended up looking into Configure script to figure it out.

Final variant that worked for me:

    -Doptimize='-O3 -g3' -DEBUGGING

So it has two disadvantages: 1) you have to know or struggle 2) have to
repeat default value (-O3).

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=install
    severity=low
---
Site configuration information for perl 5.15.9:

Configured by ruz at Thu Apr 19 13:44:09 GET 2012.

Summary of my perl5 (revision 5 version 15 subversion 9) configuration:
  Local Commit: 72fe21782afa1cae1beef02d6a0216ed4c9c5e6a
  Ancestor: 1a15d16d8ab308fc4f99063c180391a513f81fdb
  Platform:
    osname=darwin, osvers=10.8.0, archname=darwin-thread-multi-2level
    uname='darwin new-mac.local 10.8.0 darwin kernel version 10.8.0:
tue jun 7 16:33:36 pdt 2011; root:xnu-1504.15.3~1release_i386 i386
i386 macbook7,1 darwin '
    config_args='-des -Dprefix=/Users/ruz/perl/blead -Dusedevel
-Doptimize=-O3 -g3 -DEBUGGING -Dusemymalloc -Dusethreads
-Dinc_version_list=none'
    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=undef
    usemymalloc=y, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-common -DPERL_DARWIN -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-I/opt/local/include',
    optimize='-O3 -g3',
    cppflags='-fno-common -DPERL_DARWIN -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-I/opt/local/include'
    ccversion='', gccversion='4.2.1 (Gentoo 4.2.1_p5666, Apple Inc.
build 5666) (dot 3)', 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='double', nvsize=8, Off_t='off_t',
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags ='
-fstack-protector -L/usr/local/lib -L/opt/local/lib'
    libpth=/usr/local/lib /opt/local/lib /usr/lib
    libs=-lgdbm -ldbm -ldl -lm -lutil -lc
    perllibs=-ldl -lm -lutil -lc
    libc=, so=dylib, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup
-L/usr/local/lib -L/opt/local/lib -fstack-protector'

Locally applied patches:


---
@INC for perl 5.15.9:
    /Users/ruz/perl/blead/lib/site_perl/5.15.9/darwin-thread-multi-2level
    /Users/ruz/perl/blead/lib/site_perl/5.15.9
    /Users/ruz/perl/blead/lib/5.15.9/darwin-thread-multi-2level
    /Users/ruz/perl/blead/lib/5.15.9
    .

---
Environment for perl 5.15.9:
    DYLD_LIBRARY_PATH=/opt/oracle/instantclient_10_2_64bit/:
    HOME=/Users/ruz
    LANG=ru_RU.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/Users/ruz/bin:/opt/local/bin:/opt/local/sbin:/opt/portage/usr/sbin:/opt/portage/usr/bin:/opt/portage/sbin:/opt/portage/bin:/opt/portage/usr/local/bin/:/opt/portage/opt/bin:/opt/portage/usr/sbin:/opt/portage/sbin:/opt/portage/usr/x86_64-apple-darwin10/gcc-bin/4.2.1:/opt/local/usr/sbin:/opt/local/usr/bin:/opt/local/sbin:/opt/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:/usr/X11/bin:/Users/ruz/.perl6/bin:/Users/ruz/projs/perl6/rakudo/install/bin
    PERL_BADLANG (unset)
    SHELL=/opt/portage/bin/bash

-- 
Best regards, Ruslan.


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About