Discussion:
[rt.cpan.org #81172] using Inline with => 'Event' fails to compile
Peter Smoczynski via RT
2012-11-14 16:35:41 UTC
Permalink
Wed Nov 14 11:35:40 2012: Request 81172 was acted upon.
Transaction: Ticket created by peter.smoczynski-***@public.gmane.org
Queue: Inline
Subject: using Inline with => 'Event' fails to compile
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: peter.smoczynski-***@public.gmane.org
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81172 >


Hi!

I guess this one has -- indirectly -- sth to do with #67053 space in pwd..?
It's broken since version 0.49.
Version 0.48 works perfectly fine.

sorry!, for not being able to provide a patch.
thanx!, peter


Sun-A3 root 288/0 (~/peter/inline_fails_to_compile)# la
total 1
-rw-r--r-- 1 root root 529 Nov 14 17:05 compile_test_1.t
Sun-A3 root 289/0 (~/peter/inline_fails_to_compile)# cat compile_test_1.t
#!/opt/perl5.12.2.debug/bin/perl

use strict;
use warnings;

use Inline with => 'Event';

use Inline C => <<'EOC_EVDMP_EVENT_C';
void evdmp_event_c (pe_event * event)
{
char *classname = HvNAME(SvSTASH(SvRV(event->mysv)));

printf("evdmp_event_c()\ne type: %s\ne hits: %d\ne prio %d\n",
classname,
event->hits,
event->prio
);

if (strcmp(classname, (const char *) "Event::Event::Io") == 0)
{
printf("e got: %u\n", ((pe_ioevent *) event)->got);
}

}
EOC_EVDMP_EVENT_C

exit 0;

Sun-A3 root 290/0 (~/peter/inline_fails_to_compile)#

Sun-A3 root 290/0 (~/peter/inline_fails_to_compile)#
/opt/perl5.12.2.debug/bin/perl -c compile_test_1.t
/opt/perl5.12.2.debug/bin/perl
/opt/perl5.12.2.debug/lib/5.12.2/ExtUtils/xsubpp -typemap
"/opt/perl5.12.2.debug/lib/5.12.2/ExtUtils/typemap" -typemap
"/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event/typemap"
compile_test_1_t_a7b1.xs > compile_test_1_t_a7b1.xsc && mv
compile_test_1_t_a7b1.xsc compile_test_1_t_a7b1.c
gcc -c -I"/root/peter/inline_fails_to_compile" "-I
/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"
-I/usr/local/include -I/usr/local/BerkeleyDB.4.5/include -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -g
-DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC
"-I/opt/perl5.12.2.debug/lib/5.12.2/i86pc-solaris/CORE"
compile_test_1_t_a7b1.c
compile_test_1_t_a7b1.xs:5:22: error: EventAPI.h: No such file or directory
compile_test_1_t_a7b1.xs:6: error: expected ')' before '*' token
compile_test_1_t_a7b1.c: In function 'XS_main_evdmp_event_c':
compile_test_1_t_a7b1.c:99: error: 'pe_event' undeclared (first use in
this function)
compile_test_1_t_a7b1.c:99: error: (Each undeclared identifier is
reported only once
compile_test_1_t_a7b1.c:99: error: for each function it appears in.)
compile_test_1_t_a7b1.c:99: error: 'event' undeclared (first use in this
function)
compile_test_1_t_a7b1.c:99: error: expected expression before ')' token
make: *** [compile_test_1_t_a7b1.o] Error 1

A problem was encountered while attempting to compile and install your
Inline
C code. The command that failed was:
make > out.make 2>&1

The build directory was:
/root/peter/inline_fails_to_compile/_Inline/build/compile_test_1_t_a7b1

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

at compile_test_1.t line 8
BEGIN failed--compilation aborted at compile_test_1.t line 25.
Sun-A3 root 291/2 (~/peter/inline_fails_to_compile)#

Sun-A3 root 291/2 (~/peter/inline_fails_to_compile)# cd
/root/peter/inline_fails_to_compile/_Inline/build/compile_test_1_t_a7b1

Sun-A3 root 292/0
(~/peter/inline_fails_to_compile/_Inline/build/compile_test_1_t_a7b1)#
gcc -c -I"/root/peter/inline_fails_to_compile" "-I
/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"
-I/usr/local/include -I/usr/local/BerkeleyDB.4.5/include -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -g
-DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC
"-I/opt/perl5.12.2.debug/lib/5.12.2/i86pc-solaris/CORE"
compile_test_1_t_a7b1.c
compile_test_1_t_a7b1.xs:5:22: error: EventAPI.h: No such file or directory
compile_test_1_t_a7b1.xs:6: error: expected ')' before '*' token
compile_test_1_t_a7b1.c: In function 'XS_main_evdmp_event_c':
compile_test_1_t_a7b1.c:99: error: 'pe_event' undeclared (first use in
this function)
compile_test_1_t_a7b1.c:99: error: (Each undeclared identifier is
reported only once
compile_test_1_t_a7b1.c:99: error: for each function it appears in.)
compile_test_1_t_a7b1.c:99: error: 'event' undeclared (first use in this
function)
compile_test_1_t_a7b1.c:99: error: expected expression before ')' token
Sun-A3 root 293/1
(~/peter/inline_fails_to_compile/_Inline/build/compile_test_1_t_a7b1)#

Sun-A3 root 293/1
(~/peter/inline_fails_to_compile/_Inline/build/compile_test_1_t_a7b1)#
gcc -c -I"/root/peter/inline_fails_to_compile"
-I"/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"
-I/usr/local/include -I/usr/local/BerkeleyDB.4.5/include -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -g
-DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC
"-I/opt/perl5.12.2.debug/lib/5.12.2/i86pc-solaris/CORE"
compile_test_1_t_a7b1.c
Sun-A3 root 294/0
(~/peter/inline_fails_to_compile/_Inline/build/compile_test_1_t_a7b1)#

Sun-A3 root 295/0
(~/peter/inline_fails_to_compile/_Inline/build/compile_test_1_t_a7b1)#
less /opt/perl5.12.2.debug/lib/site_perl/5.12.2/Inline/C.pm
package Inline::C;
$Inline::C::VERSION = '0.51';
$Inline::C::VERSION = eval $Inline::C::VERSION;
Sisyphus via RT
2012-11-14 23:05:44 UTC
Permalink
Wed Nov 14 18:05:43 2012: Request 81172 was acted upon.
Transaction: Correspondence added by SISYPHUS
Queue: Inline
Subject: using Inline with => 'Event' fails to compile
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: peter.smoczynski-***@public.gmane.org
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81172 >
Post by Peter Smoczynski via RT
#!/opt/perl5.12.2.debug/bin/perl
use strict;
use warnings;
use Inline with => 'Event';
use Inline C => Config =>
BUILD_NOISY => 1;
Post by Peter Smoczynski via RT
use Inline C => <<'EOC_EVDMP_EVENT_C';
void evdmp_event_c (pe_event * event)
{
char *classname = HvNAME(SvSTASH(SvRV(event->mysv)));
printf("evdmp_event_c()\ne type: %s\ne hits: %d\ne prio %d\n",
classname,
event->hits,
event->prio
);
if (strcmp(classname, (const char *) "Event::Event::Io") == 0)
{
printf("e got: %u\n", ((pe_ioevent *) event)->got);
}
}
EOC_EVDMP_EVENT_C
exit 0;
Could you insert the "BUILD_NOISY" config option (as per above), and
then run the script with Inline-0.48.
Then post the output, so that I can compare it with the output you've
posted for the failing build.

Where is EventAPI.h located ?

For a quick workaround, I think you could add the location of
EventAPI.h to the CPATH environment variable:

export CPATH=$CPATH:/wherever/it/is

(At least that's how it vwould be done on linux. I assume solaris is
the same.)

Cheers,
Rob
Peter Smoczynski via RT
2012-11-15 11:57:07 UTC
Permalink
Thu Nov 15 06:57:05 2012: Request 81172 was acted upon.
Transaction: Correspondence added by peter.smoczynski-***@public.gmane.org
Queue: Inline
Subject: [rt.cpan.org #81172] using Inline with => 'Event' fails to compile
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: peter.smoczynski-***@public.gmane.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81172 >


Hi Rob!

here is the BUILD_NOISY output on version 0.48:

Sun-A3 root 261/0 (~/peter/inline_fails_to_compile)# la
total 4
-rw-r--r-- 1 root root 529 Nov 14 17:05 compile_test_1.t
-rw-r--r-- 1 root root 581 Nov 15 10:47 compile_test_2.t
Sun-A3 root 262/0 (~/peter/inline_fails_to_compile)#
/opt/perl5.12.2.debug/bin/perl compile_test_2.t
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 compile_test_2_t_a7b1
Finished "perl Makefile.PL" Stage

Starting "make" Stage
/opt/perl5.12.2.debug/bin/perl
/opt/perl5.12.2.debug/lib/5.12.2/ExtUtils/xsubpp -typemap
/opt/perl5.12.2.debug/lib/5.12.2/ExtUtils/typemap
compile_test_2_t_a7b1.xs > compile_test_2_t_a7b1.xsc && mv
compile_test_2_t_a7b1.xsc compile_test_2_t_a7b1.c
gcc -c -I/root/peter/inline_fails_to_compile -I/usr/local/include
-I/usr/local/BerkeleyDB.4.5/include -DDEBUGGING -fno-strict-aliasing
-pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -g -DVERSION=\"0.00\"
-DXS_VERSION=\"0.00\" -fPIC
"-I/opt/perl5.12.2.debug/lib/5.12.2/i86pc-solaris/CORE"
compile_test_2_t_a7b1.c
compile_test_2_t_a7b1.xs:5: error: expected ')' before '*' token
make: *** [compile_test_2_t_a7b1.o] Error 1

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

The build directory was:
/root/peter/inline_fails_to_compile/_Inline/build/compile_test_2_t_a7b1

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

at compile_test_2.t line 11
BEGIN failed--compilation aborted at compile_test_2.t line 28.
Sun-A3 root 263/2 (~/peter/inline_fails_to_compile)#

the location of EventAPI.h is:

Sun-A3 root 264/0 (~/peter/inline_fails_to_compile)# find
/opt/perl5.12.2.debug/ -name EventAPI.h -print
/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event/EventAPI.h

yep!, setting the cpath variable

Sun-A3 root 261/0 (~/peter/inline_fails_to_compile)# setenv CPATH
/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event;
/opt/perl5.12.2.debug/bin/perl -c compile_test_1.t
compile_test_1.t syntax OK

acts as a workaround -- though on my tcsh it took me a little while..;-)

thanx!, peter
Sisyphus via RT
2012-11-16 01:53:45 UTC
Permalink
Thu Nov 15 20:53:44 2012: Request 81172 was acted upon.
Transaction: Correspondence added by SISYPHUS
Queue: Inline
Subject: using Inline with => 'Event' fails to compile
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: peter.smoczynski-***@public.gmane.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81172 >
Post by Peter Smoczynski via RT
Hi Rob!
Sun-A3 root 261/0 (~/peter/inline_fails_to_compile)# la
total 4
-rw-r--r-- 1 root root 529 Nov 14 17:05 compile_test_1.t
-rw-r--r-- 1 root root 581 Nov 15 10:47 compile_test_2.t
Sun-A3 root 262/0 (~/peter/inline_fails_to_compile)#
/opt/perl5.12.2.debug/bin/perl compile_test_2.t
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 compile_test_2_t_a7b1
Finished "perl Makefile.PL" Stage
Starting "make" Stage
/opt/perl5.12.2.debug/bin/perl
/opt/perl5.12.2.debug/lib/5.12.2/ExtUtils/xsubpp -typemap
/opt/perl5.12.2.debug/lib/5.12.2/ExtUtils/typemap
compile_test_2_t_a7b1.xs > compile_test_2_t_a7b1.xsc && mv
compile_test_2_t_a7b1.xsc compile_test_2_t_a7b1.c
gcc -c -I/root/peter/inline_fails_to_compile -I/usr/local/include
-I/usr/local/BerkeleyDB.4.5/include -DDEBUGGING -fno-strict-aliasing
-pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -g -DVERSION=\"0.00\"
-DXS_VERSION=\"0.00\" -fPIC
"-I/opt/perl5.12.2.debug/lib/5.12.2/i86pc-solaris/CORE"
compile_test_2_t_a7b1.c
compile_test_2_t_a7b1.xs:5: error: expected ')' before '*' token
make: *** [compile_test_2_t_a7b1.o] Error 1
This is a bit confusing.
Firstly, the 0.48 build fails (though no mention of a missing EventAPI.h).

Secondly, if the 0.48 build finds EventAPI.h, I don't see why the 0.51
build can't do the same.
Neither of the 2 builds specify
-I/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event
(which is the location of EventAPI.h).

Cheers,
Rob
Peter Smoczynski via RT
2012-11-16 10:35:13 UTC
Permalink
Fri Nov 16 05:35:12 2012: Request 81172 was acted upon.
Transaction: Correspondence added by peter.smoczynski-***@public.gmane.org
Queue: Inline
Subject: [rt.cpan.org #81172] using Inline with => 'Event' fails to compile
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: peter.smoczynski-***@public.gmane.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81172 >


Sorry for the confusion!

1stly 0.51 does not find EventAPI.h b'of an incorrect generated gcc
comandline:

Sun-A3 root 259/0 (~/peter/inline_fails_to_compile)#
/opt/perl5.12.2.debug/bin/perl -c compile_test_1.t
/opt/perl5.12.2.debug/bin/perl
/opt/perl5.12.2.debug/lib/5.12.2/ExtUtils/xsubpp -typemap
"/opt/perl5.12.2.debug/lib/5.12.2/ExtUtils/typemap" -typemap
"/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event/typemap"
compile_test_1_t_a7b1.xs > compile_test_1_t_a7b1.xsc && mv
compile_test_1_t_a7b1.xsc compile_test_1_t_a7b1.c
gcc -c -I"/root/peter/inline_fails_to_compile" "-I
/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"
-I/usr/local/include -I/usr/local/BerkeleyDB.4.5/include -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -g
-DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC
"-I/opt/perl5.12.2.debug/lib/5.12.2/i86pc-solaris/CORE"
compile_test_1_t_a7b1.c
compile_test_1_t_a7b1.xs:5:22: error: EventAPI.h: No such file or directory
compile_test_1_t_a7b1.xs:6: error: expected ')' before '*' token
compile_test_1_t_a7b1.c: In function 'XS_main_evdmp_event_c':
compile_test_1_t_a7b1.c:99: error: 'pe_event' undeclared (first use in
this function)
compile_test_1_t_a7b1.c:99: error: (Each undeclared identifier is
reported only once
compile_test_1_t_a7b1.c:99: error: for each function it appears in.)
compile_test_1_t_a7b1.c:99: error: 'event' undeclared (first use in this
function)
compile_test_1_t_a7b1.c:99: error: expected expression before ')' token
make: *** [compile_test_1_t_a7b1.o] Error 1

i.e.

gcc -c -I"/root/peter/inline_fails_to_compile" "-I
/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"
-I/usr/local/include -I/usr/local/BerkeleyDB.4.5/include -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -g
-DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC
"-I/opt/perl5.12.2.debug/lib/5.12.2/i86pc-solaris/CORE"
compile_test_1_t_a7b1.c

where

"-I /opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"

fails to include EventAPI.h.

if I change into the build directory and issue the same cmd with the -I
option manually corrected to

-I"/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"

gcc now does find the EventAPI.h and since it then got the necessary
definitions can resolve "pe_event" at line 6 of the generated .xs file

1 #include "EXTERN.h"
2 #include "perl.h"
3 #include "XSUB.h"
4 #include "INLINE.h"
5 #include "EventAPI.h"
6 void evdmp_event_c (pe_event * event)
_Inline/build/compile_test_1_t_a7b1/compile_test_1_t_a7b1.xs
:set nu

i.e.

Sun-A3 root 293/1
(~/peter/inline_fails_to_compile/_Inline/build/compile_test_1_t_a7b1)#
gcc -c -I"/root/peter/inline_fails_to_compile"
-I"/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"
-I/usr/local/include -I/usr/local/BerkeleyDB.4.5/include -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -g
-DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC
"-I/opt/perl5.12.2.debug/lib/5.12.2/i86pc-solaris/CORE"
compile_test_1_t_a7b1.c
Sun-A3 root 294/0
(~/peter/inline_fails_to_compile/_Inline/build/compile_test_1_t_a7b1)#

I better should have added the code of compile_test_2.t since I did
misunderstand you there..!

1 #!/opt/perl5.12.2.debug/bin/perl
2
3 use strict;
4 use warnings;
5
6 ##use Inline with => 'Event';
7 ##
8 use Inline C => Config =>
9 BUILD_NOISY => 1;
10
11 use Inline C => <<'EOC_EVDMP_EVENT_C';
12 void evdmp_event_c (pe_event * event)
13 {
14 char *classname = HvNAME(SvSTASH(SvRV(event->mysv)));
15
16 printf("evdmp_event_c()\ne type: %s\ne hits: %d\ne prio %d\n",
17 classname,
18 event->hits,
19 event->prio
20 );
21
22 if (strcmp(classname, (const char *) "Event::Event::Io") == 0)
23 {
24 printf("e got: %u\n", ((pe_ioevent *) event)->got);
25 }
26
27 }
28 EOC_EVDMP_EVENT_C
29
30 exit 0;
31
~
compile_test_2.t
:set nu

of course if I comment-out the "##use Inline with => 'Event';" line
there, no definitions for gcc and thus the error with 0.48 in my
previous mail.

i.e. no -I
/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event on the
commandline:

/opt/perl5.12.2.debug/bin/perl
/opt/perl5.12.2.debug/lib/5.12.2/ExtUtils/xsubpp -typemap
/opt/perl5.12.2.debug/lib/5.12.2/ExtUtils/typemap
compile_test_2_t_a7b1.xs > compile_test_2_t_a7b1.xsc && mv
compile_test_2_t_a7b1.xsc compile_test_2_t_a7b1.c
gcc -c -I/root/peter/inline_fails_to_compile -I/usr/local/include
-I/usr/local/BerkeleyDB.4.5/include -DDEBUGGING -fno-strict-aliasing
-pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -g -DVERSION=\"0.00\"
-DXS_VERSION=\"0.00\" -fPIC
"-I/opt/perl5.12.2.debug/lib/5.12.2/i86pc-solaris/CORE"
compile_test_2_t_a7b1.c
compile_test_2_t_a7b1.xs:5: error: expected ')' before '*' token
make: *** [compile_test_2_t_a7b1.o] Error 1

sorry!, for being stupid! this was not what you wanted me to do!

so here is a corrected compile_test_2.t:

#!/opt/perl5.12.2.debug/bin/perl

use strict;
use warnings;

use Inline with => 'Event';
## set build traces
use Inline C => Config =>
BUILD_NOISY => 1;

use Inline C => <<'EOC_EVDMP_EVENT_C';
void evdmp_event_c (pe_event * event)
{
char *classname = HvNAME(SvSTASH(SvRV(event->mysv)));

printf("evdmp_event_c()\ne type: %s\ne hits: %d\ne prio %d\n",
classname,
event->hits,
event->prio
);

if (strcmp(classname, (const char *) "Event::Event::Io") == 0)
{
printf("e got: %u\n", ((pe_ioevent *) event)->got);
}

}
EOC_EVDMP_EVENT_C

exit 0;

~
"compile_test_2.t" 31L, 599C

which yields a clean run with version 0.48:

Sun-A3 root 276/0 (~/peter/inline_fails_to_compile)#
/opt/perl5.12.2.debug/bin/perl compile_test_2.t
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 compile_test_2_t_a7b1
Finished "perl Makefile.PL" Stage

Starting "make" Stage
/opt/perl5.12.2.debug/bin/perl
/opt/perl5.12.2.debug/lib/5.12.2/ExtUtils/xsubpp -typemap
/opt/perl5.12.2.debug/lib/5.12.2/ExtUtils/typemap -typemap
/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event/typemap
compile_test_2_t_a7b1.xs > compile_test_2_t_ a7b1.xsc && mv
compile_test_2_t_a7b1.xsc compile_test_2_t_a7b1.c
gcc -c -I/root/peter/inline_fails_to_compile -I
/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event
-I/usr/local/include -I/usr/local/BerkeleyDB.4.5/include -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -g
-DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC
"-I/opt/perl5.12.2.debug/lib/5.12.2/i86pc-solaris/CORE"
compile_test_2_t_a7b1.c
Running Mkbootstrap for compile_test_2_t_a7b1 ()
chmod 644 compile_test_2_t_a7b1.bs
rm -f blib/arch/auto/compile_test_2_t_a7b1/compile_test_2_t_a7b1.so
gcc -G -L/usr/local/lib -Wl,-R/usr/local/lib
-L/usr/local/BerkeleyDB.4.5/lib -Wl,-R/usr/local/BerkeleyDB.4.5/lib
-fstack-protector compile_test_2_t_a7b1.o -o
blib/arch/auto/compile_test_2_t_a7b1/compile_test_2_t_a7b1.so
/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/auto/Event/Event.so
\
\

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

Starting "make install" Stage
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
Installing
/root/peter/inline_fails_to_compile/_Inline/lib/auto/compile_test_2_t_a7b1/compile_test_2_t_a7b1.bs
Installing
/root/peter/inline_fails_to_compile/_Inline/lib/auto/compile_test_2_t_a7b1/compile_test_2_t_a7b1.so
Finished "make install" Stage

Starting Cleaning Up Stage
Finished Cleaning Up Stage

Finished Build Compile Stage

Sun-A3 root 277/0 (~/peter/inline_fails_to_compile)#

sorry again!
cheers, peter
Peter Smoczynski via RT
2012-11-16 11:51:11 UTC
Permalink
Fri Nov 16 06:51:09 2012: Request 81172 was acted upon.
Transaction: Correspondence added by peter.smoczynski-***@public.gmane.org
Queue: Inline
Subject: [rt.cpan.org #81172] using Inline with => 'Event' fails to compile
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: peter.smoczynski-***@public.gmane.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81172 >


Hi Rob!

at first it looked to me that the trouble did come with the double
quotes enclosing the -I options in v0.51.
but looking at the two generated commandlines I had a 2nd thought!

v0.48:

gcc
-c
-I/root/peter/inline_fails_to_compile
-I /opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event
-I/usr/local/include
-I/usr/local/BerkeleyDB.4.5/include
-DDEBUGGING
-fno-strict-aliasing
-pipe
-fstack-protector
-I/usr/local/include
-D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-DPERL_USE_SAFE_PUTENV
-g
-DVERSION=\"0.00\"
-DXS_VERSION=\"0.00\"
-fPIC
"-I/opt/perl5.12.2.debug/lib/5.12.2/i86pc-solaris/CORE"
compile_test_2_t_a7b1.c

v0.51:

gcc
-c
-I"/root/peter/inline_fails_to_compile"
"-I /opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"
-I/usr/local/include
-I/usr/local/BerkeleyDB.4.5/include
-DDEBUGGING
-fno-strict-aliasing
-pipe
-fstack-protector
-I/usr/local/include
-D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
-DPERL_USE_SAFE_PUTENV
-g
-DVERSION=\"0.00\"
-DXS_VERSION=\"0.00\"
-fPIC
"-I/opt/perl5.12.2.debug/lib/5.12.2/i86pc-solaris/CORE"
compile_test_1_t_a7b1.c

wondering about the two identical include options for the perl CORE headers?

so I gave it another try:

Sun-A3 root 290/0
(~/peter/inline_fails_to_compile/_Inline/build/compile_test_1_t_a7b1)#
gcc -c -I"/root/peter/inline_fails_to_compile" "-I
/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"
-I/usr/local/include -I/usr/local/BerkeleyDB.4.5/include -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -g
-DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC
"-I/opt/perl5.12.2.debug/lib/5.12.2/i86pc-solaris/CORE"
compile_test_1_t_a7b1.c
compile_test_1_t_a7b1.xs:5:22: error: EventAPI.h: No such file or directory
compile_test_1_t_a7b1.xs:6: error: expected ')' before '*' token
compile_test_1_t_a7b1.c: In function 'XS_main_evdmp_event_c':
compile_test_1_t_a7b1.c:99: error: 'pe_event' undeclared (first use in
this function)
compile_test_1_t_a7b1.c:99: error: (Each undeclared identifier is
reported only once
compile_test_1_t_a7b1.c:99: error: for each function it appears in.)
compile_test_1_t_a7b1.c:99: error: 'event' undeclared (first use in this
function)
compile_test_1_t_a7b1.c:99: error: expected expression before ')' token

Sun-A3 root 291/1
(~/peter/inline_fails_to_compile/_Inline/build/compile_test_1_t_a7b1)#
gcc -c -I"/root/peter/inline_fails_to_compile"
"-I/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"
-I/usr/local/include -I/usr/local/BerkeleyDB.4.5/include -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -g
-DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC
"-I/opt/perl5.12.2.debug/lib/5.12.2/i86pc-solaris/CORE"
compile_test_1_t_a7b1.c
Sun-A3 root 292/0
(~/peter/inline_fails_to_compile/_Inline/build/compile_test_1_t_a7b1)#

in fact it's the space(!) and not the double quotes!

i.e.

"-I /opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"

vs.

"-I/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"

cheers, peter
Sisyphus via RT
2012-11-17 00:58:22 UTC
Permalink
Fri Nov 16 19:58:21 2012: Request 81172 was acted upon.
Transaction: Correspondence added by SISYPHUS
Queue: Inline
Subject: using Inline with => 'Event' fails to compile
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: peter.smoczynski-***@public.gmane.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81172 >
Post by Peter Smoczynski via RT
in fact it's the space(!) and not the double quotes!
i.e.
"-I /opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"
vs.
"-I/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"
Well spotted - I had missed that there was a space stuck in there.

So ... the space between the -I and the /opt doesn't cause any problems
until the whole thing is enclosed in double-quotes ? (Please correct me
if that's wrong.)
I would have expected that space to be a problem even if there *weren't*
any enclosing double-quotes.
But, if that's not the case, then quote_space() probably needs to take
this into consideration.

I'm thinking quote_space() should be able to do this at the end of its
processing with

s/"\-I\s+\//"-I\//g

since any spaces between the leading -I and the first / can never be
meaningful (right ?).

If you want to give that a try, at the end of the quote_space()
subroutine in C.pm, change:

my $out = join '', @in;
$_[0] = $out;

to:

my $out = join '', @in;
out =~ s/"\-I\s+\//"-I\//g;
$_[0] = $out;

I haven't tested, however, so I'm being a bit premature here ...

There's also the case that

-I /foo

would be changed to

-I" /foo"

if it was the first element in the string, so that needs to be looked
at, too.

I'll release 0.51_01 in a couple of days time, and let you know when
that happens. It will contain, among other things, a fix for this issue.

Thanks for the report, and for the digging.

Cheers,
Rob
Peter Smoczynski via RT
2012-11-19 11:21:19 UTC
Permalink
Mon Nov 19 06:21:18 2012: Request 81172 was acted upon.
Transaction: Correspondence added by peter.smoczynski-***@public.gmane.org
Queue: Inline
Subject: Re: [rt.cpan.org #81172] using Inline with => 'Event' fails to compile
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: peter.smoczynski-***@public.gmane.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81172 >
Post by Peter Smoczynski via RT
<URL: https://rt.cpan.org/Ticket/Display.html?id=81172 >
Post by Peter Smoczynski via RT
in fact it's the space(!) and not the double quotes!
i.e.
"-I /opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"
vs.
"-I/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"
Well spotted - I had missed that there was a space stuck in there.
So ... the space between the -I and the /opt doesn't cause any problems
until the whole thing is enclosed in double-quotes ? (Please correct me
if that's wrong.)
yes, the space between the -I and the /opt does not cause any problems
-- that is correct!
might be reminiscent to the old k&r days..?
Post by Peter Smoczynski via RT
I would have expected that space to be a problem even if there *weren't*
any enclosing double-quotes.
But, if that's not the case, then quote_space() probably needs to take
this into consideration.
I'm thinking quote_space() should be able to do this at the end of its
processing with
s/"\-I\s+\//"-I\//g
since any spaces between the leading -I and the first / can never be
meaningful (right ?).
If you want to give that a try, at the end of the quote_space()
$_[0] = $out;
out =~ s/"\-I\s+\//"-I\//g;
$_[0] = $out;
I haven't tested, however, so I'm being a bit premature here ...
I did change the end of quote_space() to

my $out = join '', @in;
$out =~ s/"\-I\s+\//"-I\//g;
$_[0] = $out;

which works fine for me:

[...]
Starting "make" Stage
/opt/perl5.12.2.debug/bin/perl
/opt/perl5.12.2.debug/lib/5.12.2/ExtUtils/xsubpp -typemap
"/opt/perl5.12.2.debug/lib/5.12.2/ExtUtils/typemap" -typemap
"/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event/typemap"
compile_test_1_t_a7b1.xs > compile_test_1_t_a7b1.xsc && mv
compile_test_1_t_a7b1.xsc compile_test_1_t_a7b1.c
gcc -c -I"/root/peter/inline_fails_to_compile"
"-I/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/Event"
-I/usr/local/include -I/usr/local/BerkeleyDB.4.5/include -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -g
-DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC
"-I/opt/perl5.12.2.debug/lib/5.12.2/i86pc-solaris/CORE"
compile_test_1_t_a7b1.c
Running Mkbootstrap for compile_test_1_t_a7b1 ()
chmod 644 compile_test_1_t_a7b1.bs
rm -f blib/arch/auto/compile_test_1_t_a7b1/compile_test_1_t_a7b1.so
gcc -G -L/usr/local/lib -Wl,-R/usr/local/lib
-L/usr/local/BerkeleyDB.4.5/lib -Wl,-R/usr/local/BerkeleyDB.4.5/lib
-fstack-protector compile_test_1_t_a7b1.o -o
blib/arch/auto/compile_test_1_t_a7b1/compile_test_1_t_a7b1.so
/opt/perl5.12.2.debug/lib/site_perl/5.12.2/i86pc-solaris/auto/Event/Event.so
\
\

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

Starting "make install" Stage
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
Installing
/root/peter/inline_fails_to_compile/_Inline/lib/auto/compile_test_1_t_a7b1/compile_test_1_t_a7b1.bs
Installing
/root/peter/inline_fails_to_compile/_Inline/lib/auto/compile_test_1_t_a7b1/compile_test_1_t_a7b1.so
Finished "make install" Stage

Starting Cleaning Up Stage
Finished Cleaning Up Stage

Finished Build Compile Stage

compile_test_1.t syntax OK
Sun-A3 root 260/0 (~/peter/inline_fails_to_compile)#
Post by Peter Smoczynski via RT
There's also the case that
-I /foo
would be changed to
-I" /foo"
if it was the first element in the string, so that needs to be looked
at, too.
right
Post by Peter Smoczynski via RT
I'll release 0.51_01 in a couple of days time, and let you know when
that happens. It will contain, among other things, a fix for this issue.
Thanks for the report, and for the digging.
Cheers,
Rob
you're welcome!
cheers, peter
Peter Smoczynski via RT
2012-11-19 11:39:22 UTC
Permalink
Mon Nov 19 06:39:21 2012: Request 81172 was acted upon.
Transaction: Correspondence added by peter.smoczynski-***@public.gmane.org
Queue: Inline
Subject: [rt.cpan.org #81172] using Inline with => 'Event' fails to compile
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: peter.smoczynski-***@public.gmane.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81172 >


since my comments in response to your last mail could easily be
overlooked, here's the most important explicitly again..
thanx, Rob!
peter
Post by Sisyphus via RT
So ... the space between the -I and the /opt doesn't cause any problems
until the whole thing is enclosed in double-quotes ? (Please correct me
if that's wrong.)
yes, the space between the -I and the /opt does not cause any problems
-- that is correct!
might be reminiscent to the old k&r days..?
Sisyphus via RT
2012-11-20 09:56:48 UTC
Permalink
Tue Nov 20 04:56:47 2012: Request 81172 was acted upon.
Transaction: Correspondence added by SISYPHUS
Queue: Inline
Subject: using Inline with => 'Event' fails to compile
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: peter.smoczynski-***@public.gmane.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81172 >
Post by Peter Smoczynski via RT
since my comments in response to your last mail could easily be
overlooked, here's the most important explicitly again..
thanx, Rob!
peter
Post by Sisyphus via RT
So ... the space between the -I and the /opt doesn't cause any
problems
Post by Peter Smoczynski via RT
Post by Sisyphus via RT
until the whole thing is enclosed in double-quotes ? (Please
correct me
Post by Peter Smoczynski via RT
Post by Sisyphus via RT
if that's wrong.)
yes, the space between the -I and the /opt does not cause any
problems
Post by Peter Smoczynski via RT
-- that is correct!
might be reminiscent to the old k&r days..?
Inline-0.51_02, which contains the fix (substitution regex) I mentioned
in my last post to this thread, has now been uploaded to CPAN.

Cheers,
Rob
Peter Smoczynski via RT
2012-11-20 13:47:16 UTC
Permalink
Tue Nov 20 08:47:15 2012: Request 81172 was acted upon.
Transaction: Correspondence added by peter.smoczynski-***@public.gmane.org
Queue: Inline
Subject: Re: [rt.cpan.org #81172] using Inline with => 'Event' fails to compile
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: peter.smoczynski-***@public.gmane.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81172 >
Post by Peter Smoczynski via RT
<URL: https://rt.cpan.org/Ticket/Display.html?id=81172 >
Inline-0.51_02, which contains the fix (substitution regex) I mentioned
in my last post to this thread, has now been uploaded to CPAN.
Cheers,
Rob
downloaded Inline-0.51_02 and installed it.
worx fine for me!

thanx!
cheers, peter
Sisyphus via RT
2013-03-07 02:14:31 UTC
Permalink
Wed Mar 06 21:14:30 2013: Request 81172 was acted upon.
Transaction: Correspondence added by SISYPHUS
Queue: Inline
Subject: using Inline with => 'Event' fails to compile
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: peter.smoczynski-***@public.gmane.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=81172 >


Fixed in 0.52.
Thank you for the report.

Loading...