Re: undefined symbol: PL_stack_sp

[email protected] (demerphq) Thu, 17 Jul 2014 23:24:53 +0200
Newsgroups perl.inline
Message-ID <CANgJU+Uv+mknKCFdEwn1Uq9df_4BEpmFaBSTDBcArHekfQE9UA@mail.gmail.com>
--001a11c169ae8f754f04fe6a4591
Content-Type: text/plain; charset=UTF-8

On 17 July 2014 14:22, <[email protected]> wrote:

>
> From: demerphq
> Sent: Thursday, July 17, 2014 7:25 PM
> To: Sisyphus
> Cc: [email protected]
>
>
>  When I moved the scripts out of a perl build tree it started behaving
>> properly. IMO that issue can be left at "so dont do that". :-)
>>
>
> AFAICT, the only difference between building in /git_tree/perl/Porting and
> /somewhere/else is that instead of doing:
>
> cc -c  -I"/git_tree/perl/Porting" -D_REENTRANT [...] FOO_1ef8.c
> the build will do:
> cc -c  -I"/somewhere/else" -D_REENTRANT [...] FOO_1ef8.c
>
> All other commands that get run would be the same. (You could check this
> by comparing the BUILD_NOISY outputs for both situations.)
>
> So I'm wondering whether, in the running of the above command, something
> was found in "/git_tree/perl/Porting" that really ought not have been found
> and loaded.
>

Below is output from it failing and it suceeding (this is perlbrew 5.14.4):

~/git_tree/perl/Porting$ perl test_inline.pl
validate Stage
<-----------------------Information
Section----------------------------------->

Information about the processing of your Inline C code:

Your source code needs to be compiled. I'll use this build directory:
/git_tree/perl/Porting/_Inline/build/test_inline_pl_21ea2

and I'll install the executable as:
/git_tree/perl/Porting/_Inline/lib/auto/test_inline_pl_21ea2/test_inline_pl_21ea2.so

get_maps Stage
The following Inline C function(s) have been successfully bound to Perl:
void greet(char * name)

<-----------------------End of Information
Section---------------------------->
Starting Build Preprocess Stage
Finished Build Preprocess Stage

Starting Build Parse Stage
Finished Build Parse Stage

Starting Build Glue 1 Stage
Finished Build Glue 1 Stage

Starting Build Glue 2 Stage
Finished Build Glue 2 Stage

Starting Build Glue 3 Stage
Finished Build Glue 3 Stage

Starting Build Compile Stage
  Starting "perl Makefile.PL" Stage
Writing Makefile for test_inline_pl_21ea2
Writing MYMETA.yml
  Finished "perl Makefile.PL" Stage

  Starting "make" Stage
/home/yorton/perl5/perlbrew/perls/perl-5.14.4/bin/perl
/home/yorton/perl5/perlbrew/perls/perl-5.14.4/lib/5.14.4/ExtUtils/xsubpp
 -typemap
"/home/yorton/perl5/perlbrew/perls/perl-5.14.4/lib/5.14.4/ExtUtils/typemap"
  test_inline_pl_21ea2.xs > test_inline_pl_21ea2.xsc && mv
test_inline_pl_21ea2.xsc test_inline_pl_21ea2.c
make: *** No rule to make target `../../../../fakethr.h', needed by
`test_inline_pl_21ea2.o'. Stop.

A problem was encountered while attempting to compile and install your
Inline
C code. The command that failed was:
  "make" with error code 2

The build directory was:
/git_tree/perl/Porting/_Inline/build/test_inline_pl_21ea2

To debug the problem, cd to the build directory, and inspect the output
files.

 at test_inline.pl line 0.
...propagated at
/home/yorton/perl5/perlbrew/perls/perl-5.14.4/lib/site_perl/5.14.4/Inline/C.pm
line 834.
INIT failed--call queue aborted.

#########################################################################################

If I build outside of my perl git checkout:

#########################################################################################

~/git_tree/hashy$ perl test_inline.pl
validate Stage
<-----------------------Information
Section----------------------------------->

Information about the processing of your Inline C code:

Your source code needs to be compiled. I'll use this build directory:
/git_tree/hashy/_Inline/build/test_inline_pl_21ea

and I'll install the executable as:
/git_tree/hashy/_Inline/lib/auto/test_inline_pl_21ea/test_inline_pl_21ea.so

get_maps Stage
The following Inline C function(s) have been successfully bound to Perl:
void greet(char * name)

<-----------------------End of Information
Section---------------------------->
Starting Build Preprocess Stage
Finished Build Preprocess Stage

Starting Build Parse Stage
Finished Build Parse Stage

Starting Build Glue 1 Stage
Finished Build Glue 1 Stage

Starting Build Glue 2 Stage
Finished Build Glue 2 Stage

Starting Build Glue 3 Stage
Finished Build Glue 3 Stage

Starting Build Compile Stage
  Starting "perl Makefile.PL" Stage
Writing Makefile for test_inline_pl_21ea
Writing MYMETA.yml
  Finished "perl Makefile.PL" Stage

  Starting "make" Stage
/home/yorton/perl5/perlbrew/perls/perl-5.14.4/bin/perl
/home/yorton/perl5/perlbrew/perls/perl-5.14.4/lib/5.14.4/ExtUtils/xsubpp
 -typemap
"/home/yorton/perl5/perlbrew/perls/perl-5.14.4/lib/5.14.4/ExtUtils/typemap"
  test_inline_pl_21ea.xs > test_inline_pl_21ea.xsc && mv
test_inline_pl_21ea.xsc test_inline_pl_21ea.c
cc -c  -I"/git_tree/hashy" -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2
-DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC
"-I/home/yorton/perl5/perlbrew/perls/perl-5.14.4/lib/5.14.4/x86_64-linux/CORE"
  test_inline_pl_21ea.c
Running Mkbootstrap for test_inline_pl_21ea ()
chmod 644 test_inline_pl_21ea.bs
rm -f blib/arch/auto/test_inline_pl_21ea/test_inline_pl_21ea.so
cc  -shared -O2 -L/usr/local/lib -fstack-protector test_inline_pl_21ea.o
 -o blib/arch/auto/test_inline_pl_21ea/test_inline_pl_21ea.so \
     \

chmod 755 blib/arch/auto/test_inline_pl_21ea/test_inline_pl_21ea.so
cp test_inline_pl_21ea.bs blib/arch/auto/test_inline_pl_21ea/
test_inline_pl_21ea.bs
chmod 644 blib/arch/auto/test_inline_pl_21ea/test_inline_pl_21ea.bs
  Finished "make" Stage

  Starting "make install" Stage
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
  Finished "make install" Stage

  Starting Cleaning Up Stage
  Finished Cleaning Up Stage

Finished Build Compile Stage

Hello Ingy!
Hello 42!



-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

--001a11c169ae8f754f04fe6a4591
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 1=
7 July 2014 14:22,  <span dir=3D"ltr">&lt;<a href=3D"mailto:sisyphus1@optus=
net.com.au" target=3D"_blank">[email protected]</a>&gt;</span> wrot=
e:<br><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;b=
order-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:s=
olid;padding-left:1ex">
<br>
From: demerphq<br>
Sent: Thursday, July 17, 2014 7:25 PM<br>
To: Sisyphus<br>
Cc: <a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a=
><div class=3D""><br>
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p=
adding-left:1ex">
When I moved the scripts out of a perl build tree it started behaving prope=
rly. IMO that issue can be left at &quot;so dont do that&quot;. :-)<br>
</blockquote>
<br></div>
AFAICT, the only difference between building in /git_tree/perl/Porting and =
/somewhere/else is that instead of doing:<br>
<br>
cc -c =C2=A0-I&quot;/git_tree/perl/Porting&quot; -D_REENTRANT [...] FOO_1ef=
8.c<br>
the build will do:<br>
cc -c =C2=A0-I&quot;/somewhere/else&quot; -D_REENTRANT [...] FOO_1ef8.c<br>
<br>
All other commands that get run would be the same. (You could check this by=
 comparing the BUILD_NOISY outputs for both situations.)<br>
<br>
So I&#39;m wondering whether, in the running of the above command, somethin=
g was found in &quot;/git_tree/perl/Porting&quot; that really ought not hav=
e been found and loaded.<br></blockquote><div>=C2=A0</div><div>Below is out=
put from it failing and it suceeding (this is perlbrew 5.14.4):</div>
<div><br></div><div><div>~/git_tree/perl/Porting$ perl <a href=3D"http://te=
st_inline.pl">test_inline.pl</a>=C2=A0</div><div>validate Stage</div><div>&=
lt;-----------------------Information Section------------------------------=
-----&gt;</div>
<div><br></div><div>Information about the processing of your Inline C code:=
</div><div><br></div><div>Your source code needs to be compiled. I&#39;ll u=
se this build directory:</div><div>/git_tree/perl/Porting/_Inline/build/tes=
t_inline_pl_21ea2</div>
<div><br></div><div>and I&#39;ll install the executable as:</div><div>/git_=
tree/perl/Porting/_Inline/lib/auto/test_inline_pl_21ea2/test_inline_pl_21ea=
2.so</div><div><br></div><div>get_maps Stage</div><div>The following Inline=
 C function(s) have been successfully bound to Perl:</div>
<div><span class=3D"" style=3D"white-space:pre">	</span>void greet(char * n=
ame)</div><div><br></div><div>&lt;-----------------------End of Information=
 Section----------------------------&gt;</div><div>Starting Build Preproces=
s Stage</div>
<div>Finished Build Preprocess Stage</div><div><br></div><div>Starting Buil=
d Parse Stage</div><div>Finished Build Parse Stage</div><div><br></div><div=
>Starting Build Glue 1 Stage</div><div>Finished Build Glue 1 Stage</div>
<div><br></div><div>Starting Build Glue 2 Stage</div><div>Finished Build Gl=
ue 2 Stage</div><div><br></div><div>Starting Build Glue 3 Stage</div><div>F=
inished Build Glue 3 Stage</div><div><br></div><div>Starting Build Compile =
Stage</div>
<div>=C2=A0 Starting &quot;perl Makefile.PL&quot; Stage</div><div>Writing M=
akefile for test_inline_pl_21ea2</div><div>Writing MYMETA.yml</div><div>=C2=
=A0 Finished &quot;perl Makefile.PL&quot; Stage</div><div><br></div><div>=
=C2=A0 Starting &quot;make&quot; Stage</div>
<div>/home/yorton/perl5/perlbrew/perls/perl-5.14.4/bin/perl /home/yorton/pe=
rl5/perlbrew/perls/perl-5.14.4/lib/5.14.4/ExtUtils/xsubpp =C2=A0-typemap &q=
uot;/home/yorton/perl5/perlbrew/perls/perl-5.14.4/lib/5.14.4/ExtUtils/typem=
ap&quot; =C2=A0 test_inline_pl_21ea2.xs &gt; test_inline_pl_21ea2.xsc &amp;=
&amp; mv test_inline_pl_21ea2.xsc test_inline_pl_21ea2.c</div>
<div>make: *** No rule to make target `../../../../fakethr.h&#39;, needed b=
y `test_inline_pl_21ea2.o&#39;. Stop.</div><div><br></div><div>A problem wa=
s encountered while attempting to compile and install your Inline</div>
<div>C code. The command that failed was:</div><div>=C2=A0 &quot;make&quot;=
 with error code 2</div><div><br></div><div>The build directory was:</div><=
div>/git_tree/perl/Porting/_Inline/build/test_inline_pl_21ea2</div><div><br=
>
</div><div>To debug the problem, cd to the build directory, and inspect the=
 output files.</div><div><br></div><div>=C2=A0at <a href=3D"http://test_inl=
ine.pl">test_inline.pl</a> line 0.</div><div><span class=3D"" style=3D"whit=
e-space:pre">	</span>...propagated at /home/yorton/perl5/perlbrew/perls/per=
l-5.14.4/lib/site_perl/5.14.4/Inline/C.pm line 834.</div>
<div>INIT failed--call queue aborted.</div></div><div><br></div><div>######=
###########################################################################=
########</div><div><br></div><div>If I build outside of my perl git checkou=
t:</div>
<div><br></div><div>#######################################################=
##################################<br></div><div><div><br></div><div>~/git_=
tree/hashy$ perl <a href=3D"http://test_inline.pl">test_inline.pl</a>=C2=A0=
</div>
<div>validate Stage</div><div>&lt;-----------------------Information Sectio=
n-----------------------------------&gt;</div><div><br></div><div>Informati=
on about the processing of your Inline C code:</div><div><br></div><div>
Your source code needs to be compiled. I&#39;ll use this build directory:</=
div><div>/git_tree/hashy/_Inline/build/test_inline_pl_21ea</div><div><br></=
div><div>and I&#39;ll install the executable as:</div><div>/git_tree/hashy/=
_Inline/lib/auto/test_inline_pl_21ea/test_inline_pl_21ea.so</div>
<div><br></div><div>get_maps Stage</div><div>The following Inline C functio=
n(s) have been successfully bound to Perl:</div><div><span class=3D"" style=
=3D"white-space:pre">	</span>void greet(char * name)</div><div><br></div><d=
iv>
&lt;-----------------------End of Information Section----------------------=
------&gt;</div><div>Starting Build Preprocess Stage</div><div>Finished Bui=
ld Preprocess Stage</div><div><br></div><div>Starting Build Parse Stage</di=
v>
<div>Finished Build Parse Stage</div><div><br></div><div>Starting Build Glu=
e 1 Stage</div><div>Finished Build Glue 1 Stage</div><div><br></div><div>St=
arting Build Glue 2 Stage</div><div>Finished Build Glue 2 Stage</div><div>
<br></div><div>Starting Build Glue 3 Stage</div><div>Finished Build Glue 3 =
Stage</div><div><br></div><div>Starting Build Compile Stage</div><div>=C2=
=A0 Starting &quot;perl Makefile.PL&quot; Stage</div><div>Writing Makefile =
for test_inline_pl_21ea</div>
<div>Writing MYMETA.yml</div><div>=C2=A0 Finished &quot;perl Makefile.PL&qu=
ot; Stage</div><div><br></div><div>=C2=A0 Starting &quot;make&quot; Stage</=
div><div>/home/yorton/perl5/perlbrew/perls/perl-5.14.4/bin/perl /home/yorto=
n/perl5/perlbrew/perls/perl-5.14.4/lib/5.14.4/ExtUtils/xsubpp =C2=A0-typema=
p &quot;/home/yorton/perl5/perlbrew/perls/perl-5.14.4/lib/5.14.4/ExtUtils/t=
ypemap&quot; =C2=A0 test_inline_pl_21ea.xs &gt; test_inline_pl_21ea.xsc &am=
p;&amp; mv test_inline_pl_21ea.xsc test_inline_pl_21ea.c</div>
<div>cc -c =C2=A0-I&quot;/git_tree/hashy&quot; -fno-strict-aliasing -pipe -=
fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BI=
TS=3D64 -O2 =C2=A0 -DVERSION=3D\&quot;0.00\&quot; -DXS_VERSION=3D\&quot;0.0=
0\&quot; -fPIC &quot;-I/home/yorton/perl5/perlbrew/perls/perl-5.14.4/lib/5.=
14.4/x86_64-linux/CORE&quot; =C2=A0 test_inline_pl_21ea.c</div>
<div>Running Mkbootstrap for test_inline_pl_21ea ()</div><div>chmod 644 <a =
href=3D"http://test_inline_pl_21ea.bs">test_inline_pl_21ea.bs</a></div><div=
>rm -f blib/arch/auto/test_inline_pl_21ea/test_inline_pl_21ea.so</div><div>
cc =C2=A0-shared -O2 -L/usr/local/lib -fstack-protector test_inline_pl_21ea=
.o =C2=A0-o blib/arch/auto/test_inline_pl_21ea/test_inline_pl_21ea.so <span=
 class=3D"" style=3D"white-space:pre">	</span>\</div><div><span class=3D"" =
style=3D"white-space:pre">	</span> =C2=A0 =C2=A0 <span class=3D"" style=3D"=
white-space:pre">	</span>\</div>
<div><span class=3D"" style=3D"white-space:pre">	</span> =C2=A0</div><div>c=
hmod 755 blib/arch/auto/test_inline_pl_21ea/test_inline_pl_21ea.so</div><di=
v>cp <a href=3D"http://test_inline_pl_21ea.bs">test_inline_pl_21ea.bs</a> b=
lib/arch/auto/test_inline_pl_21ea/<a href=3D"http://test_inline_pl_21ea.bs"=
>test_inline_pl_21ea.bs</a></div>
<div>chmod 644 blib/arch/auto/test_inline_pl_21ea/<a href=3D"http://test_in=
line_pl_21ea.bs">test_inline_pl_21ea.bs</a></div><div>=C2=A0 Finished &quot=
;make&quot; Stage</div><div><br></div><div>=C2=A0 Starting &quot;make insta=
ll&quot; Stage</div>
<div>Files found in blib/arch: installing files in blib/lib into architectu=
re dependent library tree</div><div>=C2=A0 Finished &quot;make install&quot=
; Stage</div><div><br></div><div>=C2=A0 Starting Cleaning Up Stage</div><di=
v>=C2=A0 Finished Cleaning Up Stage</div>
<div><br></div><div>Finished Build Compile Stage</div><div><br></div><div>H=
ello Ingy!</div><div>Hello 42!</div></div><div><br></div></div><br clear=3D=
"all"><div><br></div>-- <br>perl -Mre=3Ddebug -e &quot;/just|another|perl|h=
acker/&quot;
</div></div>

--001a11c169ae8f754f04fe6a4591--