[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Issues with compiling libembperl-perl from source on Debian 12 Bookworm



Hi

On Wednesday, 16 August 2023 20:23:56 CEST Neil Gunton wrote:
> However there
> is an issue with the [$ hidden $] meta command. It comes up with this in
> the Apache log:
> 
> Warning in Perl code: Use of uninitialized value in subroutine entry

Which is harmless, Perl should do the "right" thing.

> Which means I have to go through many hundreds of
> instances where code like this gives a warning:
> 
> if ($fdat{page} ne '')
> 
> This gives a warning now if $fdat{page} isn't instantiated ($fdat is ok,
> just 'page' doesn't exist in that hash). I have to fix it by doing
> 
> if (defined($fdat{page}) && $fdat{page} ne '')
> 
> ... which is a bit of a pain, and makes the code more complex, but I
> don't know if it's maybe a good thing by and large since I guess Perl is
> just being more rigorous. Anyway, I can stand this, it's not a huge deal.

You can write 

if ($fat{page}) 

This will achieve the same result and should not give a warning.

> The [$ hidden $] warning is more of a problem, since that is core
> Embperl functionality.

You will have to track where in Embperl is this warning generated and fix 
Embperl code.

I suggest to use Devel::SimpleTrace to find exactly where is this warning 
generated.

> Also there is an error in the 'make test' for the Embperl src package,
> as follows:

I can't help you there without spending a lot of time analyzing the tests.

> The original author of the package, Gerald Richter, doesn't appear to
> interact on the Embperl mailing list any more. I haven't had any
> response from that list either, since yesterday at least. 

That, unfortunately, happens quite often for old software. I quite recently 
took over upstream maintenance of pan because nobody else was volunteering and 
I did not want this package to be removed.  

> I wrote to one
> of the maintainers listed on the libembperl-perl page for Debian, and
> they told me to write to this list. I hope someone can give me some
> guidance on how to fix these issues, as Embperl is a very important
> package for me, it's central to my website.

May be you will have to take embperl over then.

> Perl is reported as 5.36 as per Bookworm. Some of the
> warnings during the compile of Embperl:
> 
> epmain.c: In function ‘DoLogError’:
> epmain.c:70:14: warning: assignment to ‘PerlInterpreter *’ {aka ‘struct
> interpreter *’} from incompatible pointer type ‘struct perl_thread *’
> [-Wincompatible-pointer-types]
>     70 |         aTHX = r -> pPerlTHX ;
> 
>        |              ^

Perl internals are also evolving and embperl XS code should be updated to 
follow this evolution.

Another solution is to run your site in docker with an older version of Perl 
(and may be Apache). If your site is static, this can be acceptable solution 
of a security point of view (but security will be an issue since older 
versions of software would be exposed to internet).

HTH







Reply to: