Tom Zoerner <[EMAIL PROTECTED]> writes:
> Hi Slaven,
>
> > How can I fix it? I installed libzvbi via the FreeBSD package system.
> > This was libzvbi-0.2.22, which is supported by your module, according
> > to the README. Now I installed the somewhat newer version
> > libzvbi-0.2.25_1 from ports. pthread seems to be involved into the
> > compilation, at least I see lines during the compilation like
>
> Sorry, appearently I misunderstood your setup. I assumed you didn't
> have the pthreads library installed at all on your test machine. In
> that case the fix would have been simple (e.g. remove libzvbi, as it's
> useless without pthreads, at least by default)
>
> So I compiled perl-5.8.8 without threads myself on an x64 linux, but
> still cannot reproduce your problem, i.e. "make test" works just fine.
> Still, maybe it's more of a fundamental problem. After consideration,
> I'm not so sure if it's a good idea to mix threaded an non-threaded
> code in the same application (might at least cause problems for global
> variables like "errno" which are defined differently in threaded code.)
>
> It will probably not be trivial to solve this, so I guess I'll just
> wait until a module user complains. Thanks again for your help.
>
I saw similar behaviour (a library which needs pthread does not work
with FreeBSD's unthreaded perl) in other perl modules, too. The patch
below seems to fix the problem for FreeBSD, at least "make test" does
not fail anymore. I suspect that netbsd and openbsd also need this
patch.
Another note: some files in the distribution are not listed in the
MANIFEST. Which means that makefile rules like "make dist" or
"make disttest" do not work. "make dist" is the preferred way
to create a distribution tarball.
Regards,
Slaven
#### Patch data follows ####
diff -up 'build/Video-ZVBI-0.2.3-gCFxWG/Makefile.PL'
'new.build/Video-ZVBI-0.2.3/Makefile.PL'
Index: ./Makefile.PL
Prereq: 1.3
--- ./Makefile.PL Sun Dec 2 20:49:18 2007
+++ ./Makefile.PL Wed Dec 5 20:27:25 2007
@@ -27,6 +27,9 @@ use ExtUtils::Liblist;
# we perform a search for libzvbi beforehand and abort if it's missing.
#
my $libs = '-lzvbi';
+if ($^O eq 'freebsd') {
+ $libs .= ' -lpthread';
+}
my $inc = '';
if (($#ARGV >= 0) && ($ARGV[0] =~ /^LIBPATH=(.*)/)) {
#### End of Patch data ####
--
Slaven Rezic - slaven <at> rezic <dot> de
tkruler - Perl/Tk program for measuring screen distances
http://ptktools.sourceforge.net/#tkruler