Forks.pm compile problems

Forks.pm compile problems

am 01.03.2006 16:07:57 von andrewfaseuk

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/COR E"
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/t hrdvar.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/p roto.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/t hrdvar.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

Re: Forks.pm compile problems

am 02.03.2006 00:54:53 von Sisyphus

wrote in message
news:1141225677.603748.280740@e56g2000cwe.googlegroups.com.. .
> 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

Re: Forks.pm compile problems

am 02.03.2006 10:13:47 von andrewfaseuk

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

Re: Forks.pm compile problems

am 02.03.2006 10:49:50 von Sisyphus

wrote in message
news:1141290827.323451.36050@e56g2000cwe.googlegroups.com...
> 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