Click here to get back home

Forks.pm compile problems

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Forks.pm compile problems andrewfaseuk 03-01-2006
Get Chitika Premium
Posted by andrewfaseuk on March 1, 2006, 10:07 am
Please log in for more thread options


Hi,

Wondering if anyone can help, I'm trying to install forks version 0.18
and running into problems.

perl makefile.PL works fine, but when I make I get whats attached
below, any ideas ?

For info:

Solaris 9, Perl version v5.8.7

the only thing i can think of it that I have some higher versions of
the modules required, do they have to be exactly that version, if so
where do I get them ?

"Required Modules:
Devel::Required (any)
IO::Socket (1.18)
Scalar::Util (1.01)
Storable (any)"

where as I have :

bash-2.05$ perl
use ExtUtils::Installed;
my $instmod = ExtUtils::Installed->new();
foreach my $module ($instmod->modules()) {
my $version = $instmod->version($module) || "???";
print "$module -- $version\n";
}
Carp::Clan -- 5.3
Compress::Zlib -- 1.34
Crypt::SSLeay -- 0.51
DBD::Oracle -- 1.16
DBI -- 1.48
Date::Calc -- 5.4
Devel::Required -- 0.06
Digest::MD5 -- 2.33
GD -- 2.28
GD::Graph -- 1.43
GD::Text -- 0.86
HTML::Parser -- 3.45
HTML::Tagset -- 3.04
IO -- 1.22
List::Util -- 1.17
MIME::Base64 -- 3.05
Perl -- 5.8.7
Storable -- 2.15
Tie::IxHash -- 1.21
URI -- 1.35
libwww-perl -- ???


Cheers

Andy

bash-2.05$ make
/opt/vf/vfadm/thirdparty/bin/perl
/opt/vf/vfadm/thirdparty/lib/perl5/5.8.7/ExtUtils/xsubpp -typemap
/opt/vf/vfadm/thirdparty/lib/perl5/5.8.7/ExtUtils/typemap forks.xs >
forks.xsc && mv forks.xsc forks.c
gcc -c -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O -DVERSION=\"0.18\" -DXS_VERSION=\"0.18\"
-fPIC "-I/opt/vf/vfadm/thirdparty/lib/perl5/5.8.7/sun4-solaris/CORE"
forks.c
forks.xs: In function `XS_threads__shared_cond_timedwait':
forks.xs:192: parse error before `int'
forks.xs:195: `count' undeclared (first use in this function)
forks.xs:195: (Each undeclared identifier is reported only once
forks.xs:195: for each function it appears in.)
forks.xs:198: parse error before `char'
forks.xs:198: `_sv' undeclared (first use in this function)
forks.xs:198: parse error before `)'
forks.xs: At top level:
forks.xs:199: parse error before `)'
forks.xs:200: conflicting types for `PL_stack_sp'
/opt/vf/vfadm/thirdparty/lib/perl5/5.8.7/sun4-solaris/CORE/thrdvar.h:34:
previous declaration of `PL_stack_sp'
forks.xs:200: `sp' undeclared here (not in a function)
forks.xs:200: warning: data definition has no type or storage class
forks.xs:202: parse error before `if'
forks.xs:203: conflicting types for `Perl_pop_scope'
/opt/vf/vfadm/thirdparty/lib/perl5/5.8.7/sun4-solaris/CORE/proto.h:587:
previous declaration of `Perl_pop_scope'
forks.xs:203: warning: data definition has no type or storage class
forks.xs:204: `retval' undeclared here (not in a function)
forks.xs:204: warning: data definition has no type or storage class
forks.c:243: `ax' undeclared here (not in a function)
forks.c:243: size of array `PL_stack_base' has non-integer type
forks.c:243: conflicting types for `PL_stack_base'
/opt/vf/vfadm/thirdparty/lib/perl5/5.8.7/sun4-solaris/CORE/thrdvar.h:42:
previous declaration of `PL_stack_base'
forks.c:243: invalid initializer
forks.c:243: warning: data definition has no type or storage class
forks.c:244: parse error before `['
forks.c:246: redefinition of `PL_stack_sp'
forks.xs:200: `PL_stack_sp' previously defined here
forks.c:246: `ax' undeclared here (not in a function)
forks.c:246: `tmpXSoff' undeclared here (not in a function)
forks.c:246: initializer element is not constant
forks.c:246: warning: data definition has no type or storage class
forks.c:246: parse error before `return'
forks.c: In function `XS_threads__shared_cond_signal':
forks.c:252: warning: initialization makes pointer from integer without
a cast
forks.c:252: warning: initialization from incompatible pointer type
forks.c:252: invalid operands to binary -
forks.c:256: warning: initialization makes pointer from integer without
a cast
forks.xs:222: invalid operands to binary -
forks.xs:225: warning: assignment makes integer from pointer without a
cast
forks.c:276: warning: assignment makes integer from pointer without a
cast
forks.c: In function `XS_threads__shared_cond_broadcast':
forks.c:282: warning: initialization makes pointer from integer without
a cast
forks.c:282: warning: initialization from incompatible pointer type
forks.c:282: invalid operands to binary -
forks.c:286: warning: initialization makes pointer from integer without
a cast
forks.xs:246: invalid operands to binary -
forks.xs:249: warning: assignment makes integer from pointer without a
cast
forks.c:306: warning: assignment makes integer from pointer without a
cast
forks.c: In function `boot_forks':
forks.c:315: warning: initialization makes pointer from integer without
a cast
forks.c:315: warning: initialization from incompatible pointer type
forks.c:315: invalid operands to binary -
forks.c:318: invalid type argument of `->'
forks.c:318: invalid type argument of `->'
forks.c:318: invalid type argument of `->'
forks.c:318: warning: passing arg 1 of `Perl_sv_2pv_flags' makes
pointer from integer without a cast
forks.c:318: warning: assignment makes pointer from integer without a
cast
forks.c:339: warning: assignment makes integer from pointer without a
cast
forks.c:339: warning: assignment makes integer from pointer without a
cast
make: *** [forks.o] Error 1


Posted by Sisyphus on March 1, 2006, 6:54 pm
Please log in for more thread options



> Hi,
>
> Wondering if anyone can help, I'm trying to install forks version 0.18
> and running into problems.
>
> perl makefile.PL works fine, but when I make I get whats attached
> below, any ideas ?
>
> For info:
>
> Solaris 9, Perl version v5.8.7
>
> the only thing i can think of it that I have some higher versions of
> the modules required, do they have to be exactly that version, if so
> where do I get them ?

Higher versions should be fine. (Older versions of modules can be found on
backpan.)

.
.
> forks.xs: In function `XS_threads__shared_cond_timedwait':
> forks.xs:192: parse error before `int'
> forks.xs:195: `count' undeclared (first use in this function)
.
.

In forks.xs, find the function 'cond_timedwait'. You'll see near the
beginning of that function:

PREINIT:
SV *ref2;

Make that:

PREINIT:
SV *ref2;
int count;

Further down in the same function, you'll find:

int count = call_pv( "threads::shared::_remote",G_ARRAY );

Change that to:

count = call_pv( "threads::shared::_remote",G_ARRAY );

Then run 'make clean', 'perl Makefile.PL' and 'make' and see what happens.
If I've got it right, you shouldn't get any errors in relation to
cond_timedwait. Not sure if that's going to take care of *all* errors,
however.

(Many recent compilers will accept the code in cond_timedwait as is ....
apparently your compiler won't.)

Cheers,
Rob



Posted by andrewfaseuk on March 2, 2006, 4:13 am
Please log in for more thread options


Excellent ! Thanks for the information it now compiles perfectly.


Just for info I has to change :

from

PREINIT:
SV *ref2;

to

PREINIT:
SV *ref2;
int count;
bool retval;
U16 ordinal;



and then change

int count = call_pv( "threads::shared::_remote",G_ARRAY );
to
count = call_pv( "threads::shared::_remote",G_ARRAY );

and

bool retval = POPi;
to
retval=POPi;

and finally
U16 ordinal = POPi;
to
ordinal = POPi;


My compiler is :

bash-2.05$ gcc -v
Reading specs from
/opt/sfw/lib/gcc-lib/sparc-sun-solaris2.9/2.95.3/specs
gcc version 2.95.3 20010315 (release)

Maybe I should inform the module owener ?


Anyway thanks for the info much appreciated!

Cheers

Andy


Posted by Sisyphus on March 2, 2006, 4:49 am
Please log in for more thread options



> Excellent ! Thanks for the information it now compiles perfectly.
>
>
> Just for info I has to change :
>
> from
>
> PREINIT:
> SV *ref2;
>
> to
>
> PREINIT:
> SV *ref2;
> int count;
> bool retval;
> U16 ordinal;
>
>
>
> and then change
>
> int count = call_pv( "threads::shared::_remote",G_ARRAY );
> to
> count = call_pv( "threads::shared::_remote",G_ARRAY );
>
> and
>
> bool retval = POPi;
> to
> retval=POPi;
>
> and finally
> U16 ordinal = POPi;
> to
> ordinal = POPi;
>

Yep - missed them.

>
> My compiler is :
>
> bash-2.05$ gcc -v
> Reading specs from
> /opt/sfw/lib/gcc-lib/sparc-sun-solaris2.9/2.95.3/specs
> gcc version 2.95.3 20010315 (release)
>
> Maybe I should inform the module owener ?
>

Yes - wouldn't hurt to let him know. However, I don't know if he'll want to
do anything about it. The way he's written the code does conform to one of
the later C standards (is it C89 ?). It's just that gcc-2.95, which must be
getting rather old, doesn't recognise that standard. If it were me, I would
want to rewrite the code so that gcc-2.95 *can* compile it ..... but that
might just be *me* :-)

Cheers,
Rob



Similar ThreadsPosted
compile problems with XML::LibXML December 22, 2004, 5:41 pm
problem with using the forks module within a daemon setting June 19, 2006, 3:13 pm
Net::Nessus 0.09 does not compile October 26, 2004, 9:04 am
How do we compile for perl? April 10, 2005, 11:01 pm
Compile of DB::DB2 on cygwin June 15, 2005, 7:38 pm
Conditional compile if 64-bit cpu, in .xs ? August 28, 2006, 12:00 am
Help with Math::GMP compile on AIX 5.3 September 11, 2007, 4:47 pm
Des::Crypt Will not Compile On Solaris 8 Using GCC December 7, 2005, 2:58 pm
Trying to compile MP3::Info gives errors December 12, 2005, 11:17 am
Mac OSX Tiger getting module to compile January 3, 2006, 9:45 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap