Re: compiling perl XS interface to tidylib

Hi

Replying to my own post to html-tidy user list about a problem compiling 
the perl interface (see below) ... I finally figured it out for myself - 
I'll post here so that anyone who runs into the same problems might find 
succour.

Set up - compiling latest release of HTML::Tidy perl module on 
linux-i386, using gcc 3.2 and perl 5.8.

1) The module doesn't currently compile against the most recent releases 
of tidylib. Get an older version - I eventually had success with a 
version marked as released on 01/02/2003.

2) Don't bother with the build.sh script - it's so obviously broken I 
don't believe it could have ever worked on a *nix box.

3) Do
%> perl Makefile.PL.unix TIDYINCPATH=/path/to/tidyinc 
TIDYLIBPATH=/path/to/tidylib

4) Try make && make test

5) If the tests pass, great. Lucky you.

6) If they fail with tidyperl/blib/arch/auto/HTML/Tidy/Tidy.so: 
undefined symbol: __cxa_pure_virtual, you need to hand-edit the Makefile 
in the directory; find the line that reads:
LDDLFLAGS = -shared [...]
add '-lstdc++' onto the end of this line

7) do 'make' again, then try 'make test'. It should work now and you can 
proceed to 'make install'

8) You should now be able to 'use HTML::Tidy' in your perl. Take a look 
at the tests packaged in t/ in the distribution tarball for some 
examples of how to use the (C-ish) interface.

cheers
alex

alex fenton wrote:

> I couldn't even get this to compile (linux i686, gcc 3.2) when linking 
> against the latest versions of tidylib. So I compiled an older version 
> of the lib, from around the time that the XS wrapper was last released 
> (Feb 03). However, though this compiles, the resulting .so file isn't 
> loadable, failing with
> tidyperl/blib/arch/auto/HTML/Tidy/Tidy.so: undefined symbol: 
> __cxa_pure_virtual

Received on Monday, 14 July 2003 12:25:07 UTC