Hello,
After an upgrade from fedora 13 to fedora 14, my application fails
with:
PDL::LinearAlgebra::Real needs to be recompiled against the newly
installed PDL at /usr/lib64/perl5/DynaLoader.pm line 223
I just reinstall perl::LinearAlgebra
which contains Real.
PDL has also been recompiled.
Ho
On Sun, 19 Jun 2011, Uri Guttman wrote:
"PD" == Patrick Dupre writes:
PD> There is not option like (double) $res ?
rtfm to the rescue!
the synopsis shows how to do it. since it is a pragma it affects all
calculations in the scope. disabling the pragma is how you can get
On Sun, 19 Jun 2011, Rob Dixon wrote:
On 19/06/2011 14:07, Patrick Dupre wrote:
Hello,
I need to convert the result of an aritmetic operation on 2
bignum into a "normal" float (ie double)
I did not find a way to do this.
no bignum ;
my $res = $A - $B ;
gives me always a bignum ($
Hello,
I need to convert the result of an aritmetic operation on 2
bignum into a "normal" float (ie double)
I did not find a way to do this.
no bignum ;
my $res = $A - $B ;
gives me always a bignum ($res) if $A and $B are bignum.
Thank.
--
---
=
On Sun, 1 May 2011, Kenneth Wolcott wrote:
On Sun, May 1, 2011 at 14:36, Patrick Dupre wrote:
Hello,
Is perl able to load a fortran subroutine ?
I have no problem to make a c code callable by gcc (xs)
I can call a fortran routine from a c program.
But perl fails to load a so library linked
Hello,
Is perl able to load a fortran subroutine ?
I have no problem to make a c code callable by gcc (xs)
I can call a fortran routine from a c program.
But perl fails to load a so library linked with a piece of fortran.
The error is:
cannot restore segment prot after reloc: Permission denie
Hello,
I created my interface in c by using xs.
This work fine:
transition_HF*
init___ ()
PREINIT:
transition_HF *trans ;
CODE:
trans = (transition_HF*) malloc (sizeof (transition_HF)) ;
RETVAL = trans ;
OUTPUT:
RETVAL
but if I make a push:
like:
XPUSHs (sv_2mortal (newRV
Hello,
Can somebody tell me why this example does not work ?
Number found where operator expected at ./Test.pl line 12, near "case 0"
(Do you need to predeclare case?)
syntax error at ./Test.pl line 11, near ") {"
Execution of ./Test.pl aborted due to compilation errors.
Hello,
I tried to install Imager::Plot but it failed:
CPAN.pm: Going to build A/AD/ADDI/Imager-Plot-0.09.tar.gz
Unable to load any fonts!
please make sure that Imager was compiled with support
for one of the following libraries: freetype1, freetype2, libt1, win32
Warning: No success on command
Hello,
Could somebody tell me what is wrong with this code (I get a segmentation
fault):
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include
#include
typedef gsl_matrix* Math__GSL__Matrix__gsl_matrix ;
#include "const-c.inc"
MODULE = Test_gsl PACKAGE = Test_gsl
doubl
Hello,
The comand:
perl -MExtUtils::Embed -e ccopts
gives me:
-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm
-I/usr/lib64/perl5/5.10.0/x86_64-linux-thread-multi/CORE
Hello,
How can I execute the following command in a Makefile ?
CORE_INC=`perl -MConfig -MFile::Spec::Functions -le 'print
catfile($Config{archlib},"CORE")')`
The problem is with the $Config !
thank
--
---
==
Patrick DUP
Hello,
I have the a hash of hash of ... of array
(see below hwo I can list it) whose i wish to free the memory at one
point. Right now the desallocation is not clean, ie that evert time that
I reallocate the hash, the programme requires more and mor space and
finally swap the memory !
How can I f
Sorry,
I know, but I am still unable to subscribe to perl-xs
I submitted the issu to the computer service but it is not solved yet !
Sorry for the inconvenient !
XS is anything BUT a beginner question. there is an xs mailing list you
can post to or use some other forum like usenet or perlmon
Hello,
I created a library .so by using XS. I need to dynamically link this
library to another library (size 12822538).
How can I do ?
I get an error message:
Can't load
'/home/pdupre/perl_lib/x86_64-linux-thread-multi/auto/Fitter_XAS/Fitter_XAS.so'
for module Fitter_XAS:
/home/pdupre/perl_lib
Hello,
I do not know what to tell you.
I tried another webmail, but I cannot sent an empty email with an empty
subjet !!!
1. I was able to subscribe to perl-xs using that address just fine back when I
did it.
2. You may have lost the E-mail or it was dropped by a relay. You should check
your
On Thu, 1 Apr 2010, Philip Potter wrote:
On 1 April 2010 16:13, Patrick Dupre wrote:
Hello,
I cannot subscribe to perl-xs so, I am still posting here.
I don't understand the problem.
I do not understand either, I did 3 times and I never get any
feedback from the server !!!
First
Hello,
I cannot subscribe to perl-xs so, I am still posting here.
I fill a hash of hash with xs.
I wanted to free this hoh in perl, but it does not seem to be working.
hoh = () or undef hoh does not free the memory. If I do the same call
again, more memory is requested.
Should I deallocated the m
thank,
But perl-xs-subscr...@perl.org
never responded to me
No way to subscribe.
On Wednesday 31 Mar 2010 18:36:43 Patrick Dupre wrote:
Hello,
How can I store in a hash (HV) another hash bu using XS ?
Please ask it on the XS mailing list:
perl...@perl.org
(and perl-xs-subscr
Hello,
How can I store in a hash (HV) another hash bu using XS ?
Thanks.
--
---
==
Patrick DUPRÉ | |
Department of Chemistry| |Phone: (44)-(0)-1904-434384
The University of York
Hello,
I have a perl application calling c soubroutines. I use XS and makemaker
to compile the code. Every thing OK.
Now, let say that I have 2 c libraries (dynamics) created by XS and
the makemaker, and I would like that one of the 2 c subroutines calls
one of the subroubtine of the other lib
On Sun, 7 Feb 2010, Patrick Dupre wrote:
Hello,
I have been unsuccessful in getting the piddle values when I store them
in a hash so, I am asking to the list.
This works OK:
test_pdl (array)
pdl *array
CODE:
PDL -> converttype (&array, PDL_D, 1) ;
Sorry, I finally I know how t
Hello,
I have been unsuccessful in getting the piddle values when I store them
in a hash so, I am asking to the list.
This works OK:
test_pdl (array)
pdl *array
CODE:
PDL -> converttype (&array, PDL_D, 1) ;
when I do: test_pdl ($piddle) ;
but when I do:
%hash {"A"} = $piddle ;
test_p
Hello,
When I do:
XPUSHs (sv_2mortal (newRV_inc ((SV*) E_rot_up)) ;
Do I need to free the memory ?
I use the XPUSHs to pass an array of real to a perl sub, but I am
not sure that after the call, this memory sapce is freed.
Can I desallocate the memory space manually ?
I tried to use valgrind to
Hello,
In my Makefile.PL, how can I have 2 MYEXTLIB ?
I have 2 directories, on is OK, it is mylib
I also would like to make a cd mylib2, and run the Makefile (make
install).
I tried to change the
sub MY::postamble {
'
$(MYEXTLIB): mylib/Makefile
cd mylib && $(MAKE) $(PASSTHRU)
$(M
On Fri, 4 Sep 2009, Noah Garrett Wallach wrote:
Hi there,
I am having some trouble understanding hash of hashes here. I want to find
all the keys for %policy{'policy_statement'}
for my $line (@lines) {
for my $key ( keys %policy{'policy_statement'} ) {
Check if $keys is correc
Hello,
I did fail in trying to change value in XS when I pass a reference:
Typically:
in perl:
my $a = 5 ;
test (\a) ;
in XS
void
test (nb)
int *nb
CODE:
(*nb)++ ;
It does work,
Should I use a ref on a ref ?
--
---
==
Thank.
On Thu, Jul 30, 2009 at 19:28, Patrick Dupre wrote:
Hello,
Insi de my Makefile.PL, I would like to do something like:
LIBS => ['-lm -L$(PATH) -lmlib'],
with $PATH define at the beginning of the file, but I cannot make it
work
What am I doing wrong ?
snip
I s
Hello,
Insi de my Makefile.PL, I would like to do something like:
LIBS => ['-lm -L$(PATH) -lmlib'],
with $PATH define at the beginning of the file, but I cannot make it
work
What am I doing wrong ?
Thank.
--
---
==
Hello,
I need to call perl from c.
To pass an integer, I use to make a newSViv.
How do I do to pass a int* ?
Should I just cast the int* to int ans passed as an SV ?
in perl I need to get the value by $$var.
Thank.
--
---
=
Hello,
I used to build dynamic libraries in c (.so) that I can then call
from perl. However, in c the static libraries are more efficient
than the dynamic libraries.
So can I call a static c library from perl ?
for the dynamics library, in my Makefile.PL, I put:
LIBS=> ['-lm
Hello,
I created an Array, like:
AV *out = newAV () ;
then, I fill it with:
SV *elem = sv_newmortal () ;
sv_setnv (elem, val) ;
av_push (out, elem) ;
where val is a double.
Then, I wanted to change one of the values,
I did a av_fetch and it is OK (just to be sure)
Then, an av_store
Thank,
But I nned help.
I will work more to make a short example, but it seems clear that
something has changed between version 5.8.8 and version 5.10.0
I built up a cpp+ class which includes an array. When I try to access to
this array with a method, I get a segmentation fault.
Is it because p
Hello,
Since I upgrade my PC from perl 5.8.8 to 5.10.0, my application fails.
I do not understand what is going on, memory leak ?
Segmentation fault.
I noticed warning which did not happen before:
Please specify prototyping behavior for Fitter.xs (see perlxs manual)
g++ -c -D_REENTRANT -D_GNU_
Hello,
How can I avoid the generation of the man3 file even if the file
lib/file.pm can do it (I means will do it by default).
Thank
--
---
==
Patrick DUPRÉ | |
Department of Chemistry|
Hello,
I am experiencing 2 problems with the new version:
1) I have a .pl file which needs libraries located in the same
directory (.pm), so I used to put:
use lib '/home/pdupre/dir_name' ;
inside my .pl file.
That way, I was able to run the application from another directory
by using a link.
Now
Hello,
I wanted to return an array of arrays from c to perl.
I build up my arrays by unisng av_push, but then ?
I cannot av_push a AV*, so should I make a newSV and filled it
by casting, or should I make a newRV with the AV* (after casting)
and push it ?
Thank
--
---
==
Calling a sub from perl, if this sub return an address on an array,
it is not a problem, perl seems to manage correctly the memory to
keep allocated, and I can access to the data through the reference
at any time.
Making the same call from a CPP method seems not to work.
If I quit the method and
Hello,
Calling a sub from perl, if this sub return an address on an array,
it is not a problem, perl seems to manage correctly the memory to
keep allocated, and I can access to the data through the reference
at any time.
Making the same call from a CPP method seems not to work.
If I quit the met
tice the newRV before the FREETMPS !!!
If I remove it, it does not work at all, 1) the hv_fetch generate a
segmentation fault, 2) the sub2 gives an error:
Attempt to free unreferenced scalar: SV 0x8941998, Perl interpreter:
0x87b9008 at ./test.pl line 13
Somethnig does not make sense to me !!!
I do not get
Hello Rob,
I am trying to investigate more, but, one problem seems to that that the
SvTYPE (ret) is 3, ie that it is a RV reference when it should be a
hash reference. Am I correct ?
Patrick Dupre wrote:
I am desesperated !
Assuming the following perl sub:
sub sub1 {
my %a ;
$a {a
I am desesperated !
Assuming the following perl sub:
sub sub1 {
my %a ;
$a {a} = 1 ;
$a {b} = 2 ;
foreach (keys %a) {
print $_, " => ", $a {$_}, "\n" ;
}
return \%a ;
}
Using XS, I am tring to get the hash using:
PREINIT:
int count ;
SV *ret ;
HV *ptr ;
SV *
Hello,
I need to make a XPUSHs of a referene on an array, but XPUSHs takes only
scalar, so it looks like that I need convert my AV* into a scalar
with a newSV, but I do not know exactly.
Can I have some help ?
Regards
--
---
==
On Sun, 24 Aug 2008, Rob Dixon wrote:
Patrick Dupre wrote:
It is a bit more complex.
I am a perl routine calling a Cpp routine,
I wrote the xs to interface the call.
I wrote the methods (in Cpp) for the Cpp class.
In fact I need to use a Minuit2 class.
One needs to call a function with is
How can I modify my Makefile.PL to have a Makefile which can make
cc -o test.o -c test.c `perl -MExtUtils::Embed -e ccopts`
Thank
Makefile.PL is a program written using ExtUtils::MakeMaker to generate a
makefile for building a Perl /extension/ module.
ExtUtils::Embed is a module that will gene
Hello Bob,
So, you do not have any solution for me ?
Regards.
Patrick Dupre wrote:
On Fri, 22 Aug 2008, Rob Dixon wrote:
Patrick Dupre wrote:
How can I modify my Makefile.PL to have a Makefile which can make
cc -o test.o -c test.c `perl -MExtUtils::Embed -e ccopts`
Thank
Makefile.PL is
On Fri, 22 Aug 2008, Rob Dixon wrote:
Patrick Dupre wrote:
On Fri, 22 Aug 2008, Rob Dixon wrote:
Patrick Dupre wrote:
How can I modify my Makefile.PL to have a Makefile which can make
cc -o test.o -c test.c `perl -MExtUtils::Embed -e ccopts`
Thank
Makefile.PL is a program written using
On Fri, 22 Aug 2008, Rob Dixon wrote:
Patrick Dupre wrote:
How can I modify my Makefile.PL to have a Makefile which can make
cc -o test.o -c test.c `perl -MExtUtils::Embed -e ccopts`
Thank
Makefile.PL is a program written using ExtUtils::MakeMaker to generate a
makefile for building a Perl
Hello,
How can I modify my Makefile.PL to have a Makefile which can make
cc -o test.o -c test.c `perl -MExtUtils::Embed -e ccopts`
Thank
--
---
==
Patrick DUPRÉ | |
Department of Chemistry
OK, it works by putting the header file at the beginig of my c file:
EXTERN.h, etc.
Regards
Patrick Dupre wrote:
Inside a c routine (ie. inside a .c file) is there any way to define a
variable of type SV (or SV *) ?
From xs, it is no problem.
Yes. You can say
SV *var = &PL_sv_u
On Wed, 30 Jul 2008, Rob Dixon wrote:
Patrick Dupre wrote:
Inside a c routine (ie. inside a .c file) is there any way to define a
variable of type SV (or SV *) ?
From xs, it is no problem.
Yes. You can say
SV *var = &PL_sv_undef;
Where should I say it ?
What I want, by using a c rou
Hello,
Inside a c routine (ie. inside a .c file) is there any way to define a
variable of type SV (or SV *) ?
From xs, it is no problem.
Regards
--
---
==
Patrick DUPRÉ | |
Department of Chemistry
Thank,
Regards
Patrick Dupre wrote:
Hello,
I am trying to pass a array of references on array to a c subroutine:
my @set_2d = ([0.0, 1.0], [1.1, 2.2], [3.1, 4.4]) ;
test::test([EMAIL PROTECTED]) ;
in xs I put:
typedef double floatArray ;
void * floatArrayPtr (int num) {
SV * mortal
Hello,
I am trying to pass a array of references on array to a c subroutine:
my @set_2d = ([0.0, 1.0], [1.1, 2.2], [3.1, 4.4]) ;
test::test([EMAIL PROTECTED]) ;
in xs I put:
typedef double floatArray ;
void * floatArrayPtr (int num) {
SV * mortal ;
mortal = sv_2mortal (NEWSV (0, num * si
Hello,
I am trying to pass a array of references on array to a c subroutine:
my @set_2d = ([0.0, 1.0], [1.1, 2.2], [3.1, 4.4]) ;
test::test([EMAIL PROTECTED]) ;
in xs I put:
typedef double floatArray ;
void * floatArrayPtr (int num) {
SV * mortal ;
mortal = sv_2mortal (NEWSV (0, num * size
55 matches
Mail list logo