View previous topic :: View next topic |
Author |
Message |
clms n00b
Joined: 15 May 2024 Posts: 5
|
Posted: Wed May 15, 2024 7:38 pm Post subject: undefined symbol: apreq_handle_apache2 with perl -c |
|
|
I'm developing some code usage with mod_perl on Apache2. I check the syntax of the code with perl -c -I. My_mod_perl_stuff.pm. This worked fine for years.
After switching to a 2023 profile and doing the recommended "emerge --ask --emptytree @world" this perl -c syntax check returns
Quote: | Can't load '/usr/lib64/perl5/vendor_perl/5.38/x86_64-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so' for module APR::Request::Apache2: /usr/lib64/perl5/vendor_perl/5.38/x86_64-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so: undefined symbol: apreq_handle_apache2 at /usr/lib64/perl5/5.38/x86_64-linux-thread-multi/DynaLoader.pm line 206.
at /usr/lib64/perl5/vendor_perl/5.38/x86_64-linux-thread-multi/Apache2/Request.pm line 3.
Compilation failed in require at /usr/lib64/perl5/vendor_perl/5.38/x86_64-linux-thread-multi/Apache2/Request.pm line 3. |
Now I found out, that I don't get an error when I start Apache2 with my code. On the webserver it is working fine. The error only occurs if I start Perl standalone without Apache2.
I assume, I need to set some links or fix some search path to make perl -c work again with the Apache modules.
But which? |
|
Back to top |
|
|
sam_ Developer
Joined: 14 Aug 2020 Posts: 1972
|
Posted: Wed May 15, 2024 9:24 pm Post subject: |
|
|
This might be related to `default-now`. Could you give me a way to reproduce this please? (Some small sample mod_perl script and tell me how to set it up.) |
|
Back to top |
|
|
clms n00b
Joined: 15 May 2024 Posts: 5
|
Posted: Wed May 15, 2024 10:49 pm Post subject: |
|
|
As the error is caused by loading the Apache module, you can strip the module file down to
Code: | use APR::Request::Apache2; |
Put this line into file tmp.pm and then run
Since last weekend I get
Quote: | Can't load '/usr/lib64/perl5/vendor_perl/5.38/x86_64-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so' for module APR::Request::Apache2: /usr/lib64/perl5/vendor_perl/5.38/x86_64-linux-thread-multi/auto/APR/Request/Apache2/Apache2.so: undefined symbol: apreq_handle_apache2 at /usr/lib64/perl5/5.38/x86_64-linux-thread-multi/DynaLoader.pm line 206.
at tmp.pm line 1.
Compilation failed in require at tmp.pm line 1.
BEGIN failed--compilation aborted at tmp.pm line 1. |
for it. Before it would have been "tmp.pm syntax OK" |
|
Back to top |
|
|
sam_ Developer
Joined: 14 Aug 2020 Posts: 1972
|
Posted: Thu May 16, 2024 12:11 am Post subject: |
|
|
Thank you! I will have a look. |
|
Back to top |
|
|
sam_ Developer
Joined: 14 Aug 2020 Posts: 1972
|
Posted: Mon May 20, 2024 8:02 am Post subject: |
|
|
Would you mind filing a Gentoo bug for this so I can cite it? Thanks. |
|
Back to top |
|
|
clms n00b
Joined: 15 May 2024 Posts: 5
|
Posted: Sat Jun 15, 2024 7:32 pm Post subject: |
|
|
After my vacation, I did some further debug:
It looks, I need /usr/lib64/apache2/modules/mod_apreq2.so. It provides apreq_handle_apache2.
Unfortunately, I have no idea how to tell Perl, to load this shared library. |
|
Back to top |
|
|
clms n00b
Joined: 15 May 2024 Posts: 5
|
Posted: Sat Jun 15, 2024 8:50 pm Post subject: |
|
|
Created bug 934379 |
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 496
|
Posted: Mon Jun 17, 2024 4:39 pm Post subject: |
|
|
What shows Code: | emerge -pv www-apache/libapreq2 | ? Maybe it is related to the PERL_FEATURES change. |
|
Back to top |
|
|
clms n00b
Joined: 15 May 2024 Posts: 5
|
Posted: Mon Jun 17, 2024 6:05 pm Post subject: |
|
|
Code: | > emerge -pv www-apache/libapreq2
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 5.34 s (backtrack: 0/20).
[ebuild R ] www-apache/libapreq2-2.17:2::gentoo USE="perl -test" PERL_FEATURES="ithreads (-debug) -quadmath" 0 KiB
Total: 1 package (1 reinstall), Size of downloads: 0 KiB
|
|
|
Back to top |
|
|
|