List Info

Thread: Problem building w -Accflags=-DPERL_DEBUG_READONLY_OP




Problem building w -Accflags=-DPERL_DEBUG_READONLY_OP
user name
2007-08-30 17:26:46
FWIW,

starting with:

sh Configure -des -Dusedevel
-Accflags=-DPERL_DEBUG_READONLY_OP

compiling gives me this warning:

pad.c: In function 'Perl_cv_clone':
pad.c:1471: warning: implicit declaration of function
'Perl_op_refcnt_inc'
pad.c:1471: warning: assignment makes pointer from integer
without a cast

perl.c: In function 'S_run_body':
perl.c:2415: warning: implicit declaration of function
'Perl_pending_Slabs_to_ro'

 ...

eventually yielding:

cc -L/usr/local/lib -o miniperl 
            `echo   gv.o toke.o perly.o op.o pad.o regcomp.o
dump.o
util.o mg.o reentr.o mro
.o hv.o av.o perl.o run.o pp_hot.o sv.o pp.o scope.o
pp_ctl.o pp_sys.o
doop.o doio.o regexec
.o utf8.o taint.o deb.o universal.o xsutils.o globals.o
perlio.o
perlapi.o numeric.o mathoms
.o locale.o pp_pack.o pp_sort.o  | sed 's/ op.o / /'` 
            miniperlmain.o opmini.o -lnsl -ldl -lm -lcrypt
-lutil -lc
pad.o: In function `Perl_cv_clone':
pad.c:(.text+0x1a53): undefined reference to
`Perl_op_refcnt_inc'
regcomp.o: In function `Perl_regfree_internal':
regcomp.c:(.text+0x7a2): undefined reference to
`Perl_op_refcnt_dec'
perl.o: In function `perl_run':
perl.c:(.text+0x2d24): undefined reference to
`Perl_pending_Slabs_to_ro'
opmini.o: In function `Perl_op_free':
opmini.c:(.text+0x14e3): undefined reference to
`Slab_to_rw'
opmini.c:(.text+0x15a0): undefined reference to
`Perl_op_refcnt_dec'
collect2: ld returned 1 exit status
make: *** [miniperl] Error 1


I fixed it by adding -DDEBUGGING to the configuration
(compiling now,
testing soon)
I guess thats why *_DEBUG_* is in the symbol 


BTW - this looks counterintuitive - from pad.c:1472:

    OP_REFCNT_LOCK;
    CvROOT(cv)		= OpREFCNT_inc(CvROOT(proto));
    OP_REFCNT_UNLOCK;

Re: Problem building w -Accflags=-DPERL_DEBUG_READONLY_OP
user name
2007-08-31 03:02:33
> BTW - this looks counterintuitive - from pad.c:1472:
> 
>     OP_REFCNT_LOCK;
>     CvROOT(cv)		= OpREFCNT_inc(CvROOT(proto));
>     OP_REFCNT_UNLOCK;

Why do you think it looks counterintuitive?

-- 
In England there is a special word which means the last
sunshine
of the summer. That word is "spring".

Re: Problem building w -Accflags=-DPERL_DEBUG_READONLY_OP
user name
2007-08-31 12:41:37
Dave Mitchell wrote:
>> BTW - this looks counterintuitive - from
pad.c:1472:
>>
>>     OP_REFCNT_LOCK;
>>     CvROOT(cv)		= OpREFCNT_inc(CvROOT(proto));
>>     OP_REFCNT_UNLOCK;
>>     
>
> Why do you think it looks counterintuitive?
>
>   
Well, by analogy to a bike-lock, you unlock it to ride
(increment) it,
then re-lock it when you get where your going ( the bikeshed
).
And if it stays unlocked, its also unprotected.

OTOH, if LOCK == Mutex, the 3 lines make more sense.
and it is, now that I look, sorry..   And theres even
commentary:

             [ 29488]
             add missing OP_REFCNT_LOCK/UNLOCKs and document
it

s/looks/looked at first glance/


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )