Re: Decoding 'perl -V' output
[email protected] (Andy Dougherty)
| Newsgroups | perl.perl5.porters |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 17 Jun 2010, Sri wrote:
> My project involves embedding a perl interpreter into a wrapper
> generated using SWIG (www.swig.org).
> I've read several warnings in the docs about dire problems if I do not
> compile my project with the exact same flags that were used when the
> perl in installation was compiled. My project works fine on one ubuntu
> machine (8.04) and the perl that came with it (5.8.8). But, it is
> crashing on another ubuntu (10.x) that comes with perl 5.10.
> I want to eliminate the possibility that I used incompatible compile
> flags. Trouble is, I dont know how to interpret the right set of flags
> used when my perl installation was built. Is it "ccflags=" or "Compile
> Time options"? what about "optimize".
I have never used SWIG, so I don't know what, specifically, you are trying
to do, but here's the general idea for how it's supposed to work:
When you run the compiler, you should use $ccflags and $optimize.
In your case, that will include the following:
ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2 -g',
Your program should also include "perl.h". That will ultimately define
the things listed under "Compile Time options".
More details on all these things should be in the perlembed man page.
Hope this helps,
--
Andy Dougherty [email protected]