Similar Threads:
1.Installing XS Modules on Windows -- Like Pulling Teeth
I'm running on Windows with ActivePerl, and I'm trying to install
XML::LibXML. It's not in the PPM repository, so that's out of the
question. I downloaded MinGW, so I have gcc, and I downloaded both
nmake and dmake. I ran perl -MCPAN -e shell, and then install PAJAS/
XML-LibXML-1.64.tar.gz. But I get the error 'C:\Perl\bin\perl.exe
Makefile.PL' returned status 512, won't make. I searched all around
for some kind of instructions or tutorial, but very few are for
Windows and even fewer say anything useful.
So what are all the steps I need to perform to be able to install any
CPAN module on a Windows machine?
2.problems using graphviz perl module from apache (windows)
I'm writing a cgi script that uses graphviz (the dot program) to
generate a graph and I'm banging my head against the wall trying to get
it to work properly. Currently, if I run the script directly from the
command line, it will work properly and generate my graph (which gets
dumped into a file). If I invoke the script as a cgi script within
apache, it runs fine until it calls the as_png() function, at which
point it will die waiting for a result (the destination file is created
but is empty).
I'm running SERVER_SOFTWARE="Apache/2.0.52 (Win32)"
and version 1.8 of the GraphViz module. If I run a printenv.cgi, I get
the following path:
PATH="C:\Program Files\Perl\bin\;C:\Program Files\Reflection;C:\PROGRAM
FILES\THINKPAD\UTILITIES; C:\Program
Files\Java\j2re1.4.2_01\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Oracle\ora81\bin;C:\Program
Files\Oracle\jre\1.1.7\bin;C:\ISIS;C:\PROGRA~1\COMMON~1\MDL
Shared\ISIS;C:\PROGRA~1\ATT\Graphviz\bin;C:\PROGRA~1\ATT\Graphviz\bin\tools"
which does seem to have the correct path settings for dot.exe.
The error that the apache log gives me is: Premature end of script
headers: simplegraph.pl
If I remove the line that calls as_png(), the script runs fine.
Any assistance would be most appreciated. I've searched usenet but to
no avail...
Thanks!
Sergio.
3.Perl Module using XS
Hello "XS Gurus":
I am trying to develop a perl extension using XS that would execute a DB2's
'.sqc' generated c executable.( equivalent of Oracle's pro*c generated
executable). The 'C' executable executes fine by itself. I am having a hard
time getting the perl module work.
I added in the '.xs' file the Xsubb for the function that is declared in the
'C' program.
In the Makefile.PL, I added the object files generated from the 'C' program
and also the path where the object file can be fouind.
Still, the make process does not succeed in building the 'C' function into
the Perl module.
Could anyone show pointers as to what i am missing
thanks
Rajan
use 5.008008;
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
NAME => 'RajanT',
VERSION_FROM => 'lib/RajanT.pm', # finds $VERSION
PREREQ_PM => {}, # e.g., Module::Name => 1.1
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'lib/RajanT.pm', # retrieve abstract from module
AUTHOR => 'Abishek Rajan < XXXX@XXXXX.COM >') : ()),
LIBS => [''], # e.g., '-lm'
DEFINE => '', # e.g., '-DHAVE_SOMETHING'
INC => '-I. -I/home/db2inst2', # e.g.,
'-I. -I/usr/include/other'
MYEXTLIB => 'rlib/libmylib$(LIB_EXT)',
# Un-comment this if you add C files to link with later:
OBJECT => '$(example2.o)', # link all the C files
too
);
if (eval {require ExtUtils::Constant; 1}) {
# If you edit these definitions to change the constants used by this module,
# you will need to use the generated const-c.inc and const-xs.inc
# files to replace their "fallback" counterparts before distributing your
# changes.
my @names = (qw(TESTVAL));
ExtUtils::Constant::WriteConstants(
NAME => 'RajanT',
NAMES => \@names,
DEFAULT_TYPE => 'IV',
C_FILE => 'const-c.inc',
XS_FILE => 'const-xs.inc',
);
}
else {
use File::Copy;
use File::Spec;
foreach my $file ('const-c.inc', 'const-xs.inc') {
my $fallback = File::Spec->catfile('fallback', $file);
copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";
}
}
sub MY::postamble {
'
$(MYEXTLIB): rlib/Makefile
cd rlib && $(MAKE) $(PASSTHRU)
';
4.Using Module::Build to XS
Hi,
I have volunterred to maintain the LSF::Base and LSF::Batch modules on
CPAN , I am in the process of rewriting the module's Makefile.PL
(which uses the ExtUtils::MakeMaker) to use the Module::Build's
Build.PL process. Unfortunately I have not been very successful in
writing the Build.PL to do all the complies. Also I have not been able
to gather any information regarding the use of Module::Build to do XS
complies. Any inputs on where I can get this information would be
really helpful.
I have tried to write the Build.PL by using the following code snippet
but this was not able to create the shared object for Dynaloader to
load.
my $builder = Module::Build->new(
module_name => 'LSF::Base',
...
c_source => 'lib/',
include_dirs => [ $lsf_includedir ] ,
extra_linker_flags => $libs,
extra_compiler_flags => '-DPERL_POLLUTE',
create_makefile_pl => 'traditional'
);
Also any inputs on the Module::Build's equivalent of the below
Mafile.PL will be greatly appreciated.
WriteMakefile(
'NAME' => 'LSF::Base',
'VERSION_FROM' => 'Base.pm',
'LIBS' => [$libs ],
'DEFINE' => '-DPERL_POLLUTE',
'OBJECT' => '$(O_FILES)',
'INC' => "-I$lsf_includedir"
);
If this is a RTFM please do scream at me
Thanks
Raga
5.need template for an XS module using two or mor classes
Hi,
I created with the tool "h2xs" a template for a perl package called
"perlmsgque"
in this package I want to add a "MqS" and a "MqSException" class.
both class's should use an individual "*.xs" file called MqS.xs
and MqSException.xs.
I'm not able to get anything useful working with the current perl
documentation.
it seems that multiple packages into a single module is not
covered
one package per module is possible but multiple ....
error message I get: Base class package "MqS" is empty
even if MqS is filled ..
mfg
Andreas Otto
6. Scalar::Util is not using XS in Fedora 8, leading to performance problem
7. Scalar::Util is not using XS in Fedora 8, leading to performance problem
8. Would like help on Perl script to print to windows printer, or printers, please